From 77becb93257550ffab0fc9411f95a89167603188 Mon Sep 17 00:00:00 2001 From: Brooks Davis Date: Wed, 5 Oct 2022 17:26:30 +0100 Subject: [PATCH] Rename MACHINE_ABI and TARGET_ABI The MACHINE_ABI and TARGET_ABI variables are used to set the middle of the target triple (e.g., "-unknown-" or "-gnueabihf-"). They are not set by any tool in the base system and I've only found the latter mentioned in one review online. As such, rename them to to MACHINE_TRIPLE_ABI and TARGET_TRIPLE_ABI to clear the way to use MACHINE_ABI as a supplement to MACHINE_CPU, etc. Reviewed by: imp, jhb Obtained from: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D36420 --- Makefile.inc1 | 12 ++++++------ lib/clang/llvm.build.mk | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 63e9b574eaaa..03f98b641911 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -132,15 +132,15 @@ _TARGET_CPUTYPE=dummy .endif .if ${TARGET} == "arm" .if ${TARGET_ARCH:Marmv[67]*} != "" && ${TARGET_CPUTYPE:M*soft*} == "" -TARGET_ABI= gnueabihf +TARGET_TRIPLE_ABI= gnueabihf .else -TARGET_ABI= gnueabi +TARGET_TRIPLE_ABI= gnueabi .endif .endif -MACHINE_ABI?= unknown -MACHINE_TRIPLE?=${MACHINE_ARCH:S/amd64/x86_64/:C/sf$//}-${MACHINE_ABI}-freebsd${OS_REVISION} -TARGET_ABI?= unknown -TARGET_TRIPLE?= ${TARGET_ARCH:S/amd64/x86_64/:C/sf$//}-${TARGET_ABI}-freebsd${OS_REVISION} +MACHINE_TRIPLE_ABI?= unknown +MACHINE_TRIPLE?=${MACHINE_ARCH:S/amd64/x86_64/:C/sf$//}-${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} KNOWN_ARCHES?= aarch64/arm64 \ amd64 \ armv6/arm \ diff --git a/lib/clang/llvm.build.mk b/lib/clang/llvm.build.mk index 7fe279078397..cd8b523cb423 100644 --- a/lib/clang/llvm.build.mk +++ b/lib/clang/llvm.build.mk @@ -36,15 +36,15 @@ BUILD_ARCH?= ${MACHINE_ARCH} # arm (for armv4 and armv5 CPUs) always uses the soft float ABI. # For all other targets, we stick with 'unknown'. .if ${MACHINE_ARCH:Marmv[67]*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") -TARGET_ABI= -gnueabihf +TARGET_TRIPLE_ABI= -gnueabihf .elif ${MACHINE_ARCH:Marm*} -TARGET_ABI= -gnueabi +TARGET_TRIPLE_ABI= -gnueabi .else -TARGET_ABI= +TARGET_TRIPLE_ABI= .endif VENDOR= unknown -LLVM_TARGET_TRIPLE?= ${MACHINE_ARCH:C/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${VENDOR}-freebsd${OS_REVISION}${TARGET_ABI} +LLVM_TARGET_TRIPLE?= ${MACHINE_ARCH:C/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${VENDOR}-freebsd${OS_REVISION}${TARGET_TRIPLE_ABI} LLVM_BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${VENDOR}-freebsd${OS_REVISION} CFLAGS+= -DLLVM_DEFAULT_TARGET_TRIPLE=\"${LLVM_TARGET_TRIPLE}\"