summaryrefslogtreecommitdiffstats
path: root/tools/build/mk
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2003-04-12 15:07:46 +0000
committerru <ru@FreeBSD.org>2003-04-12 15:07:46 +0000
commite3d7641b70900bc07105b20fef49b1ce608bd7cf (patch)
treea061d9437cad94efb4e5243de5e109a66a3e8c47 /tools/build/mk
parent05640161f6a5a16c53067de7bb81d2e113d3e11c (diff)
downloadFreeBSD-src-e3d7641b70900bc07105b20fef49b1ce608bd7cf.zip
FreeBSD-src-e3d7641b70900bc07105b20fef49b1ce608bd7cf.tar.gz
Make sure legacy stuff comes last. Some tools that use
legacy stuff (binutils) depend on this order. For this to work, provide (and use) specialized versions of bsd.prog.mk and bsd.lib.mk that include the standard versions first, then augment CFLAGS, DPADD, LDADD, and LDFLAGS as necessary, with the legacy stuff. Tested on: 4.0-RELEASE
Diffstat (limited to 'tools/build/mk')
-rw-r--r--tools/build/mk/Makefile.boot14
-rw-r--r--tools/build/mk/bsd.lib.mk4
-rw-r--r--tools/build/mk/bsd.prog.mk4
3 files changed, 22 insertions, 0 deletions
diff --git a/tools/build/mk/Makefile.boot b/tools/build/mk/Makefile.boot
new file mode 100644
index 0000000..ba2c5f7
--- /dev/null
+++ b/tools/build/mk/Makefile.boot
@@ -0,0 +1,14 @@
+# $FreeBSD$
+
+# FreeBSD didn't always have the __FBSDID() macro in <sys/cdefs.h>.
+# We could do this with a sys/cdefs.h wrapper, but given that this would
+# slow down all new builds for such a simple concept, we do it here.
+.if ( ${BOOTSTRAPPING} < 440001 || \
+ ( ${BOOTSTRAPPING} >= 500000 && ${BOOTSTRAPPING} < 500024 ))
+CFLAGS+= -D__FBSDID=__RCSID
+.endif
+
+CFLAGS+= -I${WORLDTMP}/legacy/usr/include
+DPADD+= ${WORLDTMP}/legacy/usr/lib/libegacy.a
+LDADD+= -legacy
+LDFLAGS+= -L${WORLDTMP}/legacy/usr/lib
diff --git a/tools/build/mk/bsd.lib.mk b/tools/build/mk/bsd.lib.mk
new file mode 100644
index 0000000..744f5b5
--- /dev/null
+++ b/tools/build/mk/bsd.lib.mk
@@ -0,0 +1,4 @@
+# $FreeBSD$
+
+.include "../../../share/mk/bsd.lib.mk"
+.include "Makefile.boot"
diff --git a/tools/build/mk/bsd.prog.mk b/tools/build/mk/bsd.prog.mk
new file mode 100644
index 0000000..d650665
--- /dev/null
+++ b/tools/build/mk/bsd.prog.mk
@@ -0,0 +1,4 @@
+# $FreeBSD$
+
+.include "../../../share/mk/bsd.prog.mk"
+.include "Makefile.boot"
OpenPOWER on IntegriCloud