Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Christian Biesinger via gdb-patches" <gdb-patches@sourceware.org>
To: gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Don't override various Makefile variables for gnulib et al
Date: Wed, 29 Jan 2020 14:07:00 -0000	[thread overview]
Message-ID: <CAPTJ0XFsvSUz8K5K=WAJ7MrTgkPRqT6LOkLgmAf3c3STYu7ncw@mail.gmail.com> (raw)
In-Reply-To: <20191122233003.211567-1-cbiesinger@google.com>

Ping

On Sat, Nov 23, 2019 at 12:30 AM Christian Biesinger
<cbiesinger@google.com> 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  <cbiesinger@google.com>
>
>         * 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
>


  parent reply	other threads:[~2020-01-29 14:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-22 23:30 Christian Biesinger via gdb-patches
2019-11-26 18:01 ` [PATCH] add file desc to gdbserver client_state Stan Cox
2019-12-13 23:13   ` Tom Tromey
2019-12-24  4:42     ` Stan Cox
2020-01-24 18:21       ` Tom Tromey
2020-02-06 19:41       ` Stan Cox
2020-01-29 14:07 ` Christian Biesinger via gdb-patches [this message]
2020-01-29 14:10 ` [PATCH] Don't override various Makefile variables for gnulib et al Christian Biesinger via gdb-patches
2020-02-12 21:16   ` Christian Biesinger via gdb-patches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPTJ0XFsvSUz8K5K=WAJ7MrTgkPRqT6LOkLgmAf3c3STYu7ncw@mail.gmail.com' \
    --to=gdb-patches@sourceware.org \
    --cc=cbiesinger@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox