Use clang and lld as the default toolchain for RISCV.
- Enable clang and lld as system toolchains. - Don't use external GCC for universe by default. - Re-enable riscv64sf since it builds fine with clang + lld. Reviewed by: emaste, mhorne Relnotes: yes Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D23089
This commit is contained in:
parent
f8091e2c8f
commit
e48503fffd
7
Makefile
7
Makefile
@ -495,23 +495,20 @@ TARGET_ARCHES_arm64?= aarch64
|
|||||||
TARGET_ARCHES_mips?= mipsel mips mips64el mips64 mipsn32 mipselhf mipshf mips64elhf mips64hf
|
TARGET_ARCHES_mips?= mipsel mips mips64el mips64 mipsn32 mipselhf mipshf mips64elhf mips64hf
|
||||||
# powerpcspe excluded until clang fixed
|
# powerpcspe excluded until clang fixed
|
||||||
TARGET_ARCHES_powerpc?= powerpc powerpc64
|
TARGET_ARCHES_powerpc?= powerpc powerpc64
|
||||||
# riscv64sf excluded due to PR 232085
|
TARGET_ARCHES_riscv?= riscv64 riscv64sf
|
||||||
TARGET_ARCHES_riscv?= riscv64
|
|
||||||
.for target in ${TARGETS}
|
.for target in ${TARGETS}
|
||||||
TARGET_ARCHES_${target}?= ${target}
|
TARGET_ARCHES_${target}?= ${target}
|
||||||
.endfor
|
.endfor
|
||||||
|
|
||||||
MAKE_PARAMS_riscv?= CROSS_TOOLCHAIN=riscv64-gcc
|
|
||||||
MAKE_PARAMS_mips?= CROSS_TOOLCHAIN=mips-gcc6
|
MAKE_PARAMS_mips?= CROSS_TOOLCHAIN=mips-gcc6
|
||||||
MAKE_PARAMS_sparc64?= CROSS_TOOLCHAIN=sparc64-gcc6
|
MAKE_PARAMS_sparc64?= CROSS_TOOLCHAIN=sparc64-gcc6
|
||||||
|
|
||||||
TOOLCHAINS_mips= mips-gcc6
|
TOOLCHAINS_mips= mips-gcc6
|
||||||
TOOLCHAINS_riscv= riscv64-gcc
|
|
||||||
TOOLCHAINS_sparc64= sparc64-gcc6
|
TOOLCHAINS_sparc64= sparc64-gcc6
|
||||||
|
|
||||||
# Remove architectures only supported by external toolchain from
|
# Remove architectures only supported by external toolchain from
|
||||||
# universe if required toolchain packages are missing.
|
# universe if required toolchain packages are missing.
|
||||||
.for target in mips riscv sparc64
|
.for target in mips sparc64
|
||||||
.if ${_UNIVERSE_TARGETS:M${target}}
|
.if ${_UNIVERSE_TARGETS:M${target}}
|
||||||
.for toolchain in ${TOOLCHAINS_${target}}
|
.for toolchain in ${TOOLCHAINS_${target}}
|
||||||
.if !exists(/usr/local/share/toolchains/${toolchain}.mk)
|
.if !exists(/usr/local/share/toolchains/${toolchain}.mk)
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
.\"
|
.\"
|
||||||
.\" $FreeBSD$
|
.\" $FreeBSD$
|
||||||
.\"
|
.\"
|
||||||
.Dd January 5, 2020
|
.Dd January 8, 2020
|
||||||
.Dt ARCH 7
|
.Dt ARCH 7
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -319,8 +319,8 @@ This table shows the default tool chain for each architecture.
|
|||||||
.It powerpc Ta Clang Ta GNU ld 2.17.50
|
.It powerpc Ta Clang Ta GNU ld 2.17.50
|
||||||
.It powerpcspe Ta Clang Ta GNU ld 2.17.50
|
.It powerpcspe Ta Clang Ta GNU ld 2.17.50
|
||||||
.It powerpc64 Ta Clang Ta lld
|
.It powerpc64 Ta Clang Ta lld
|
||||||
.It riscv64 Ta GCC(1) Ta GNU ld(1)
|
.It riscv64 Ta Clang Ta lld
|
||||||
.It riscv64sf Ta GCC(1) Ta GNU ld(1)
|
.It riscv64sf Ta Clang Ta lld
|
||||||
.It sparc64 Ta GCC(1) Ta GNU ld(1)
|
.It sparc64 Ta GCC(1) Ta GNU ld(1)
|
||||||
.El
|
.El
|
||||||
.Pp
|
.Pp
|
||||||
|
@ -295,8 +295,7 @@ __DEFAULT_NO_OPTIONS+=LLVM_TARGET_BPF
|
|||||||
# If the compiler is not C++11 capable, disable Clang. External toolchain will
|
# If the compiler is not C++11 capable, disable Clang. External toolchain will
|
||||||
# be required.
|
# be required.
|
||||||
|
|
||||||
.if ${COMPILER_FEATURES:Mc++11} && (${__TT} != "mips" && \
|
.if ${COMPILER_FEATURES:Mc++11} && (${__TT} != "mips" && ${__TT} != "sparc64")
|
||||||
${__TT} != "riscv" && ${__TT} != "sparc64")
|
|
||||||
# Clang is enabled, and will be installed as the default /usr/bin/cc.
|
# Clang is enabled, and will be installed as the default /usr/bin/cc.
|
||||||
__DEFAULT_YES_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_IS_CC LLD
|
__DEFAULT_YES_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_IS_CC LLD
|
||||||
.elif ${COMPILER_FEATURES:Mc++11} && ${__T} != "sparc64"
|
.elif ${COMPILER_FEATURES:Mc++11} && ${__T} != "sparc64"
|
||||||
@ -323,7 +322,7 @@ __DEFAULT_YES_OPTIONS+=LLVM_LIBUNWIND
|
|||||||
__DEFAULT_NO_OPTIONS+=LLVM_LIBUNWIND
|
__DEFAULT_NO_OPTIONS+=LLVM_LIBUNWIND
|
||||||
.endif
|
.endif
|
||||||
.if ${__TT} != "mips" && ${__T} != "powerpc" && ${__T} != "powerpcspe" && \
|
.if ${__TT} != "mips" && ${__T} != "powerpc" && ${__T} != "powerpcspe" && \
|
||||||
${__TT} != "riscv" && ${__T} != "sparc64"
|
${__T} != "sparc64"
|
||||||
__DEFAULT_YES_OPTIONS+=LLD_BOOTSTRAP LLD_IS_LD
|
__DEFAULT_YES_OPTIONS+=LLD_BOOTSTRAP LLD_IS_LD
|
||||||
.else
|
.else
|
||||||
__DEFAULT_NO_OPTIONS+=LLD_BOOTSTRAP LLD_IS_LD
|
__DEFAULT_NO_OPTIONS+=LLD_BOOTSTRAP LLD_IS_LD
|
||||||
|
Loading…
Reference in New Issue
Block a user