aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2017-07-27 12:29:31 +0000
committerEd Maste <emaste@FreeBSD.org>2017-07-27 12:29:31 +0000
commit6d2909f6a052a65c48ea609d7726625d4d3fc7ff (patch)
treee274d2f6fa78cbea59f4b8b13a4c08459c74acac /Makefile
parent9a3083660d19b638eca89bb7888040ce04433efa (diff)
downloadsrc-6d2909f6a052a65c48ea609d7726625d4d3fc7ff.tar.gz
src-6d2909f6a052a65c48ea609d7726625d4d3fc7ff.zip
genericize target exclusion for missing external toolchain
Previously we excluded riscv from make universe / tinderbox if the required xtoolchain package was not installed. Make that logic generic so that we can loop over multiple architectures, in preparation to test patches to have other architectures rely on external toolchain. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D11652
Notes
Notes: svn path=/head/; revision=321616
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile22
1 files changed, 15 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index ce7ffa304c98..f51f16a4563d 100644
--- a/Makefile
+++ b/Makefile
@@ -441,14 +441,22 @@ TARGET_ARCHES_${target}?= ${target}
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"
+# XXX Remove architectures only supported by external toolchain from universe
+# if required toolchain packages are missing.
+TOOLCHAINS_riscv= riscv64
+.for target in riscv
+.if ${_UNIVERSE_TARGETS:M${target}}
+.for toolchain in ${TOOLCHAINS_${target}}
+.if !exists(/usr/local/share/toolchains/${toolchain}-gcc.mk)
+_UNIVERSE_TARGETS:= ${_UNIVERSE_TARGETS:N${target}}
+universe: universe_${toolchain}_skip .PHONY
+universe_epilogue: universe_${toolchain}_skip .PHONY
+universe_${toolchain}_skip: universe_prologue .PHONY
+ @echo ">> ${target} skipped - install ${toolchain}-xtoolchain-gcc port or package to build"
.endif
+.endfor
+.endif
+.endfor
.if defined(UNIVERSE_TARGET)
MAKE_JUST_WORLDS= YES