aboutsummaryrefslogtreecommitdiff
path: root/pkgs
diff options
context:
space:
mode:
authorSimon J. Gerraty <sjg@FreeBSD.org>2014-05-10 05:13:29 +0000
committerSimon J. Gerraty <sjg@FreeBSD.org>2014-05-10 05:13:29 +0000
commit77fe74ed79ef67dc5f117a166c2b540d23d16471 (patch)
tree95807b8298be2de531ae93c2aa0d7ce98fc834b6 /pkgs
parent4e3343548a4bb8341c2e05b6f30cb1ace706b854 (diff)
downloadsrc-77fe74ed79ef67dc5f117a166c2b540d23d16471.tar.gz
src-77fe74ed79ef67dc5f117a166c2b540d23d16471.zip
Toolchains are a pain - especially to bootstrap
rather than waste time optimizing for a rare? event, leverage the targets in src/Makefile.inc1
Notes
Notes: svn path=/projects/bmake/; revision=265800
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/pseudo/bootstrap-tools/Makefile46
-rw-r--r--pkgs/pseudo/bootstrap-tools/Makefile.depend10
2 files changed, 56 insertions, 0 deletions
diff --git a/pkgs/pseudo/bootstrap-tools/Makefile b/pkgs/pseudo/bootstrap-tools/Makefile
new file mode 100644
index 000000000000..34aae96b9914
--- /dev/null
+++ b/pkgs/pseudo/bootstrap-tools/Makefile
@@ -0,0 +1,46 @@
+# $FreeBSD$
+
+# building clang is particularly tedious - so avoid re-inventing wheels
+# the end result is
+
+all: cross-tools build-tools
+
+UPDATE_DEPENDFILE= no
+
+# we build for the pseudo machine "host"
+TARGET_MACHINE= host
+
+HOST_MACHINE!= uname -m
+HOST_MACHINE_ARCH!= uname -p
+TOOLSDIR?= ${HOST_OBJTOP}/tools
+LEGACY_TOOLS?= ${TOOLSDIR}/legacy
+
+BSENV= \
+ unset MAKEOBJDIR; MAKEOBJDIRPREFIX=${TOOLSDIR} \
+ MAKESYSPATH=${SRCTOP}/tools/build/mk:${SRCTOP}/share/mk \
+ TARGET=${HOST_MACHINE} TARGET_ARCH=${HOST_MACHINE_ARCH} \
+ WITHOUT_STAGING=1 STAGE_ROOT= \
+ WORLDTMP=${TOOLSDIR} LEGACY_TOOLS=${LEGACY_TOOLS}
+
+BSARGS= \
+ DESTDIR= \
+ SSP_CFLAGS= \
+ MK_HTML=no MK_INFO=no NO_LINT=yes MK_MAN=no \
+ -DNO_PIC MK_PROFILE=no -DNO_SHARED \
+ -DNO_CPU_CFLAGS -DNO_WARNS MK_CTF=no -DEARLY_BUILD MK_TESTS=no
+
+
+legacy: .MAKE .META
+ mkdir -p ${LEGACY_TOOLS}
+ ${MAKE} -C ${SRCTOP}/etc distrib-dirs DESTDIR=${TOOLSDIR} > $@2
+ ${MAKE} -C ${SRCTOP}/etc distrib-dirs DESTDIR=${LEGACY_TOOLS} > $@
+ ${BSENV} ${MAKE} -C ${SRCTOP} -f Makefile.inc1 ${BSARGS} $@
+ touch $@
+
+bootstrap-tools: legacy
+build-tools: bootstrap-tools
+cross-tools: build-tools
+
+cross-tools build-tools bootstrap-tools: .MAKE .META
+ ${BSENV} ${MAKE} -C ${SRCTOP} -f Makefile.inc1 ${BSARGS} $@
+ touch $@
diff --git a/pkgs/pseudo/bootstrap-tools/Makefile.depend b/pkgs/pseudo/bootstrap-tools/Makefile.depend
new file mode 100644
index 000000000000..fc65dd39f4f9
--- /dev/null
+++ b/pkgs/pseudo/bootstrap-tools/Makefile.depend
@@ -0,0 +1,10 @@
+# $FreeBSD$
+
+# This file is not autogenerated - take care!
+
+DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
+
+DIRDEPS =
+
+
+.include <dirdeps.mk>