diff --git a/Makefile.inc1 b/Makefile.inc1 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -136,9 +136,9 @@ .endif .endif MACHINE_TRIPLE_ABI?= unknown -MACHINE_TRIPLE?=${MACHINE_ARCH:S/amd64/x86_64/:C/sf$//}-${MACHINE_TRIPLE_ABI}-freebsd${OS_REVISION} +MACHINE_TRIPLE?=${MACHINE_ARCH:S/amd64/x86_64/}-${MACHINE_TRIPLE_ABI}-freebsd${OS_REVISION} TARGET_TRIPLE_ABI?= unknown -TARGET_TRIPLE?= ${TARGET_ARCH:S/amd64/x86_64/:C/sf$//}-${TARGET_TRIPLE_ABI}-freebsd${OS_REVISION} +TARGET_TRIPLE?= ${TARGET_ARCH:S/amd64/x86_64/}-${TARGET_TRIPLE_ABI}-freebsd${OS_REVISION} KNOWN_ARCHES?= aarch64/arm64 \ amd64 \ armv6/arm \ diff --git a/lib/clang/llvm.build.mk b/lib/clang/llvm.build.mk --- a/lib/clang/llvm.build.mk +++ b/lib/clang/llvm.build.mk @@ -49,8 +49,8 @@ .endif VENDOR= unknown -LLVM_TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/:C/sf$//}-${VENDOR}-freebsd${OS_REVISION}${TARGET_TRIPLE_ABI} -LLVM_BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/:C/sf$//}-${VENDOR}-freebsd${OS_REVISION} +LLVM_TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/}-${VENDOR}-freebsd${OS_REVISION}${TARGET_TRIPLE_ABI} +LLVM_BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/}-${VENDOR}-freebsd${OS_REVISION} CFLAGS+= -DLLVM_DEFAULT_TARGET_TRIPLE=\"${LLVM_TARGET_TRIPLE}\" CFLAGS+= -DLLVM_HOST_TRIPLE=\"${LLVM_BUILD_TRIPLE}\" diff --git a/lib/libclang_rt/compiler-rt-vars.mk b/lib/libclang_rt/compiler-rt-vars.mk --- a/lib/libclang_rt/compiler-rt-vars.mk +++ b/lib/libclang_rt/compiler-rt-vars.mk @@ -9,7 +9,7 @@ (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") CRTARCH?= armhf .else -CRTARCH?= ${MACHINE_ARCH:S/amd64/x86_64/:C/sf$//} +CRTARCH?= ${MACHINE_ARCH:S/amd64/x86_64/} .endif .if ${COMPILER_TYPE} == "clang"