Include RISC-V target to universe build.
Check if RISC-V external toolchain package is installed, otherwise skip build. Reviewed by: emaste Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D10344
This commit is contained in:
@@ -417,16 +417,28 @@ worlds: .PHONY
|
|||||||
# existing system is.
|
# existing system is.
|
||||||
#
|
#
|
||||||
.if make(universe) || make(universe_kernels) || make(tinderbox) || make(targets)
|
.if make(universe) || make(universe_kernels) || make(tinderbox) || make(targets)
|
||||||
TARGETS?=amd64 arm arm64 i386 mips powerpc sparc64
|
TARGETS?=amd64 arm arm64 i386 mips powerpc riscv sparc64
|
||||||
_UNIVERSE_TARGETS= ${TARGETS}
|
_UNIVERSE_TARGETS= ${TARGETS}
|
||||||
TARGET_ARCHES_arm?= arm armeb armv6
|
TARGET_ARCHES_arm?= arm armeb armv6
|
||||||
TARGET_ARCHES_arm64?= aarch64
|
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
|
||||||
TARGET_ARCHES_powerpc?= powerpc powerpc64 powerpcspe
|
TARGET_ARCHES_powerpc?= powerpc powerpc64 powerpcspe
|
||||||
|
TARGET_ARCHES_riscv?= riscv64 riscv64sf
|
||||||
.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
|
||||||
|
|
||||||
|
# XXX Remove riscv from universe if the required toolchain package is missing.
|
||||||
|
.if !exists(/usr/local/share/toolchains/riscv64-gcc.mk) && ${TARGETS:Mriscv}
|
||||||
|
_UNIVERSE_TARGETS:= ${_UNIVERSE_TARGETS:Nriscv}
|
||||||
|
universe: universe_riscv_skip .PHONY
|
||||||
|
universe_epilogue: universe_riscv_skip .PHONY
|
||||||
|
universe_riscv_skip: universe_prologue .PHONY
|
||||||
|
@echo ">> riscv skipped - install riscv64-xtoolchain-gcc port or package to build"
|
||||||
|
.endif
|
||||||
|
|
||||||
.if defined(UNIVERSE_TARGET)
|
.if defined(UNIVERSE_TARGET)
|
||||||
MAKE_JUST_WORLDS= YES
|
MAKE_JUST_WORLDS= YES
|
||||||
.else
|
.else
|
||||||
@@ -476,6 +488,7 @@ universe_${target}_${target_arch}: universe_${target}_prologue .MAKE .PHONY
|
|||||||
${SUB_MAKE} ${JFLAG} ${UNIVERSE_TARGET} \
|
${SUB_MAKE} ${JFLAG} ${UNIVERSE_TARGET} \
|
||||||
TARGET=${target} \
|
TARGET=${target} \
|
||||||
TARGET_ARCH=${target_arch} \
|
TARGET_ARCH=${target_arch} \
|
||||||
|
${MAKE_PARAMS_${target}} \
|
||||||
> _.${target}.${target_arch}.${UNIVERSE_TARGET} 2>&1 || \
|
> _.${target}.${target_arch}.${UNIVERSE_TARGET} 2>&1 || \
|
||||||
(echo "${target}.${target_arch} ${UNIVERSE_TARGET} failed," \
|
(echo "${target}.${target_arch} ${UNIVERSE_TARGET} failed," \
|
||||||
"check _.${target}.${target_arch}.${UNIVERSE_TARGET} for details" | \
|
"check _.${target}.${target_arch}.${UNIVERSE_TARGET} for details" | \
|
||||||
@@ -531,6 +544,7 @@ universe_kernconf_${TARGET}_${kernel}: .MAKE
|
|||||||
${SUB_MAKE} ${JFLAG} buildkernel \
|
${SUB_MAKE} ${JFLAG} buildkernel \
|
||||||
TARGET=${TARGET} \
|
TARGET=${TARGET} \
|
||||||
TARGET_ARCH=${TARGET_ARCH_${kernel}} \
|
TARGET_ARCH=${TARGET_ARCH_${kernel}} \
|
||||||
|
${MAKE_PARAMS_${TARGET}} \
|
||||||
KERNCONF=${kernel} \
|
KERNCONF=${kernel} \
|
||||||
> _.${TARGET}.${kernel} 2>&1 || \
|
> _.${TARGET}.${kernel} 2>&1 || \
|
||||||
(echo "${TARGET} ${kernel} kernel failed," \
|
(echo "${TARGET} ${kernel} kernel failed," \
|
||||||
|
|||||||
Reference in New Issue
Block a user