Remove LLVM build glue for MIPS as a native architecture.

This does not remove LLVM_TARGET_MIPS.  Note that the only
MACHINE_ARCH values ending in 'hf' were all MIPS architectures, hence
removing the pattern matches for 'hf'.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D39331
This commit is contained in:
John Baldwin 2023-03-29 15:06:15 -07:00
parent 60d0871dbf
commit eeedaefab5
3 changed files with 3 additions and 16 deletions

View File

@ -49,8 +49,8 @@ TARGET_TRIPLE_ABI=
.endif
VENDOR= unknown
LLVM_TARGET_TRIPLE?= ${TARGET_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}
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}
CFLAGS+= -DLLVM_DEFAULT_TARGET_TRIPLE=\"${LLVM_TARGET_TRIPLE}\"
CFLAGS+= -DLLVM_HOST_TRIPLE=\"${LLVM_BUILD_TRIPLE}\"
@ -73,9 +73,6 @@ CFLAGS+= -DLLVM_TARGET_ENABLE_BPF
.endif
.if ${MK_LLVM_TARGET_MIPS} != "no"
CFLAGS+= -DLLVM_TARGET_ENABLE_MIPS
. if ${MACHINE_CPUARCH} == "mips"
LLVM_NATIVE_ARCH= Mips
. endif
.endif
.if ${MK_LLVM_TARGET_POWERPC} != "no"
CFLAGS+= -DLLVM_TARGET_ENABLE_POWERPC
@ -126,8 +123,3 @@ CFLAGS+= -DBOOTSTRAPPING_WANT_NATIVE_SYSCTL
.if defined(BOOTSTRAPPING) && ${.MAKE.OS} == "Linux"
LIBADD+= dl
.endif
.if ${MACHINE_ARCH:Mmips64}
STATIC_CFLAGS+= -mxgot
STATIC_CXXFLAGS+= -mxgot
.endif

View File

@ -263,7 +263,7 @@ __LLVM_TARGETS= \
powerpc \
riscv \
x86
__LLVM_TARGET_FILT= C/(amd64|i386)/x86/:C/powerpc.*/powerpc/:C/armv[67]/arm/:C/riscv.*/riscv/:C/mips.*/mips/
__LLVM_TARGET_FILT= C/(amd64|i386)/x86/:C/powerpc.*/powerpc/:C/armv[67]/arm/:C/riscv.*/riscv/
.for __llt in ${__LLVM_TARGETS}
# Default enable the given TARGET's LLVM_TARGET support
.if ${__T:${__LLVM_TARGET_FILT}} == ${__llt}

View File

@ -12,9 +12,4 @@ DEBUG_FILES_CFLAGS= -gline-tables-only
DEBUG_FILES_CFLAGS= -g1
.endif
.if ${MACHINE_ARCH:Mmips*} && ${MACHINE_ARCH:Mmips64*} == ""
CFLAGS+= -mxgot
CXXFLAGS+= -mxgot
.endif
.include "../Makefile.inc"