Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@efficios.com>
To: gdb-patches@sourceware.org
Cc: Simon Marchi <simon.marchi@efficios.com>
Subject: [PATCH 5/7] gdb, gdbserver: remove the .NOEXPORT target
Date: Mon, 31 Aug 2026 14:51:44 -0400	[thread overview]
Message-ID: <20260831185300.572297-6-simon.marchi@efficios.com> (raw)
In-Reply-To: <20260831185300.572297-1-simon.marchi@efficios.com>

gdb/Makefile.in and gdbserver/Makefile.in both contain:

    # GNU Make has an annoying habit of putting *all* the Makefile variables
    # into the environment, unless you include this target as a circumvention.
    # Rumor is that this will be fixed (and this target can be removed)
    # in GNU Make 4.0.
    .NOEXPORT:

This was introduced in gdb in commit 625453dcfda0 ("Merge in irix
support", 1991-08-31), and copied to gdbserver's Makefile.in when it was
created, in commit c033ec179a2a (1993-08-27).

It was a legitimate workaround at the time, but only for a few months.
GNU make commit b8d48ad379dc, from 1992-05-03, removed the handling of
.NOEXPORT:

    -  int noexport = enter_file (".NOEXPORT")->is_target;
    ...
    -	      /* If `.NOEXPORT' was specified, only export command-line and
    -		 environment variables.  This is a temporary (very ugly) hack
    -		 until I fix this problem the right way in version 4.  Ick.  */

So .NOEXPORT has done nothing for any GNU make for a very long time,
remove it.

Change-Id: I173807df18447d3ae2f6728ccb711d43d1f9d307
---
 gdb/Makefile.in       | 6 ------
 gdbserver/Makefile.in | 6 ------
 2 files changed, 12 deletions(-)

diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index cdf73ec708e0..74361808bf5a 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -2604,12 +2604,6 @@ gdb.cxref: $(SFILES)
 
 force_update:
 
-# GNU Make has an annoying habit of putting *all* the Makefile variables
-# into the environment, unless you include this target as a circumvention.
-# Rumor is that this will be fixed (and this target can be removed)
-# in GNU Make 4.0.
-.NOEXPORT:
-
 # GNU Make 3.63 has a different problem: it keeps tacking command line
 # overrides onto the definition of $(MAKE).  This variable setting
 # will remove them.
diff --git a/gdbserver/Makefile.in b/gdbserver/Makefile.in
index 7c6ab64196e2..5054597bf6ef 100644
--- a/gdbserver/Makefile.in
+++ b/gdbserver/Makefile.in
@@ -473,12 +473,6 @@ stamp-xml: $(XML_DIR)/feature_to_c.sh Makefile $(XML_FILES)
 
 .PRECIOUS: xml-builtin.cc
 
-# GNU Make has an annoying habit of putting *all* the Makefile variables
-# into the environment, unless you include this target as a circumvention.
-# Rumor is that this will be fixed (and this target can be removed)
-# in GNU Make 4.0.
-.NOEXPORT:
-
 # GNU Make 3.63 has a different problem: it keeps tacking command line
 # overrides onto the definition of $(MAKE).  This variable setting
 # will remove them.
-- 
2.55.0


  parent reply	other threads:[~2026-08-31 18:53 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-31 18:51 [PATCH 0/7] Some Makefile cleanups Simon Marchi
2026-08-31 18:51 ` [PATCH 1/7] gdb: update README about the GNU make requirement Simon Marchi
2026-09-01 12:26   ` Eli Zaretskii
2026-09-01 13:36     ` Simon Marchi
2026-08-31 18:51 ` [PATCH 2/7] gdb, gdbserver: require gcc-style dependency generation, drop the depcomp fallback Simon Marchi
2026-09-01 16:32   ` Tom Tromey
2026-09-01 20:16     ` Simon Marchi
2026-09-02  7:37       ` Rainer Orth
2026-09-02 12:26         ` Simon Marchi
2026-08-31 18:51 ` [PATCH 3/7] gdbserver: fix missing dependency tracking for gdbreplay.o Simon Marchi
2026-09-01 16:33   ` Tom Tromey
2026-08-31 18:51 ` [PATCH 4/7] gdb, gdbserver: always use order-only prerequisites for generated files Simon Marchi
2026-09-01 16:34   ` Tom Tromey
2026-08-31 18:51 ` Simon Marchi [this message]
2026-09-01 16:37   ` [PATCH 5/7] gdb, gdbserver: remove the .NOEXPORT target Tom Tromey
2026-08-31 18:51 ` [PATCH 6/7] gdb: remove the explicit ada-exp.o rule Simon Marchi
2026-09-01 16:38   ` Tom Tromey
2026-08-31 18:51 ` [PATCH 7/7] gdb, gdbserver: create the dependency directories from the Makefiles Simon Marchi
2026-09-01 16:47   ` Tom Tromey
2026-09-01 20:18     ` Simon Marchi
2026-09-01 20:37       ` Simon Marchi
2026-09-02 18:36         ` Tom Tromey
2026-09-03 13:45           ` Simon Marchi

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=20260831185300.572297-6-simon.marchi@efficios.com \
    --to=simon.marchi@efficios.com \
    --cc=gdb-patches@sourceware.org \
    /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