Implement a workaround for GNU mak jobserver
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 12 Jan 2021 13:45:28 +0000 (05:45 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 12 Jan 2021 13:45:44 +0000 (05:45 -0800)
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.

30 files changed:
bfd/ChangeLog
bfd/aclocal.m4
bfd/configure
bfd/configure.ac
binutils/ChangeLog
binutils/aclocal.m4
binutils/configure
binutils/configure.ac
config/ChangeLog
config/jobserver.m4 [new file with mode: 0644]
gas/ChangeLog
gas/aclocal.m4
gas/configure
gas/configure.ac
gprof/ChangeLog
gprof/aclocal.m4
gprof/configure
gprof/configure.ac
ld/ChangeLog
ld/aclocal.m4
ld/configure
ld/configure.ac
libctf/ChangeLog
libctf/aclocal.m4
libctf/configure
libctf/configure.ac
opcodes/ChangeLog
opcodes/aclocal.m4
opcodes/configure
opcodes/configure.ac

index eaeb47d1662dcc22b840aebe270cb500f6792c6d..158b798c35ca597db87a9ade250fef12ca5b7927 100644 (file)
@@ -1,3 +1,10 @@
+2021-01-12  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR binutils/26792
+       * configure.ac: Use GNU_MAKE_JOBSERVER.
+       * aclocal.m4: Regenerated.
+       * configure: Likewise.
+
 2021-01-12  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR ld/27171
index 4a6a47cab0718231e640e2b52f8fd63d817a5073..519325d4aef7707febebe8c8f5d7e0d08d76ba49 100644 (file)
@@ -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])
index 32c547f53bcbe054961267447cf1e52761baab0d..ed328de6e9f9406460bfe78106f8e5a8ab614739 100755 (executable)
@@ -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
index 0797a08ff37a01c33b2f781a11d8a1063114c7de..102a22171f6d5948b18c7303b49235799e5755d5 100644 (file)
@@ -1146,3 +1146,5 @@ AC_SUBST(htmldir)
 AC_SUBST(pdfdir)
 
 AC_OUTPUT
+
+GNU_MAKE_JOBSERVER
index 6a5a6f3013d1cda80d524b0292bf96e9673943b5..000e3708ba5ec197607b6914a8ef200f9879fa8b 100644 (file)
@@ -1,3 +1,10 @@
+2021-01-12  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR binutils/26792
+       * configure.ac: Use GNU_MAKE_JOBSERVER.
+       * aclocal.m4: Regenerated.
+       * configure: Likewise.
+
 2021-01-12  Nick Clifton  <nickc@redhat.com>
 
        * po/fr.po: Updated French translation.
index 8bf2e9e242452756ba716f146b20a4b6d28013e4..8eca8cf94c73b4c1f160fed5b1f5b01c9376a5eb 100644 (file)
@@ -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])
index 5fa72aed16be270934e4cd882c8d60ea86da8a2e..1918e94a155e7bd68626a874d0a12ad536297282 100755 (executable)
@@ -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
index 4cbe0e39f065a7cdb2dae4783fa639675479c321..6ab854663706b0ce44c180a27282adfa63f63a6d 100644 (file)
@@ -494,3 +494,5 @@ AC_SUBST(pdfdir)
 
 AC_CONFIG_FILES(Makefile doc/Makefile po/Makefile.in:po/Make-in)
 AC_OUTPUT
+
+GNU_MAKE_JOBSERVER
index a0c123405616992ee4a29df02dfefda443118fe9..847fc0656fff5667eaab46ac35a11b34427985eb 100644 (file)
@@ -1,3 +1,8 @@
+2021-01-12  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR binutils/26792
+       * jobserver.m4: New file.
+
 2021-01-11  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR ld/27173
diff --git a/config/jobserver.m4 b/config/jobserver.m4
new file mode 100644 (file)
index 0000000..dc566b1
--- /dev/null
@@ -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])
index 3cfcc64ef3e59bc1156b42fdad629e0b4f7eb2fc..7ef0024253a0fc33cc8078049001f212801dc00a 100644 (file)
@@ -1,3 +1,10 @@
+2021-01-12  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR binutils/26792
+       * configure.ac: Use GNU_MAKE_JOBSERVER.
+       * aclocal.m4: Regenerated.
+       * configure: Likewise.
+
 2021-01-12  Nick Clifton  <nickc@redhat.com>
 
        * po/fr.po: Updated French translation.
index a9f9f5cc2df35841051f4b67859f6d1487ac87f1..70183124da70c4c0b6bd907275c7bdda870e9814 100644 (file)
@@ -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])
index 9dd469b3432ecd3c6ef9a893d9633ca78e755595..d253147eeaeafc9cb8aa199a6b195d862d986edc 100755 (executable)
@@ -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
index 82706561886e64d35df3cd9d3badb9bdf0cc716f..3abba43231486f080cf60da9ea5bfc1d61d118bf 100644 (file)
@@ -1076,3 +1076,5 @@ AC_CONFIG_COMMANDS([default],
  te_file=${te_file}])
 
 AC_OUTPUT
+
+GNU_MAKE_JOBSERVER
index 8d4c1feeeeff40a9aebb1054b8cc4fd976c49e22..2c2073bb1766fd6989e15acf3b822f83ffa708d1 100644 (file)
@@ -1,3 +1,10 @@
+2021-01-12  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR binutils/26792
+       * configure.ac: Use GNU_MAKE_JOBSERVER.
+       * aclocal.m4: Regenerated.
+       * configure: Likewise.
+
 2021-01-11  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR ld/27173
index 957655a8f9fc6b600834357e5ea57e9b230eca49..671b7317dfd948abd7abe8dc92abb60f01ae581b 100644 (file)
@@ -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])
index 375a033aa91e9e03b3650b710120095d84964cb9..8bc933d72a4d7375fc6babb3b21401b394d4af03 100755 (executable)
@@ -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
index ef7f3b4bad760bd70a33c96bbae181a711a332e3..36a40848097659635c7ee3e1c65bc4e86bb8fe04 100644 (file)
@@ -74,3 +74,5 @@ AC_SUBST(pdfdir)
 
 AC_CONFIG_FILES([Makefile po/Makefile.in:po/Make-in])
 AC_OUTPUT
+
+GNU_MAKE_JOBSERVER
index a4b0ea6e56bbb7a42111ac57aeca38f7b265ccc5..80c232d87faeafd27f46c3822665eff0f4040811 100644 (file)
@@ -1,3 +1,10 @@
+2021-01-12  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR binutils/26792
+       * configure.ac: Use GNU_MAKE_JOBSERVER.
+       * aclocal.m4: Regenerated.
+       * configure: Likewise.
+
 2021-01-12  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR ld/27171
index f6e87a228af5b6ced6ee60e1bdb81b0b8b08af47..d1823c15d063f7d84d4e7fe917cd010c892dbf5d 100644 (file)
@@ -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])
index 4a965be70d71ab7dc37240bbe6a375b8f1102bc2..551bc720377cc3a136b66ee6a1f12f9fa58e854c 100755 (executable)
@@ -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
index c9c69ab92454ec11a9db0f278b558b7854666466..767eda83413f9ff73cb1e4677f6e7c98f72b08a0 100644 (file)
@@ -597,3 +597,5 @@ AC_SUBST(pdfdir)
 
 AC_CONFIG_FILES(Makefile po/Makefile.in:po/Make-in)
 AC_OUTPUT
+
+GNU_MAKE_JOBSERVER
index 9cc02d3c43ba4713249077b36aaf63335acf228c..b0c5888beb8dee444e4cd7d98c784ddaf522ccfa 100644 (file)
@@ -1,3 +1,10 @@
+2021-01-12  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR binutils/26792
+       * configure.ac: Use GNU_MAKE_JOBSERVER.
+       * aclocal.m4: Regenerated.
+       * configure: Likewise.
+
 2021-01-11  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR ld/27173
index df51584d8371cdb7b318ee5234c200e042ddc518..4607d72856400c9357cd2bc95a0934d103d04d37 100644 (file)
@@ -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])
index 5e44eda194e0adb17ff40dcaf52527cba5ec7460..544bca2b10454d4f0babba8abf0399afa199ca0b 100755 (executable)
@@ -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
index bbdfd63e7c99ca55db22872419241efc0f7ec70e..c3fea731ea8d919224a777507f26b8a1a45c1f2a 100644 (file)
@@ -210,3 +210,5 @@ AC_SUBST(VERSION_FLAGS)
 AC_CONFIG_FILES(Makefile)
 AC_CONFIG_HEADERS(config.h)
 AC_OUTPUT
+
+GNU_MAKE_JOBSERVER
index ff421a52ee4a95e5c6550c410b3531b1812da2e7..88d01039136e1e9fa19008ce4b1135f9da459160 100644 (file)
@@ -1,3 +1,10 @@
+2021-01-12  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR binutils/26792
+       * configure.ac: Use GNU_MAKE_JOBSERVER.
+       * aclocal.m4: Regenerated.
+       * configure: Likewise.
+
 2021-01-12  Nick Clifton  <nickc@redhat.com>
 
        * po/sr.po: Updated Serbian translation.
index 36b1327569b261b3b05a91539a8af68c6d2e2b43..5ab3cf3ab6f97d8595302e6c0b6b6ac67ac6721f 100644 (file)
@@ -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])
index e9f68df568a480896375a3a426627965b2fd8e18..a0934e14421f73ff9f16beea9d27604fcd75de8c 100755 (executable)
@@ -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
index 07e95f0ee31a993c6652d25fcbabbaadfc2630fd..21929796fef76905f5dc4d58ed94415ccc8425e1 100644 (file)
@@ -382,3 +382,5 @@ AC_SUBST(BFD_MACHINES)
 
 AC_CONFIG_FILES([Makefile po/Makefile.in:po/Make-in])
 AC_OUTPUT
+
+GNU_MAKE_JOBSERVER