From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16867 invoked by alias); 8 Sep 2014 15:57:00 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 16853 invoked by uid 89); 8 Sep 2014 15:57:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.6 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 X-HELO: mailout4.w1.samsung.com Received: from mailout4.w1.samsung.com (HELO mailout4.w1.samsung.com) (210.118.77.14) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (DES-CBC3-SHA encrypted) ESMTPS; Mon, 08 Sep 2014 15:56:56 +0000 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NBL00LW1B3HAL30@mailout4.w1.samsung.com> for gcc-patches@gcc.gnu.org; Mon, 08 Sep 2014 16:59:41 +0100 (BST) Received: from eusync3.samsung.com ( [203.254.199.213]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 77.60.15956.4C1DD045; Mon, 08 Sep 2014 16:56:52 +0100 (BST) Received: from [106.109.130.31] by eusync3.samsung.com (Oracle Communications Messaging Server 7u4-23.01(7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0NBL00ATIAYR5JB0@eusync3.samsung.com>; Mon, 08 Sep 2014 16:56:52 +0100 (BST) Message-id: <540DD1C2.30500@partner.samsung.com> Date: Mon, 08 Sep 2014 15:57:00 -0000 From: Maxim Ostapenko User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-version: 1.0 To: Jakub Jelinek Cc: GCC Patches , Yury Gribov , Slava Garbuzov , Bernhard Reutner-Fischer Subject: [Ping][PATCH] Fix libbacktrace and libiberty tests fail on sanitized GCC due to wrong link options. References: <54042F45.2090002@partner.samsung.com> In-reply-to: <54042F45.2090002@partner.samsung.com> X-Forwarded-Message-Id: <54042F45.2090002@partner.samsung.com> Content-type: multipart/mixed; boundary=------------050704060507090608000009 X-IsSubscribed: yes X-SW-Source: 2014-09/txt/msg00613.txt.bz2 This is a multi-part message in MIME format. --------------050704060507090608000009 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 2703 Ping. -------- Original Message -------- Subject: Re: [PATCH] Fix libbacktrace and libiberty tests fail on sanitized GCC due to wrong link options. Date: Mon, 01 Sep 2014 12:33:09 +0400 From: Maxim Ostapenko To: Jakub Jelinek CC: Bernhard Reutner-Fischer , Yury Gribov , GCC Patches , Slava Garbuzov On 09/01/2014 11:29 AM, Jakub Jelinek wrote: > On Mon, Sep 01, 2014 at 11:19:07AM +0400, Maxim Ostapenko wrote: >> libiberty/ChangeLog: >> >> 2014-09-01 Max Ostapenko >> >> * testsuite/Makefile.in(LIBCFLAGS): Add LDFLAGS. > Space before (. Ugh, sorry. > >> # Flags to pass down to makes which are built with the target environment. >> # The double $ decreases the length of the command line; those variables >> # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them. The >> @@ -3518,9 +3526,9 @@ check-bfd: >> @: $(MAKE); $(unstage) >> @r=`${PWD_COMMAND}`; export r; \ >> s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ >> - $(HOST_EXPORTS) \ >> + $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \ >> (cd $(HOST_SUBDIR)/bfd && \ >> - $(MAKE) $(FLAGS_TO_PASS) check) >> + $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check) > I'd put the double space right before check instead of in between > different flags, or use a single space everywhere. Here the first space appears because extra_make_flags (EXTRA_GCC_FLAGS) is empty and autogen replaces this with a space. Removing the second one will lead to concatinating of $(EXTRA_GCC_FLAGS) and $(EXTRA_BOOTSTRAP_FLAGS). I know, two spaces look ugly, but is there more convenient way to avoid this? >> @@ -4392,9 +4400,9 @@ check-opcodes: >> @: $(MAKE); $(unstage) >> @r=`${PWD_COMMAND}`; export r; \ >> s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ >> - $(HOST_EXPORTS) \ >> + $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \ >> (cd $(HOST_SUBDIR)/opcodes && \ >> - $(MAKE) $(FLAGS_TO_PASS) check) >> + $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check) > Ditto etc. > >> @@ -6138,7 +6146,7 @@ check-cgen: >> @: $(MAKE); $(unstage) >> @r=`${PWD_COMMAND}`; export r; \ >> s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ >> - $(HOST_EXPORTS) \ >> + $(HOST_EXPORTS) \ > Why? This is pretty the same. For all libs, that wouldn't be bootstrapped, autogen inserts a space instead of $(EXTRA_HOST_EXPORTS). Perhaps I should always insert $(EXTRA_HOST_EXPORTS) and $(EXTRA_BOOTSTRAP_FLAGS) with empty/nonempty values instead of tracking libraries, that would/wouldn't be bootstrapped? -Maxim > Jakub > --------------050704060507090608000009 Content-Type: text/x-patch; name="host_libs_fix_3.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="host_libs_fix_3.diff" Content-length: 16673 libiberty/ChangeLog: 2014-09-01 Max Ostapenko * testsuite/Makefile.in (LIBCFLAGS): Add LDFLAGS. ChangeLog: 2014-09-01 Max Ostapenko * Makefile.tpl (EXTRA_HOST_EXPORTS): New variables. (EXTRA_BOOTSTRAP_FLAGS): Likewise. (check-[+module+]): Add EXTRA_HOST_EXPORTS and EXTRA_BOOTSTRAP_FLAGS. * Makefile.in: Regenerate. diff --git a/Makefile.in b/Makefile.in index add8cf6..b0917e3 100644 --- a/Makefile.in +++ b/Makefile.in @@ -830,6 +830,14 @@ POSTSTAGE1_FLAGS_TO_PASS = \ HOST_LIBS="$${HOST_LIBS}" \ "`echo 'ADAFLAGS=$(BOOT_ADAFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" +@if gcc-bootstrap +EXTRA_HOST_EXPORTS = if [ $(current_stage) != stage1 ]; then \ + $(POSTSTAGE1_HOST_EXPORTS) \ + fi ; + +EXTRA_BOOTSTRAP_FLAGS = CC="$$CC" CXX="$$CXX" LDFLAGS="$$LDFLAGS" +@endif gcc-bootstrap + # Flags to pass down to makes which are built with the target environment. # The double $ decreases the length of the command line; those variables # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them. The @@ -3518,9 +3526,9 @@ check-bfd: @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ + $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/bfd && \ - $(MAKE) $(FLAGS_TO_PASS) check) + $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check) @endif bfd @@ -4392,9 +4400,9 @@ check-opcodes: @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ + $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/opcodes && \ - $(MAKE) $(FLAGS_TO_PASS) check) + $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check) @endif opcodes @@ -5266,9 +5274,9 @@ check-binutils: @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ + $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/binutils && \ - $(MAKE) $(FLAGS_TO_PASS) check) + $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check) @endif binutils @@ -5696,9 +5704,9 @@ check-bison: @if [ '$(host)' = '$(target)' ] ; then \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ + $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/bison && \ - $(MAKE) $(FLAGS_TO_PASS) check); \ + $(MAKE) $(FLAGS_TO_PASS) check) fi @endif bison @@ -6138,7 +6146,7 @@ check-cgen: @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ + $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/cgen && \ $(MAKE) $(FLAGS_TO_PASS) check) @@ -6579,7 +6587,7 @@ check-dejagnu: @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ + $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/dejagnu && \ $(MAKE) $(FLAGS_TO_PASS) check) @@ -7020,7 +7028,7 @@ check-etc: @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ + $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/etc && \ $(MAKE) $(FLAGS_TO_PASS) check) @@ -7463,9 +7471,9 @@ check-fastjar: @if [ '$(host)' = '$(target)' ] ; then \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ + $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/fastjar && \ - $(MAKE) $(FLAGS_TO_PASS) check); \ + $(MAKE) $(FLAGS_TO_PASS) check) fi @endif fastjar @@ -8351,9 +8359,9 @@ check-fixincludes: @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ + $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/fixincludes && \ - $(MAKE) $(FLAGS_TO_PASS) check) + $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check) @endif fixincludes @@ -8766,9 +8774,9 @@ check-flex: @if [ '$(host)' = '$(target)' ] ; then \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ + $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/flex && \ - $(MAKE) $(FLAGS_TO_PASS) check); \ + $(MAKE) $(FLAGS_TO_PASS) check) fi @endif flex @@ -9654,9 +9662,9 @@ check-gas: @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ + $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/gas && \ - $(MAKE) $(FLAGS_TO_PASS) check) + $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check) @endif gas @@ -10528,9 +10536,9 @@ check-gcc: @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ + $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/gcc && \ - $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) check) + $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) $(EXTRA_BOOTSTRAP_FLAGS) check) @endif gcc @@ -11408,9 +11416,9 @@ check-gmp: @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ + $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/gmp && \ - $(MAKE) $(FLAGS_TO_PASS) check) + $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check) @endif gmp @@ -12276,9 +12284,9 @@ check-mpfr: @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ + $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/mpfr && \ - $(MAKE) $(FLAGS_TO_PASS) check) + $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check) @endif mpfr @@ -13144,9 +13152,9 @@ check-mpc: @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ + $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/mpc && \ - $(MAKE) $(FLAGS_TO_PASS) check) + $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check) @endif mpc @@ -14012,9 +14020,9 @@ check-isl: @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ + $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/isl && \ - $(MAKE) $(FLAGS_TO_PASS) V=1 check) + $(MAKE) $(FLAGS_TO_PASS) V=1 $(EXTRA_BOOTSTRAP_FLAGS) check) @endif isl @@ -14880,9 +14888,9 @@ check-cloog: @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ + $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/cloog && \ - $(MAKE) $(FLAGS_TO_PASS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1 check) + $(MAKE) $(FLAGS_TO_PASS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1 $(EXTRA_BOOTSTRAP_FLAGS) check) @endif cloog @@ -15748,9 +15756,9 @@ check-libelf: @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ + $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/libelf && \ - $(MAKE) $(FLAGS_TO_PASS) check) + $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check) @endif libelf @@ -16610,9 +16618,9 @@ check-gold: @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ + $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/gold && \ - $(MAKE) $(FLAGS_TO_PASS) check) + $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check) @endif gold @@ -17038,7 +17046,7 @@ check-gprof: @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ + $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/gprof && \ $(MAKE) $(FLAGS_TO_PASS) check) @@ -17925,9 +17933,9 @@ check-intl: @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ + $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/intl && \ - $(MAKE) $(FLAGS_TO_PASS) check) + $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check) @endif intl @@ -18353,7 +18361,7 @@ check-tcl: @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ + $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/tcl && \ $(MAKE) $(FLAGS_TO_PASS) check) @@ -18779,7 +18787,7 @@ check-itcl: @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ + $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/itcl && \ $(MAKE) $(FLAGS_TO_PASS) check) @@ -19666,9 +19674,9 @@ check-ld: @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ + $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/ld && \ - $(MAKE) $(FLAGS_TO_PASS) check) + $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check) @endif ld @@ -20540,9 +20548,9 @@ check-libbacktrace: @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ + $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/libbacktrace && \ - $(MAKE) $(FLAGS_TO_PASS) check) + $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check) @endif libbacktrace @@ -21414,9 +21422,9 @@ check-libcpp: @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ + $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/libcpp && \ - $(MAKE) $(FLAGS_TO_PASS) check) + $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check) @endif libcpp @@ -22288,9 +22296,9 @@ check-libdecnumber: @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ + $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/libdecnumber && \ - $(MAKE) $(FLAGS_TO_PASS) check) + $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check) @endif libdecnumber @@ -22716,7 +22724,7 @@ check-libgui: @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ + $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/libgui && \ $(MAKE) $(FLAGS_TO_PASS) check) @@ -23609,9 +23617,9 @@ check-libiberty: @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ + $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/libiberty && \ - $(MAKE) $(FLAGS_TO_PASS) check) + $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check) @endif libiberty @@ -24489,9 +24497,9 @@ check-libiberty-linker-plugin: @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ + $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/libiberty-linker-plugin && \ - $(MAKE) $(FLAGS_TO_PASS) @extra_linker_plugin_flags@ check) + $(MAKE) $(FLAGS_TO_PASS) @extra_linker_plugin_flags@ $(EXTRA_BOOTSTRAP_FLAGS) check) @endif libiberty-linker-plugin @@ -24917,7 +24925,7 @@ check-libiconv: @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ + $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/libiconv && \ $(MAKE) $(FLAGS_TO_PASS) check) @@ -25295,7 +25303,7 @@ check-m4: @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ + $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/m4 && \ $(MAKE) $(FLAGS_TO_PASS) check) @@ -25736,7 +25744,7 @@ check-readline: @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ + $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/readline && \ $(MAKE) $(FLAGS_TO_PASS) check) @@ -26177,7 +26185,7 @@ check-sid: @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ + $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/sid && \ $(MAKE) $(FLAGS_TO_PASS) check) @@ -26618,7 +26626,7 @@ check-sim: @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ + $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/sim && \ $(MAKE) $(FLAGS_TO_PASS) check) @@ -27059,7 +27067,7 @@ check-texinfo: @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ + $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/texinfo && \ $(MAKE) $(FLAGS_TO_PASS) check) @@ -28344,7 +28352,7 @@ check-gdb: @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ + $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/gdb && \ $(MAKE) $(FLAGS_TO_PASS) check) @@ -28785,7 +28793,7 @@ check-expect: @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ + $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/expect && \ $(MAKE) $(FLAGS_TO_PASS) check) @@ -29226,7 +29234,7 @@ check-guile: @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ + $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/guile && \ $(MAKE) $(FLAGS_TO_PASS) check) @@ -29667,7 +29675,7 @@ check-tk: @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ + $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/tk && \ $(MAKE) $(FLAGS_TO_PASS) check) @@ -30918,7 +30926,7 @@ check-gnattools: @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ + $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/gnattools && \ $(MAKE) $(FLAGS_TO_PASS) check) @@ -31811,9 +31819,9 @@ check-lto-plugin: @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ + $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/lto-plugin && \ - $(MAKE) $(FLAGS_TO_PASS) @extra_linker_plugin_flags@ check) + $(MAKE) $(FLAGS_TO_PASS) @extra_linker_plugin_flags@ $(EXTRA_BOOTSTRAP_FLAGS) check) @endif lto-plugin diff --git a/Makefile.tpl b/Makefile.tpl index 00dba36..022f746 100644 --- a/Makefile.tpl +++ b/Makefile.tpl @@ -635,6 +635,14 @@ POSTSTAGE1_FLAGS_TO_PASS = \ HOST_LIBS="$${HOST_LIBS}" \ "`echo 'ADAFLAGS=$(BOOT_ADAFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" +@if gcc-bootstrap +EXTRA_HOST_EXPORTS = if [ $(current_stage) != stage1 ]; then \ + $(POSTSTAGE1_HOST_EXPORTS) \ + fi ; + +EXTRA_BOOTSTRAP_FLAGS = CC="$$CC" CXX="$$CXX" LDFLAGS="$$LDFLAGS" +@endif gcc-bootstrap + # Flags to pass down to makes which are built with the target environment. # The double $ decreases the length of the command line; those variables # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them. The @@ -1187,18 +1195,22 @@ check-[+module+]: @if [ '$(host)' = '$(target)' ] ; then \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ + $(HOST_EXPORTS) [+ IF bootstrap +]$(EXTRA_HOST_EXPORTS)[+ + ENDIF bootstrap +] \ (cd $(HOST_SUBDIR)/[+module+] && \ - $(MAKE) $(FLAGS_TO_PASS) [+extra_make_flags+] check); \ + $(MAKE) $(FLAGS_TO_PASS) [+extra_make_flags+][+ + IF bootstrap +] $(EXTRA_BOOTSTRAP_FLAGS)[+ ENDIF bootstrap +] check) fi [+ ELSE check +] check-[+module+]: @: $(MAKE); $(unstage) @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ + $(HOST_EXPORTS) [+ IF bootstrap +]$(EXTRA_HOST_EXPORTS)[+ + ENDIF bootstrap +] \ (cd $(HOST_SUBDIR)/[+module+] && \ - $(MAKE) $(FLAGS_TO_PASS) [+extra_make_flags+] check) + $(MAKE) $(FLAGS_TO_PASS) [+extra_make_flags+][+ + IF bootstrap +] $(EXTRA_BOOTSTRAP_FLAGS)[+ ENDIF bootstrap +] check) [+ ENDIF no_check +] @endif [+module+] diff --git a/libiberty/testsuite/Makefile.in b/libiberty/testsuite/Makefile.in index d23c09c..ef693c2 100644 --- a/libiberty/testsuite/Makefile.in +++ b/libiberty/testsuite/Makefile.in @@ -33,7 +33,7 @@ SHELL = @SHELL@ CC = @CC@ CFLAGS = @CFLAGS@ -LIBCFLAGS = $(CFLAGS) +LIBCFLAGS = $(CFLAGS) $(LDFLAGS) # Multilib support variables. MULTISRCTOP = --------------050704060507090608000009--