Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tools/binutils fix the binutils build with read-only source ...



details:   https://anonhg.NetBSD.org/src/rev/55088fe62abc
branches:  trunk
changeset: 372864:55088fe62abc
user:      mrg <mrg%NetBSD.org@localhost>
date:      Sat Dec 31 05:44:25 2022 +0000

description:
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.

diffstat:

 external/gpl3/binutils.old/dist/gas/Makefile.am |   2 ++
 external/gpl3/binutils.old/dist/gas/Makefile.in |   2 ++
 external/gpl3/binutils/dist/gas/Makefile.am     |   2 ++
 external/gpl3/binutils/dist/gas/Makefile.in     |   2 ++
 tools/binutils/Makefile                         |  17 +----------------
 5 files changed, 9 insertions(+), 16 deletions(-)

diffs (79 lines):

diff -r 6da3d2a73783 -r 55088fe62abc external/gpl3/binutils.old/dist/gas/Makefile.am
--- a/external/gpl3/binutils.old/dist/gas/Makefile.am   Sat Dec 31 03:44:18 2022 +0000
+++ b/external/gpl3/binutils.old/dist/gas/Makefile.am   Sat Dec 31 05:44:25 2022 +0000
@@ -452,6 +452,8 @@
 # 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 || \
diff -r 6da3d2a73783 -r 55088fe62abc external/gpl3/binutils.old/dist/gas/Makefile.in
--- a/external/gpl3/binutils.old/dist/gas/Makefile.in   Sat Dec 31 03:44:18 2022 +0000
+++ b/external/gpl3/binutils.old/dist/gas/Makefile.in   Sat Dec 31 05:44:25 2022 +0000
@@ -1583,6 +1583,8 @@
 # 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 || \
diff -r 6da3d2a73783 -r 55088fe62abc external/gpl3/binutils/dist/gas/Makefile.am
--- a/external/gpl3/binutils/dist/gas/Makefile.am       Sat Dec 31 03:44:18 2022 +0000
+++ b/external/gpl3/binutils/dist/gas/Makefile.am       Sat Dec 31 05:44:25 2022 +0000
@@ -445,6 +445,8 @@
 
 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
diff -r 6da3d2a73783 -r 55088fe62abc external/gpl3/binutils/dist/gas/Makefile.in
--- a/external/gpl3/binutils/dist/gas/Makefile.in       Sat Dec 31 03:44:18 2022 +0000
+++ b/external/gpl3/binutils/dist/gas/Makefile.in       Sat Dec 31 05:44:25 2022 +0000
@@ -2048,6 +2048,8 @@
        $(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
diff -r 6da3d2a73783 -r 55088fe62abc tools/binutils/Makefile
--- a/tools/binutils/Makefile   Sat Dec 31 03:44:18 2022 +0000
+++ b/tools/binutils/Makefile   Sat Dec 31 05:44:25 2022 +0000
@@ -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 @@
                --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



Home | Main Index | Thread Index | Old Index