aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorBryan Drewery <bdrewery@FreeBSD.org>2017-11-10 19:53:07 +0000
committerBryan Drewery <bdrewery@FreeBSD.org>2017-11-10 19:53:07 +0000
commit9cde684d499b1c180322bee158393c81c0f1dd4a (patch)
tree2073c0e884026f24f916aa8e67f41d6253e3e135 /Makefile
parent2f1b9408057b9f79704d12e04ecd2692c84f82e6 (diff)
downloadsrc-9cde684d499b1c180322bee158393c81c0f1dd4a.tar.gz
src-9cde684d499b1c180322bee158393c81c0f1dd4a.zip
native-xtools: Fix for GCC archs.
- This also adds in a _cleanobj step as needed. - This redirects TARGET/TARGET_ARCH to NXB_TARGET/NXB_TARGET_ARCH in Makefile.inc1 as the main build needs to be for MACHINE rather than TARGET. First build the toolchain and then use that as an external toolchain to build the needed directories and NXB_TARGET-toolchain, all as MACHINE files though via TARGET_TRIPLE=MACHINE_TRIPLE. The NXBDIRS is evaluated in the 'everything' submake as it needs to be based on TARGET's src.opts.mk values, such as MK_GCC=yes when building on a MK_CLANG=yes MACHINE. This can likely be changed to a specific _native-xtools-everything target later and the funky late evaluation of SUBDIR_OVERRIDE removed. X-MFC-With: r325001 Pointyhat to: bdrewery MFC after: 2 months Sponsored by: Dell EMC Isilon
Notes
Notes: svn path=/head/; revision=325673
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 9 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 7bd234bd65d5..310adbd27c2e 100644
--- a/Makefile
+++ b/Makefile
@@ -290,6 +290,15 @@ ${XTGTS}: _assert_target
_TARGET?= ${MACHINE}
_TARGET_ARCH?= ${MACHINE_ARCH}
+.if make(native-xtools*)
+NXB_TARGET:= ${_TARGET}
+NXB_TARGET_ARCH:= ${_TARGET_ARCH}
+_TARGET= ${MACHINE}
+_TARGET_ARCH= ${MACHINE_ARCH}
+_MAKE+= NXB_TARGET=${NXB_TARGET} \
+ NXB_TARGET_ARCH=${NXB_TARGET_ARCH}
+.endif
+
.if make(print-dir)
.SILENT:
.endif