From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22604 invoked by alias); 12 Feb 2020 21:16:26 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 22576 invoked by uid 89); 12 Feb 2020 21:16:24 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-29.5 required=5.0 tests=AWL,BAYES_00,ENV_AND_HDR_SPF_MATCH,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS,USER_IN_DEF_SPF_WL autolearn=ham version=3.3.1 spammy=disable-nls, disablenls, non-gcc, nonGCC X-HELO: mail-ot1-f66.google.com Received: from mail-ot1-f66.google.com (HELO mail-ot1-f66.google.com) (209.85.210.66) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 12 Feb 2020 21:16:22 +0000 Received: by mail-ot1-f66.google.com with SMTP id j20so3437234otq.3 for ; Wed, 12 Feb 2020 13:16:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=rH5i/NN7mkAsXyWQUCzq60LFIsBiV7dgvbUDcw7YnC8=; b=RaRRXJw13jmLWNy26cRrUt51tsY7WOJeQD+0/H07OmuxryCWlDiwiNTbY4J5JtcGY5 s9iM33cmcznbNw9HNm47ZsGwGzHWdLEH9On8Q4YV/8ReKv/DmY2LUYolCdqI4EdzpmYR LEUjYeg5658mJ+lxoLqLBwDlJcac/zaZ3aFv9QIgy6f7KfP11f6e1Uy4axfzLEi/4cxu hms0tnNcbQGsVB1qSNH75xm5iv3huysVZDxtfKo6Rv0JUnL/mSfPDRU7dGdA6HrlydyR bYEJBql9id3INUsnvX9mmbEmye934pPQ3vSF8okV3oUM1EFwcUgq7LURXwSTFN3vy59S EKZA== MIME-Version: 1.0 References: <20191122233003.211567-1-cbiesinger@google.com> In-Reply-To: From: "Christian Biesinger via gdb-patches" Reply-To: Christian Biesinger Date: Wed, 12 Feb 2020 21:16:00 -0000 Message-ID: Subject: Re: [PATCH] Don't override various Makefile variables for gnulib et al To: gdb-patches , Christian Biesinger via gcc-patches Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2020-02/txt/msg00462.txt.bz2 Ping On Wed, Jan 29, 2020 at 8:07 AM Christian Biesinger wrote: > > Ping > > On Sat, Nov 23, 2019 at 12:30 AM Christian Biesinger > wrote: > > > > Normally the toplevel Makefile will pass various CC=foo and other > > flags down to subdir Makefiles. However, for Gnulib this is a problem > > because Gnulib's configure specifically sets CC to something that > > includes a -std=gnu11 flag on some systems, and this override would > > set it back to CC=gcc, leading to compile errors in a GDB build > > with an updated Gnulib. > > > > I don't believe this is needed outside of GCC, so this patch changes > > Gnulib and other non-GCC modules to just not override any flags -- > > the values set during configure time should be fine. If a user > > overrides them manually when invoking make, those will still work. > > > > Under the same condition, I also removed the host_exports. I don't > > understand why this is ever necessary (this is only after configure > > has run). > > > > The other option is to clear MAKEOVERRIDES in gnulib/Makefile.am, but > > that means the user can't override any variables for this subdirectory. > > > > ChangeLog: > > > > 2019-11-22 Christian Biesinger > > > > * Makefile.def: Pass no_exports_and_flags to various non-GCC > > modules. > > * Makefile.in: Allow passing a no_exports_and_flags argument to > > "all" to suppress emitting exports and make flags. Useful when > > invoked via host_modules from Makefile.def. > > * Makefile.tpl: Regenerate. > > > > Change-Id: I7d80328cf81c133ba6157eec7d10c422b6790723 > > --- > > Makefile.def | 12 ++++++------ > > Makefile.in | 30 ++++++++++++------------------ > > Makefile.tpl | 9 ++++++--- > > 3 files changed, 24 insertions(+), 27 deletions(-) > > > > diff --git a/Makefile.def b/Makefile.def > > index 311feb9de3..e1ff065202 100644 > > --- a/Makefile.def > > +++ b/Makefile.def > > @@ -33,7 +33,7 @@ build_modules= { module= fixincludes; }; > > build_modules= { module= libcpp; > > extra_configure_flags='--disable-nls am_cv_func_iconv=no';}; > > > > -host_modules= { module= bfd; bootstrap=true; }; > > +host_modules= { module= bfd; bootstrap=true; no_exports_and_flags=true; }; > > host_modules= { module= opcodes; bootstrap=true; }; > > host_modules= { module= binutils; bootstrap=true; }; > > host_modules= { module= bison; no_check_cross= true; }; > > @@ -105,15 +105,15 @@ host_modules= { module= libiconv; > > missing= install-html; > > missing= install-info; }; > > host_modules= { module= m4; }; > > -host_modules= { module= readline; }; > > +host_modules= { module= readline; no_exports_and_flags=true; }; > > host_modules= { module= sid; }; > > -host_modules= { module= sim; }; > > +host_modules= { module= sim; no_exports_and_flags=true; }; > > host_modules= { module= texinfo; no_install= true; }; > > host_modules= { module= zlib; no_install=true; no_check=true; > > bootstrap=true; > > extra_configure_flags='@extra_host_zlib_configure_flags@';}; > > -host_modules= { module= gnulib; }; > > -host_modules= { module= gdb; }; > > +host_modules= { module= gnulib; no_exports_and_flags=true; }; > > +host_modules= { module= gdb; no_exports_and_flags=true; }; > > host_modules= { module= expect; }; > > host_modules= { module= guile; }; > > host_modules= { module= tk; }; > > @@ -129,7 +129,7 @@ host_modules= { module= lto-plugin; bootstrap=true; > > extra_make_flags='@extra_linker_plugin_flags@'; }; > > host_modules= { module= libcc1; extra_configure_flags=--enable-shared; }; > > host_modules= { module= gotools; }; > > -host_modules= { module= libctf; no_check=true; > > +host_modules= { module= libctf; no_check=true; no_exports_and_flags=true; > > bootstrap=true; }; > > > > target_modules = { module= libstdc++-v3; > > diff --git a/Makefile.in b/Makefile.in > > index 1aabf6ede4..bd41753543 100644 > > --- a/Makefile.in > > +++ b/Makefile.in > > @@ -3414,10 +3414,9 @@ maybe-all-bfd: all-bfd > > all-bfd: configure-bfd > > @r=`${PWD_COMMAND}`; export r; \ > > s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ > > - $(HOST_EXPORTS) \ > > + \ > > (cd $(HOST_SUBDIR)/bfd && \ > > - $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \ > > - $(TARGET-bfd)) > > + $(MAKE) $(TARGET-bfd)) > > @endif bfd > > > > > > @@ -25530,10 +25529,9 @@ all-readline: configure-readline > > @: $(MAKE); $(unstage) > > @r=`${PWD_COMMAND}`; export r; \ > > s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ > > - $(HOST_EXPORTS) \ > > + \ > > (cd $(HOST_SUBDIR)/readline && \ > > - $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \ > > - $(TARGET-readline)) > > + $(MAKE) $(TARGET-readline)) > > @endif readline > > > > > > @@ -26412,10 +26410,9 @@ all-sim: configure-sim > > @: $(MAKE); $(unstage) > > @r=`${PWD_COMMAND}`; export r; \ > > s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ > > - $(HOST_EXPORTS) \ > > + \ > > (cd $(HOST_SUBDIR)/sim && \ > > - $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \ > > - $(TARGET-sim)) > > + $(MAKE) $(TARGET-sim)) > > @endif sim > > > > > > @@ -28150,10 +28147,9 @@ all-gnulib: configure-gnulib > > @: $(MAKE); $(unstage) > > @r=`${PWD_COMMAND}`; export r; \ > > s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ > > - $(HOST_EXPORTS) \ > > + \ > > (cd $(HOST_SUBDIR)/gnulib && \ > > - $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \ > > - $(TARGET-gnulib)) > > + $(MAKE) $(TARGET-gnulib)) > > @endif gnulib > > > > > > @@ -28591,10 +28587,9 @@ all-gdb: configure-gdb > > @: $(MAKE); $(unstage) > > @r=`${PWD_COMMAND}`; export r; \ > > s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ > > - $(HOST_EXPORTS) \ > > + \ > > (cd $(HOST_SUBDIR)/gdb && \ > > - $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \ > > - $(TARGET-gdb)) > > + $(MAKE) $(TARGET-gdb)) > > @endif gdb > > > > > > @@ -33571,10 +33566,9 @@ maybe-all-libctf: all-libctf > > all-libctf: configure-libctf > > @r=`${PWD_COMMAND}`; export r; \ > > s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ > > - $(HOST_EXPORTS) \ > > + \ > > (cd $(HOST_SUBDIR)/libctf && \ > > - $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \ > > - $(TARGET-libctf)) > > + $(MAKE) $(TARGET-libctf)) > > @endif libctf > > > > > > diff --git a/Makefile.tpl b/Makefile.tpl > > index 5b118a8ba4..876ecf8dbd 100644 > > --- a/Makefile.tpl > > +++ b/Makefile.tpl > > @@ -1126,10 +1126,13 @@ all-[+prefix+][+module+]: configure-[+prefix+][+module+][+ IF bootstrap +][+ ELS > > @: $(MAKE); $(unstage)[+ ENDIF bootstrap +] > > @r=`${PWD_COMMAND}`; export r; \ > > s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ > > - [+exports+] [+extra_exports+] \ > > + [+ IF no_exports_and_flags +][+ ELSE > > + +][+exports+] [+extra_exports+][+ > > + ENDIF no_exports_and_flags +] \ > > (cd [+subdir+]/[+module+] && \ > > - $(MAKE) $(BASE_FLAGS_TO_PASS) [+args+] [+stage1_args+] [+extra_make_flags+] \ > > - $(TARGET-[+prefix+][+module+])) > > + $(MAKE) [+ IF no_exports_and_flags +][+ ELSE > > + +]$(BASE_FLAGS_TO_PASS) [+args+] [+stage1_args+] [+extra_make_flags+] \ > > + [+ ENDIF no_exports_and_flags +]$(TARGET-[+prefix+][+module+])) > > @endif [+prefix+][+module+] > > > > [+ IF bootstrap +] > > > > base-commit: 987012b89bce7f6385ed88585547f852a8005a3f > > -- > > 2.24.0.432.g9d3f5f5b63-goog > >