svn commit: r359188 - head/share/mk
Warner Losh
imp at FreeBSD.org
Sat Mar 21 00:01:08 UTC 2020
Author: imp
Date: Sat Mar 21 00:01:06 2020
New Revision: 359188
URL: https://svnweb.freebsd.org/changeset/base/359188
Log:
Redo r359164 now that it's baked : Eliminate misuse of $MACHINE for userland things.
Use TARGET_ARCH and/or MACHINE_ARCH exclusively. Change all __TT uses to __T
with appropriate translations. MACHINE/TARGET is to be used only for kernel
things, and this fixes the last few stragglers.
Modified:
head/share/mk/src.opts.mk
Modified: head/share/mk/src.opts.mk
==============================================================================
--- head/share/mk/src.opts.mk Fri Mar 20 23:26:37 2020 (r359187)
+++ head/share/mk/src.opts.mk Sat Mar 21 00:01:06 2020 (r359188)
@@ -256,11 +256,6 @@ __T=${TARGET_ARCH}
.else
__T=${MACHINE_ARCH}
.endif
-.if defined(TARGET)
-__TT=${TARGET}
-.else
-__TT=${MACHINE}
-.endif
# All supported backends for LLVM_TARGET_XXX
__LLVM_TARGETS= \
@@ -270,13 +265,13 @@ __LLVM_TARGETS= \
powerpc \
riscv \
x86
-__LLVM_TARGET_FILT= C/(amd64|i386)/x86/:S/arm64/aarch64/:S/powerpc64/powerpc/
+__LLVM_TARGET_FILT= C/(amd64|i386)/x86/:C/powerpc.*/powerpc/:C/armv[67]/arm/:C/riscv.*/riscv/:C/mips.*/mips/
.for __llt in ${__LLVM_TARGETS}
# Default enable the given TARGET's LLVM_TARGET support
-.if ${__TT:${__LLVM_TARGET_FILT}} == ${__llt}
+.if ${__T:${__LLVM_TARGET_FILT}} == ${__llt}
__DEFAULT_YES_OPTIONS+= LLVM_TARGET_${__llt:${__LLVM_TARGET_FILT}:tu}
# aarch64 needs arm for -m32 support.
-.elif ${__TT} == "arm64" && ${__llt} == "arm"
+.elif ${__T} == "aarch64" && ${__llt:Marm*} != ""
__DEFAULT_DEPENDENT_OPTIONS+= LLVM_TARGET_ARM/LLVM_TARGET_AARCH64
# Default the rest of the LLVM_TARGETs to the value of MK_LLVM_TARGET_ALL.
.else
@@ -288,7 +283,7 @@ __DEFAULT_NO_OPTIONS+=LLVM_TARGET_BPF
.include <bsd.compiler.mk>
-.if ${__TT} != "mips"
+.if ${__T:Mmips*} == ""
# Clang is installed as the default /usr/bin/cc.
__DEFAULT_YES_OPTIONS+=CLANG_BOOTSTRAP CLANG_IS_CC
.else
@@ -307,7 +302,7 @@ __DEFAULT_NO_OPTIONS+=BINUTILS_BOOTSTRAP
.if ${__T:Mriscv*} != ""
BROKEN_OPTIONS+=OFED
.endif
-.if ${__TT} != "mips" && ${__T} != "powerpc" && ${__T} != "powerpcspe"
+.if ${__T:Mmips*} != "mips" && ${__T} != "powerpc" && ${__T} != "powerpcspe"
__DEFAULT_YES_OPTIONS+=LLD_BOOTSTRAP LLD_IS_LD
.else
__DEFAULT_NO_OPTIONS+=LLD_BOOTSTRAP LLD_IS_LD
More information about the svn-src-head
mailing list