git: 0e33cf79a008 - stable/12 - Avoid using TARGET_ARCH in llvm.build.mk
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 21 Aug 2022 11:29:29 UTC
The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=0e33cf79a00883689c7ef04194dc68c046f3f718 commit 0e33cf79a00883689c7ef04194dc68c046f3f718 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2022-08-14 11:10:48 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2022-08-21 11:17:41 +0000 Avoid using TARGET_ARCH in llvm.build.mk Apparently the TARGET_ARCH macro is not supposed to be used outside of the top-level Makefiles. Directly use MACHINE_ARCH instead. Noticed by: imp, jrtc27 MFC after: 1 week (cherry picked from commit 8534e6be8110a8126268a38dc0557a2d15615ce9) --- lib/clang/llvm.build.mk | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/clang/llvm.build.mk b/lib/clang/llvm.build.mk index dd1d5068efda..135d1c573eb6 100644 --- a/lib/clang/llvm.build.mk +++ b/lib/clang/llvm.build.mk @@ -26,15 +26,14 @@ CFLAGS+= -DHAVE_VCS_VERSION_INC CFLAGS+= -DNDEBUG .endif -TARGET_ARCH?= ${MACHINE_ARCH} BUILD_ARCH?= ${MACHINE_ARCH} # Armv6 and armv7 uses hard float abi, unless the CPUTYPE has soft in it. # arm (for armv4 and armv5 CPUs) always uses the soft float ABI. # For all other targets, we stick with 'unknown'. -.if ${TARGET_ARCH:Marmv[67]*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") +.if ${MACHINE_ARCH:Marmv[67]*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") TARGET_ABI= -gnueabihf -.elif ${TARGET_ARCH:Marm*} +.elif ${MACHINE_ARCH:Marm*} TARGET_ABI= -gnueabi .else TARGET_ABI= @@ -42,7 +41,7 @@ TARGET_ABI= VENDOR= unknown OS_VERSION= freebsd12.3 -LLVM_TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${VENDOR}-${OS_VERSION}${TARGET_ABI} +LLVM_TARGET_TRIPLE?= ${MACHINE_ARCH:C/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${VENDOR}-${OS_VERSION}${TARGET_ABI} LLVM_BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${VENDOR}-${OS_VERSION} CFLAGS+= -DLLVM_DEFAULT_TARGET_TRIPLE=\"${LLVM_TARGET_TRIPLE}\"