Module Name: src
Committed By: mrg
Date: Sat Dec 31 05:44:25 UTC 2022
Modified Files:
src/external/gpl3/binutils.old/dist/gas: Makefile.am Makefile.in
src/external/gpl3/binutils/dist/gas: Makefile.am Makefile.in
src/tools/binutils: Makefile
Log Message:
fix the binutils build with read-only source trees
don't play with m68k-parse.c in tools/binutils/Makefile but disable
the rules that rebuild it so we always use the upstream version,
using the standard "NetBSD_DISABLED" method.
this was necessary to build on linux in 2014 (which may or may not
still ne necessary), but it also avoids triggering rebuild rules
based upon the timestamps on .y vs .c.
tested with amiga, amd64, and i386 "build.sh tools" builds.
To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/binutils.old/dist/gas/Makefile.am \
src/external/gpl3/binutils.old/dist/gas/Makefile.in
cvs rdiff -u -r1.9 -r1.10 src/external/gpl3/binutils/dist/gas/Makefile.am
cvs rdiff -u -r1.10 -r1.11 src/external/gpl3/binutils/dist/gas/Makefile.in
cvs rdiff -u -r1.35 -r1.36 src/tools/binutils/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/gpl3/binutils.old/dist/gas/Makefile.am
diff -u src/external/gpl3/binutils.old/dist/gas/Makefile.am:1.7 src/external/gpl3/binutils.old/dist/gas/Makefile.am:1.8
--- src/external/gpl3/binutils.old/dist/gas/Makefile.am:1.7 Fri Dec 23 17:09:21 2022
+++ src/external/gpl3/binutils.old/dist/gas/Makefile.am Sat Dec 31 05:44:25 2022
@@ -452,6 +452,8 @@ EXTRA_as_new_SOURCES += config/m68k-pars
# the other hand it's good that people who use the prebuilt
# m68k-parse.c don't get a spurious absolute path.
m68k-parse.c: $(srcdir)/config/m68k-parse.y
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_m68k-parse.c:
f=$(srcdir)/config/m68k-parse.y; \
if [ $$f = "./config/m68k-parse.y" ]; then \
ln -s config/m68k-parse.y . > /dev/null 2>/dev/null || \
Index: src/external/gpl3/binutils.old/dist/gas/Makefile.in
diff -u src/external/gpl3/binutils.old/dist/gas/Makefile.in:1.7 src/external/gpl3/binutils.old/dist/gas/Makefile.in:1.8
--- src/external/gpl3/binutils.old/dist/gas/Makefile.in:1.7 Fri Dec 23 17:09:21 2022
+++ src/external/gpl3/binutils.old/dist/gas/Makefile.in Sat Dec 31 05:44:25 2022
@@ -1583,6 +1583,8 @@ development.exp: $(BFDDIR)/development.s
# the other hand it's good that people who use the prebuilt
# m68k-parse.c don't get a spurious absolute path.
m68k-parse.c: $(srcdir)/config/m68k-parse.y
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_m68k-parse.c:
f=$(srcdir)/config/m68k-parse.y; \
if [ $$f = "./config/m68k-parse.y" ]; then \
ln -s config/m68k-parse.y . > /dev/null 2>/dev/null || \
Index: src/external/gpl3/binutils/dist/gas/Makefile.am
diff -u src/external/gpl3/binutils/dist/gas/Makefile.am:1.9 src/external/gpl3/binutils/dist/gas/Makefile.am:1.10
--- src/external/gpl3/binutils/dist/gas/Makefile.am:1.9 Sat Dec 24 20:17:05 2022
+++ src/external/gpl3/binutils/dist/gas/Makefile.am Sat Dec 31 05:44:25 2022
@@ -445,6 +445,8 @@ development.exp: $(BFDDIR)/development.s
EXTRA_as_new_SOURCES += config/m68k-parse.y
config/m68k-parse.c: $(srcdir)/config/m68k-parse.y
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_config_m68k-parse.c:
$(SHELL) $(YLWRAP) $(srcdir)/config/m68k-parse.y y.tab.c $@ -- $(YACCCOMPILE)
config/m68k-parse.h: config/m68k-parse.c
@true
Index: src/external/gpl3/binutils/dist/gas/Makefile.in
diff -u src/external/gpl3/binutils/dist/gas/Makefile.in:1.10 src/external/gpl3/binutils/dist/gas/Makefile.in:1.11
--- src/external/gpl3/binutils/dist/gas/Makefile.in:1.10 Fri Dec 30 15:41:35 2022
+++ src/external/gpl3/binutils/dist/gas/Makefile.in Sat Dec 31 05:44:25 2022
@@ -2048,6 +2048,8 @@ development.exp: $(BFDDIR)/development.s
$(EGREP) "(development|experimental)=" $(BFDDIR)/development.sh \
| $(AWK) -F= '{ print "set " $$1 " " $$2 }' > $@
config/m68k-parse.c: $(srcdir)/config/m68k-parse.y
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_config_m68k-parse.c:
$(SHELL) $(YLWRAP) $(srcdir)/config/m68k-parse.y y.tab.c $@ -- $(YACCCOMPILE)
config/m68k-parse.h: config/m68k-parse.c
@true
Index: src/tools/binutils/Makefile
diff -u src/tools/binutils/Makefile:1.35 src/tools/binutils/Makefile:1.36
--- src/tools/binutils/Makefile:1.35 Sun Dec 25 17:25:22 2022
+++ src/tools/binutils/Makefile Sat Dec 31 05:44:25 2022
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.35 2022/12/25 17:25:22 christos Exp $
+# $NetBSD: Makefile,v 1.36 2022/12/31 05:44:25 mrg Exp $
.include <bsd.hostinit.mk>
@@ -16,21 +16,6 @@ CONFIGURE_ARGS= --target=${MACHINE_GNU_P
--disable-werror --enable-initfini-array=yes \
${BRANDING}
-.if exists(${GNUHOSTDIST}/gas/config/m68k-parse.c)
-M68K_PARSE=${GNUHOSTDIST}/gas/config/m68k-parse.c
-.elif exists(${GNUHOSTDIST}/gas/m68k-parse.c)
-M68K_PARSE=${GNUHOSTDIST}/gas/m68k-parse.c
-.else
-.error "Can't find m68k-parse.c
-.endif
-
-build/gas/m68k-parse.c: ${M68K_PARSE}
- @mkdir build 2>/dev/null || true
- @mkdir build/gas 2>/dev/null || true
- cat ${M68K_PARSE} > ${.TARGET}
-
-.configure_done: build/gas/m68k-parse.c
-
MAKE_ARGS= MACHINE= MAKEINFO=${TOOL_MAKEINFO:Q}
ALL_TARGET= all-binutils all-gas all-ld