From d546b61084cec687e0063b2e0e169b4690341c23 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 12 Jan 2021 05:45:28 -0800 Subject: [PATCH] Implement a workaround for GNU mak jobserver Compiling binutils using -flto=jobserver with GCC 11 leads to libtool: link: gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wstack-usage=262144 -Wwrite-strings -I../../gas/../zlib -g -O2 -fprofile-generate -flto=jobserver -o as-new app.o as.o atof-generic.o compress-debug.o cond.o depend.o dwarf2dbg.o dw2gencfi.o ecoff.o ehopt.o expr.o flonum-copy.o flonum-konst.o flonum-mult.o frags.o hash.o input-file.o input-scrub.o listing.o literal.o macro.o messages.o output-file.o read.o remap.o sb.o stabs.o subsegs.o symbols.o write.o config/tc-i386.o config/obj-elf.o config/atof-ieee.o ../opcodes/.libs/libopcodes.a ../bfd/.libs/libbfd.a -L/tmp/binutils-gdb/objdir/zlib -lz ../libiberty/libiberty.a -ldl lto-wrapper: warning: jobserver is not available: '--jobserver-auth=' is not present in 'MAKEFLAGS' since the '+' is missing on the recipe line in Makefiles generated by automake. Add the '+' to the recipe line by hand. bfd/ PR binutils/26792 * configure.ac: Use GNU_MAKE_JOBSERVER. * aclocal.m4: Regenerated. * configure: Likewise. binutils/ PR binutils/26792 * configure.ac: Use GNU_MAKE_JOBSERVER. * aclocal.m4: Regenerated. * configure: Likewise. config/ PR binutils/26792 * jobserver.m4: New file. gas/ PR binutils/26792 * configure.ac: Use GNU_MAKE_JOBSERVER. * aclocal.m4: Regenerated. * configure: Likewise. gprof/ PR binutils/26792 * configure.ac: Use GNU_MAKE_JOBSERVER. * aclocal.m4: Regenerated. * configure: Likewise. ld/ PR binutils/26792 * configure.ac: Use GNU_MAKE_JOBSERVER. * aclocal.m4: Regenerated. * configure: Likewise. libctf/ PR binutils/26792 * configure.ac: Use GNU_MAKE_JOBSERVER. * aclocal.m4: Regenerated. * configure: Likewise. opcodes/ PR binutils/26792 * configure.ac: Use GNU_MAKE_JOBSERVER. * aclocal.m4: Regenerated. * configure: Likewise. --- bfd/ChangeLog | 7 +++++++ bfd/aclocal.m4 | 1 + bfd/configure | 18 ++++++++++++++++++ bfd/configure.ac | 2 ++ binutils/ChangeLog | 7 +++++++ binutils/aclocal.m4 | 1 + binutils/configure | 18 ++++++++++++++++++ binutils/configure.ac | 2 ++ config/ChangeLog | 5 +++++ config/jobserver.m4 | 24 ++++++++++++++++++++++++ gas/ChangeLog | 7 +++++++ gas/aclocal.m4 | 1 + gas/configure | 18 ++++++++++++++++++ gas/configure.ac | 2 ++ gprof/ChangeLog | 7 +++++++ gprof/aclocal.m4 | 1 + gprof/configure | 18 ++++++++++++++++++ gprof/configure.ac | 2 ++ ld/ChangeLog | 7 +++++++ ld/aclocal.m4 | 1 + ld/configure | 18 ++++++++++++++++++ ld/configure.ac | 2 ++ libctf/ChangeLog | 7 +++++++ libctf/aclocal.m4 | 1 + libctf/configure | 18 ++++++++++++++++++ libctf/configure.ac | 2 ++ opcodes/ChangeLog | 7 +++++++ opcodes/aclocal.m4 | 1 + opcodes/configure | 18 ++++++++++++++++++ opcodes/configure.ac | 2 ++ 30 files changed, 225 insertions(+) create mode 100644 config/jobserver.m4 diff --git a/bfd/ChangeLog b/bfd/ChangeLog index eaeb47d1662..158b798c35c 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,10 @@ +2021-01-12 H.J. Lu + + PR binutils/26792 + * configure.ac: Use GNU_MAKE_JOBSERVER. + * aclocal.m4: Regenerated. + * configure: Likewise. + 2021-01-12 H.J. Lu PR ld/27171 diff --git a/bfd/aclocal.m4 b/bfd/aclocal.m4 index 4a6a47cab07..519325d4aef 100644 --- a/bfd/aclocal.m4 +++ b/bfd/aclocal.m4 @@ -1170,6 +1170,7 @@ AC_SUBST([am__untar]) m4_include([../config/acx.m4]) m4_include([../config/depstand.m4]) m4_include([../config/gettext-sister.m4]) +m4_include([../config/jobserver.m4]) m4_include([../config/largefile.m4]) m4_include([../config/lead-dot.m4]) m4_include([../config/nls.m4]) diff --git a/bfd/configure b/bfd/configure index 32c547f53bc..ed328de6e9f 100755 --- a/bfd/configure +++ b/bfd/configure @@ -19354,3 +19354,21 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi + + +touch config.status.tmp +if touch --reference=config.status config.status.tmp > /dev/null 2>&1; then + sed '/as_fn_exit 0/i \ +sed -e \"s/^\t\\\(\\\$(AM_V_CCLD)\\\)/\t+ \\\1/\" Makefile > Makefile.tmp \ +touch --reference=Makefile Makefile.tmp \ +mv Makefile.tmp Makefile \ +' config.status > config.status.tmp + touch --reference=config.status config.status.tmp + mv config.status.tmp config.status + chmod +x config.status + sed -e "s/^\t\(\$(AM_V_CCLD)\)/\t+ \1/" Makefile > Makefile.tmp + touch --reference=Makefile Makefile.tmp + mv Makefile.tmp Makefile +else + rm -f config.status.tmp +fi diff --git a/bfd/configure.ac b/bfd/configure.ac index 0797a08ff37..102a22171f6 100644 --- a/bfd/configure.ac +++ b/bfd/configure.ac @@ -1146,3 +1146,5 @@ AC_SUBST(htmldir) AC_SUBST(pdfdir) AC_OUTPUT + +GNU_MAKE_JOBSERVER diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 6a5a6f3013d..000e3708ba5 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,10 @@ +2021-01-12 H.J. Lu + + PR binutils/26792 + * configure.ac: Use GNU_MAKE_JOBSERVER. + * aclocal.m4: Regenerated. + * configure: Likewise. + 2021-01-12 Nick Clifton * po/fr.po: Updated French translation. diff --git a/binutils/aclocal.m4 b/binutils/aclocal.m4 index 8bf2e9e2424..8eca8cf94c7 100644 --- a/binutils/aclocal.m4 +++ b/binutils/aclocal.m4 @@ -1192,6 +1192,7 @@ m4_include([../config/depstand.m4]) m4_include([../config/enable.m4]) m4_include([../config/gettext-sister.m4]) m4_include([../config/iconv.m4]) +m4_include([../config/jobserver.m4]) m4_include([../config/largefile.m4]) m4_include([../config/lcmessage.m4]) m4_include([../config/lead-dot.m4]) diff --git a/binutils/configure b/binutils/configure index 5fa72aed16b..1918e94a155 100755 --- a/binutils/configure +++ b/binutils/configure @@ -18051,3 +18051,21 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi + + +touch config.status.tmp +if touch --reference=config.status config.status.tmp > /dev/null 2>&1; then + sed '/as_fn_exit 0/i \ +sed -e \"s/^\t\\\(\\\$(AM_V_CCLD)\\\)/\t+ \\\1/\" Makefile > Makefile.tmp \ +touch --reference=Makefile Makefile.tmp \ +mv Makefile.tmp Makefile \ +' config.status > config.status.tmp + touch --reference=config.status config.status.tmp + mv config.status.tmp config.status + chmod +x config.status + sed -e "s/^\t\(\$(AM_V_CCLD)\)/\t+ \1/" Makefile > Makefile.tmp + touch --reference=Makefile Makefile.tmp + mv Makefile.tmp Makefile +else + rm -f config.status.tmp +fi diff --git a/binutils/configure.ac b/binutils/configure.ac index 4cbe0e39f06..6ab85466370 100644 --- a/binutils/configure.ac +++ b/binutils/configure.ac @@ -494,3 +494,5 @@ AC_SUBST(pdfdir) AC_CONFIG_FILES(Makefile doc/Makefile po/Makefile.in:po/Make-in) AC_OUTPUT + +GNU_MAKE_JOBSERVER diff --git a/config/ChangeLog b/config/ChangeLog index a0c12340561..847fc0656ff 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,8 @@ +2021-01-12 H.J. Lu + + PR binutils/26792 + * jobserver.m4: New file. + 2021-01-11 H.J. Lu PR ld/27173 diff --git a/config/jobserver.m4 b/config/jobserver.m4 new file mode 100644 index 00000000000..dc566b1a1d9 --- /dev/null +++ b/config/jobserver.m4 @@ -0,0 +1,24 @@ +dnl GNU_MAKE_JOBSERVER +dnl +dnl Implement a workaround for GNU mak jobserver by adding the '+' to the +dnl recipe line in Makefiles generated by automake. +dnl +AC_DEFUN([GNU_MAKE_JOBSERVER],[dnl +m4_pattern_allow(AM_V_CCLD) +touch config.status.tmp +dnl Must keep the same timestamps on config.status and Makefile. +if touch --reference=config.status config.status.tmp > /dev/null 2>&1; then + sed '/as_fn_exit 0/i \ +sed -e \"s/^\t\\\(\\\$(AM_V_CCLD)\\\)/\t+ \\\1/\" Makefile > Makefile.tmp \ +touch --reference=Makefile Makefile.tmp \ +mv Makefile.tmp Makefile \ +' config.status > config.status.tmp + touch --reference=config.status config.status.tmp + mv config.status.tmp config.status + chmod +x config.status + sed -e "s/^\t\(\$(AM_V_CCLD)\)/\t+ \1/" Makefile > Makefile.tmp + touch --reference=Makefile Makefile.tmp + mv Makefile.tmp Makefile +else + rm -f config.status.tmp +fi]) diff --git a/gas/ChangeLog b/gas/ChangeLog index 3cfcc64ef3e..7ef0024253a 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,10 @@ +2021-01-12 H.J. Lu + + PR binutils/26792 + * configure.ac: Use GNU_MAKE_JOBSERVER. + * aclocal.m4: Regenerated. + * configure: Likewise. + 2021-01-12 Nick Clifton * po/fr.po: Updated French translation. diff --git a/gas/aclocal.m4 b/gas/aclocal.m4 index a9f9f5cc2df..70183124da7 100644 --- a/gas/aclocal.m4 +++ b/gas/aclocal.m4 @@ -1190,6 +1190,7 @@ m4_include([../bfd/warning.m4]) m4_include([../config/acx.m4]) m4_include([../config/depstand.m4]) m4_include([../config/gettext-sister.m4]) +m4_include([../config/jobserver.m4]) m4_include([../config/largefile.m4]) m4_include([../config/lcmessage.m4]) m4_include([../config/lead-dot.m4]) diff --git a/gas/configure b/gas/configure index 9dd469b3432..d253147eeae 100755 --- a/gas/configure +++ b/gas/configure @@ -17775,3 +17775,21 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi + + +touch config.status.tmp +if touch --reference=config.status config.status.tmp > /dev/null 2>&1; then + sed '/as_fn_exit 0/i \ +sed -e \"s/^\t\\\(\\\$(AM_V_CCLD)\\\)/\t+ \\\1/\" Makefile > Makefile.tmp \ +touch --reference=Makefile Makefile.tmp \ +mv Makefile.tmp Makefile \ +' config.status > config.status.tmp + touch --reference=config.status config.status.tmp + mv config.status.tmp config.status + chmod +x config.status + sed -e "s/^\t\(\$(AM_V_CCLD)\)/\t+ \1/" Makefile > Makefile.tmp + touch --reference=Makefile Makefile.tmp + mv Makefile.tmp Makefile +else + rm -f config.status.tmp +fi diff --git a/gas/configure.ac b/gas/configure.ac index 82706561886..3abba432314 100644 --- a/gas/configure.ac +++ b/gas/configure.ac @@ -1076,3 +1076,5 @@ AC_CONFIG_COMMANDS([default], te_file=${te_file}]) AC_OUTPUT + +GNU_MAKE_JOBSERVER diff --git a/gprof/ChangeLog b/gprof/ChangeLog index 8d4c1feeeef..2c2073bb176 100644 --- a/gprof/ChangeLog +++ b/gprof/ChangeLog @@ -1,3 +1,10 @@ +2021-01-12 H.J. Lu + + PR binutils/26792 + * configure.ac: Use GNU_MAKE_JOBSERVER. + * aclocal.m4: Regenerated. + * configure: Likewise. + 2021-01-11 H.J. Lu PR ld/27173 diff --git a/gprof/aclocal.m4 b/gprof/aclocal.m4 index 957655a8f9f..671b7317dfd 100644 --- a/gprof/aclocal.m4 +++ b/gprof/aclocal.m4 @@ -1170,6 +1170,7 @@ AC_SUBST([am__untar]) m4_include([../bfd/warning.m4]) m4_include([../config/depstand.m4]) m4_include([../config/gettext-sister.m4]) +m4_include([../config/jobserver.m4]) m4_include([../config/largefile.m4]) m4_include([../config/lead-dot.m4]) m4_include([../config/nls.m4]) diff --git a/gprof/configure b/gprof/configure index 375a033aa91..8bc933d72a4 100755 --- a/gprof/configure +++ b/gprof/configure @@ -15083,3 +15083,21 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi + + +touch config.status.tmp +if touch --reference=config.status config.status.tmp > /dev/null 2>&1; then + sed '/as_fn_exit 0/i \ +sed -e \"s/^\t\\\(\\\$(AM_V_CCLD)\\\)/\t+ \\\1/\" Makefile > Makefile.tmp \ +touch --reference=Makefile Makefile.tmp \ +mv Makefile.tmp Makefile \ +' config.status > config.status.tmp + touch --reference=config.status config.status.tmp + mv config.status.tmp config.status + chmod +x config.status + sed -e "s/^\t\(\$(AM_V_CCLD)\)/\t+ \1/" Makefile > Makefile.tmp + touch --reference=Makefile Makefile.tmp + mv Makefile.tmp Makefile +else + rm -f config.status.tmp +fi diff --git a/gprof/configure.ac b/gprof/configure.ac index ef7f3b4bad7..36a40848097 100644 --- a/gprof/configure.ac +++ b/gprof/configure.ac @@ -74,3 +74,5 @@ AC_SUBST(pdfdir) AC_CONFIG_FILES([Makefile po/Makefile.in:po/Make-in]) AC_OUTPUT + +GNU_MAKE_JOBSERVER diff --git a/ld/ChangeLog b/ld/ChangeLog index a4b0ea6e56b..80c232d87fa 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,10 @@ +2021-01-12 H.J. Lu + + PR binutils/26792 + * configure.ac: Use GNU_MAKE_JOBSERVER. + * aclocal.m4: Regenerated. + * configure: Likewise. + 2021-01-12 H.J. Lu PR ld/27171 diff --git a/ld/aclocal.m4 b/ld/aclocal.m4 index f6e87a228af..d1823c15d06 100644 --- a/ld/aclocal.m4 +++ b/ld/aclocal.m4 @@ -1191,6 +1191,7 @@ m4_include([../config/acx.m4]) m4_include([../config/depstand.m4]) m4_include([../config/enable.m4]) m4_include([../config/gettext-sister.m4]) +m4_include([../config/jobserver.m4]) m4_include([../config/largefile.m4]) m4_include([../config/lcmessage.m4]) m4_include([../config/lead-dot.m4]) diff --git a/ld/configure b/ld/configure index 4a965be70d7..551bc720377 100755 --- a/ld/configure +++ b/ld/configure @@ -20629,3 +20629,21 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi + + +touch config.status.tmp +if touch --reference=config.status config.status.tmp > /dev/null 2>&1; then + sed '/as_fn_exit 0/i \ +sed -e \"s/^\t\\\(\\\$(AM_V_CCLD)\\\)/\t+ \\\1/\" Makefile > Makefile.tmp \ +touch --reference=Makefile Makefile.tmp \ +mv Makefile.tmp Makefile \ +' config.status > config.status.tmp + touch --reference=config.status config.status.tmp + mv config.status.tmp config.status + chmod +x config.status + sed -e "s/^\t\(\$(AM_V_CCLD)\)/\t+ \1/" Makefile > Makefile.tmp + touch --reference=Makefile Makefile.tmp + mv Makefile.tmp Makefile +else + rm -f config.status.tmp +fi diff --git a/ld/configure.ac b/ld/configure.ac index c9c69ab9245..767eda83413 100644 --- a/ld/configure.ac +++ b/ld/configure.ac @@ -597,3 +597,5 @@ AC_SUBST(pdfdir) AC_CONFIG_FILES(Makefile po/Makefile.in:po/Make-in) AC_OUTPUT + +GNU_MAKE_JOBSERVER diff --git a/libctf/ChangeLog b/libctf/ChangeLog index 9cc02d3c43b..b0c5888beb8 100644 --- a/libctf/ChangeLog +++ b/libctf/ChangeLog @@ -1,3 +1,10 @@ +2021-01-12 H.J. Lu + + PR binutils/26792 + * configure.ac: Use GNU_MAKE_JOBSERVER. + * aclocal.m4: Regenerated. + * configure: Likewise. + 2021-01-11 H.J. Lu PR ld/27173 diff --git a/libctf/aclocal.m4 b/libctf/aclocal.m4 index df51584d837..4607d728564 100644 --- a/libctf/aclocal.m4 +++ b/libctf/aclocal.m4 @@ -1232,6 +1232,7 @@ m4_include([../config/acx.m4]) m4_include([../config/depstand.m4]) m4_include([../config/enable.m4]) m4_include([../config/gettext-sister.m4]) +m4_include([../config/jobserver.m4]) m4_include([../config/lead-dot.m4]) m4_include([../config/override.m4]) m4_include([../config/warnings.m4]) diff --git a/libctf/configure b/libctf/configure index 5e44eda194e..544bca2b104 100755 --- a/libctf/configure +++ b/libctf/configure @@ -15768,3 +15768,21 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi + + +touch config.status.tmp +if touch --reference=config.status config.status.tmp > /dev/null 2>&1; then + sed '/as_fn_exit 0/i \ +sed -e \"s/^\t\\\(\\\$(AM_V_CCLD)\\\)/\t+ \\\1/\" Makefile > Makefile.tmp \ +touch --reference=Makefile Makefile.tmp \ +mv Makefile.tmp Makefile \ +' config.status > config.status.tmp + touch --reference=config.status config.status.tmp + mv config.status.tmp config.status + chmod +x config.status + sed -e "s/^\t\(\$(AM_V_CCLD)\)/\t+ \1/" Makefile > Makefile.tmp + touch --reference=Makefile Makefile.tmp + mv Makefile.tmp Makefile +else + rm -f config.status.tmp +fi diff --git a/libctf/configure.ac b/libctf/configure.ac index bbdfd63e7c9..c3fea731ea8 100644 --- a/libctf/configure.ac +++ b/libctf/configure.ac @@ -210,3 +210,5 @@ AC_SUBST(VERSION_FLAGS) AC_CONFIG_FILES(Makefile) AC_CONFIG_HEADERS(config.h) AC_OUTPUT + +GNU_MAKE_JOBSERVER diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index ff421a52ee4..88d01039136 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,10 @@ +2021-01-12 H.J. Lu + + PR binutils/26792 + * configure.ac: Use GNU_MAKE_JOBSERVER. + * aclocal.m4: Regenerated. + * configure: Likewise. + 2021-01-12 Nick Clifton * po/sr.po: Updated Serbian translation. diff --git a/opcodes/aclocal.m4 b/opcodes/aclocal.m4 index 36b1327569b..5ab3cf3ab6f 100644 --- a/opcodes/aclocal.m4 +++ b/opcodes/aclocal.m4 @@ -1172,6 +1172,7 @@ m4_include([../bfd/warning.m4]) m4_include([../config/acx.m4]) m4_include([../config/depstand.m4]) m4_include([../config/gettext-sister.m4]) +m4_include([../config/jobserver.m4]) m4_include([../config/lead-dot.m4]) m4_include([../config/nls.m4]) m4_include([../config/override.m4]) diff --git a/opcodes/configure b/opcodes/configure index e9f68df568a..a0934e14421 100755 --- a/opcodes/configure +++ b/opcodes/configure @@ -15488,3 +15488,21 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi + + +touch config.status.tmp +if touch --reference=config.status config.status.tmp > /dev/null 2>&1; then + sed '/as_fn_exit 0/i \ +sed -e \"s/^\t\\\(\\\$(AM_V_CCLD)\\\)/\t+ \\\1/\" Makefile > Makefile.tmp \ +touch --reference=Makefile Makefile.tmp \ +mv Makefile.tmp Makefile \ +' config.status > config.status.tmp + touch --reference=config.status config.status.tmp + mv config.status.tmp config.status + chmod +x config.status + sed -e "s/^\t\(\$(AM_V_CCLD)\)/\t+ \1/" Makefile > Makefile.tmp + touch --reference=Makefile Makefile.tmp + mv Makefile.tmp Makefile +else + rm -f config.status.tmp +fi diff --git a/opcodes/configure.ac b/opcodes/configure.ac index 07e95f0ee31..21929796fef 100644 --- a/opcodes/configure.ac +++ b/opcodes/configure.ac @@ -382,3 +382,5 @@ AC_SUBST(BFD_MACHINES) AC_CONFIG_FILES([Makefile po/Makefile.in:po/Make-in]) AC_OUTPUT + +GNU_MAKE_JOBSERVER -- 2.30.2