From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by sourceware.org (Postfix) with ESMTPS id DA78D385700B for ; Tue, 27 Oct 2020 11:02:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org DA78D385700B Received: by mail-pf1-x442.google.com with SMTP id a200so693510pfa.10 for ; Tue, 27 Oct 2020 04:02:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=0NvWTlq3d9Nkj3Fvn9tB3N7Bj5bMGPTqIu6e62zHv6c=; b=D3fkfAix9fR4AVJiWT9jLofd5VG+anuMVlIUmlAsqej3KP8N+WhjWEWpKEqttEbEoy 5GWfbbggX3aQdaMqdiiWq2bAdOlaq8uhKPJGz5gVcWcd5k30BDUREQ8tqK7+k20GIkBc kgr/doNZtHhOmc/4PUJida3zbxdGckzTxEO9uOr0o6vSVV1n/Fo4BySQVK0WzmIexPon Gxw3uUR2Kd7VmDvFF/QRj2Su70KyTI82pwbYWGeNTGC6uwG4YvOI9whqZ/SDrO8haUWO HeYwiNYdKcwSOHJj2Rlsd92OsKWmCJMFymPohXoDY0uJX8iu5wFU54VWT3M/8zmgWclO QA1g== X-Gm-Message-State: AOAM532kk2XyBzptNSsAkD8YWYEW+RtOR09L6oJrsarhn2XPyjy0pDOc 2TethTKsqERcLEqM1mLT0RDq/D/0z08= X-Google-Smtp-Source: ABdhPJyUBH7S6bHlpIx3hH1WSRtBS+o1FMvPP59BRsBFh7x+BebA7sclrbQvKGYVj2DXCEVNzPcVrw== X-Received: by 2002:a63:fb48:: with SMTP id w8mr1443291pgj.218.1603796563250; Tue, 27 Oct 2020 04:02:43 -0700 (PDT) Received: from gnu-cfl-2.localdomain (c-69-181-90-243.hsd1.ca.comcast.net. [69.181.90.243]) by smtp.gmail.com with ESMTPSA id 21sm2023670pfw.36.2020.10.27.04.02.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2020 04:02:42 -0700 (PDT) Received: from gnu-cfl-2.localdomain (localhost [IPv6:::1]) by gnu-cfl-2.localdomain (Postfix) with ESMTP id 678CE1A013F for ; Tue, 27 Oct 2020 04:02:36 -0700 (PDT) From: "H.J. Lu" To: binutils@sourceware.org Subject: [PATCH] Implement a workaround for GNU mak jobserver Date: Tue, 27 Oct 2020 04:02:35 -0700 Message-Id: <20201027110235.4137393-1-hjl.tools@gmail.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3041.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2020 11:02:47 -0000 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/aclocal.m4 | 1 + bfd/configure | 18 ++++++++++++++++++ bfd/configure.ac | 2 ++ binutils/aclocal.m4 | 1 + binutils/configure | 18 ++++++++++++++++++ binutils/configure.ac | 2 ++ config/jobserver.m4 | 24 ++++++++++++++++++++++++ gas/aclocal.m4 | 1 + gas/configure | 18 ++++++++++++++++++ gas/configure.ac | 2 ++ gprof/aclocal.m4 | 1 + gprof/configure | 18 ++++++++++++++++++ gprof/configure.ac | 2 ++ ld/aclocal.m4 | 1 + ld/configure | 18 ++++++++++++++++++ ld/configure.ac | 2 ++ libctf/aclocal.m4 | 1 + libctf/configure | 18 ++++++++++++++++++ libctf/configure.ac | 2 ++ opcodes/aclocal.m4 | 1 + opcodes/configure | 18 ++++++++++++++++++ opcodes/configure.ac | 2 ++ 22 files changed, 171 insertions(+) create mode 100644 config/jobserver.m4 diff --git a/bfd/aclocal.m4 b/bfd/aclocal.m4 index 4a6a47cab0..519325d4ae 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 12f4c88782..c518d9e5be 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 5ec4d4f0b4..b27b7fbec7 100644 --- a/bfd/configure.ac +++ b/bfd/configure.ac @@ -1144,3 +1144,5 @@ AC_SUBST(htmldir) AC_SUBST(pdfdir) AC_OUTPUT + +GNU_MAKE_JOBSERVER diff --git a/binutils/aclocal.m4 b/binutils/aclocal.m4 index 8bf2e9e242..8eca8cf94c 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 ae396af657..c4d19e406e 100755 --- a/binutils/configure +++ b/binutils/configure @@ -18027,3 +18027,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 883f3187e7..a72a46f478 100644 --- a/binutils/configure.ac +++ b/binutils/configure.ac @@ -479,3 +479,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/jobserver.m4 b/config/jobserver.m4 new file mode 100644 index 0000000000..dc566b1a1d --- /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/aclocal.m4 b/gas/aclocal.m4 index a9f9f5cc2d..70183124da 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 ac64b617dc..6b87cc2401 100755 --- a/gas/configure +++ b/gas/configure @@ -17777,3 +17777,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 8d968defb6..1b4c3dbd25 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/aclocal.m4 b/gprof/aclocal.m4 index 957655a8f9..671b7317df 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 72ef1b2a37..4aaab18a42 100755 --- a/gprof/configure +++ b/gprof/configure @@ -15085,3 +15085,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 e9f3682293..9e9f1d34f3 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/aclocal.m4 b/ld/aclocal.m4 index f6e87a228a..d1823c15d0 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 78df64f56c..947de62357 100755 --- a/ld/configure +++ b/ld/configure @@ -20641,3 +20641,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 7676009d91..073795f993 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/aclocal.m4 b/libctf/aclocal.m4 index df51584d83..4607d72856 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 699422151d..cd8d82e6f0 100755 --- a/libctf/configure +++ b/libctf/configure @@ -15791,3 +15791,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 575da4677f..e741a0b236 100644 --- a/libctf/configure.ac +++ b/libctf/configure.ac @@ -229,3 +229,5 @@ AC_SUBST(VERSION_FLAGS) AC_CONFIG_FILES(Makefile) AC_CONFIG_HEADERS(config.h) AC_OUTPUT + +GNU_MAKE_JOBSERVER diff --git a/opcodes/aclocal.m4 b/opcodes/aclocal.m4 index 36b1327569..5ab3cf3ab6 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 5127b802a6..aa0f943568 100755 --- a/opcodes/configure +++ b/opcodes/configure @@ -15490,3 +15490,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 00be9c88be..3a5e3c0c6f 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.26.2