From: "Arsen Arsenović" <arsen@aarsen.me>
To: gcc-patches@gcc.gnu.org
Cc: "Kévin Le Gouguec" <legouguec@adacore.com>,
"Arsen Arsenović" <arsen@aarsen.me>
Subject: [PATCH 1/3] toplevel: don't override gettext-runtime/configure-discovered build args
Date: Sat, 13 Apr 2024 23:58:02 +0200 [thread overview]
Message-ID: <20240414001113.1698685-2-arsen@aarsen.me> (raw)
In-Reply-To: <20240414001113.1698685-1-arsen@aarsen.me>
ChangeLog:
PR bootstrap/112534
* Makefile.def (host-gettext): Set all_args_override="".
* Makefile.in: Regenerate.
* Makefile.tpl (all--args): Define as a helper macro for
computing extra arguments to make.
(all): Use all--args over args.
---
Makefile.def | 2 ++
Makefile.in | 40 +++++++++++++++++++++-------------------
Makefile.tpl | 8 +++++---
3 files changed, 28 insertions(+), 22 deletions(-)
diff --git a/Makefile.def b/Makefile.def
index 19954e7d7318..d25edb6ed76d 100644
--- a/Makefile.def
+++ b/Makefile.def
@@ -76,6 +76,8 @@ host_modules= { module= gprof; };
host_modules= { module= gprofng; };
host_modules= { module= gettext; bootstrap=true; no_install=true;
module_srcdir= "gettext/gettext-runtime";
+ // Don't override configure-discovered build arguments
+ all_args_override="";
// We always build gettext with pic, because some packages (e.g. gdbserver)
// need it in some configuratons, which is determined via nontrivial tests.
// Always enabling pic seems to make sense for something tied to
diff --git a/Makefile.in b/Makefile.in
index db4fa6c62605..f71f515b7aa1 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -3174,6 +3174,8 @@ TAGS: do-TAGS
+
+
# --------------------------------------
# Modules which run on the build machine
# --------------------------------------
@@ -20195,7 +20197,7 @@ all-gettext: configure-gettext
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/gettext && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(STAGE1_FLAGS_TO_PASS) \
$(TARGET-gettext))
@endif gettext
@@ -20225,7 +20227,7 @@ all-stage1-gettext: configure-stage1-gettext
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) \
+ \
$(STAGE1_FLAGS_TO_PASS) \
TFLAGS="$(STAGE1_TFLAGS)" \
$(TARGET-stage1-gettext)
@@ -20240,7 +20242,7 @@ clean-stage1-gettext:
$(MAKE) stage1-start; \
fi; \
cd $(HOST_SUBDIR)/gettext && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(MAKE) \
$(STAGE1_FLAGS_TO_PASS) clean
@endif gettext-bootstrap
@@ -20270,7 +20272,7 @@ all-stage2-gettext: configure-stage2-gettext
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
TFLAGS="$(STAGE2_TFLAGS)" \
$(TARGET-stage2-gettext)
@@ -20284,7 +20286,7 @@ clean-stage2-gettext:
$(MAKE) stage2-start; \
fi; \
cd $(HOST_SUBDIR)/gettext && \
- $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
+ $(MAKE) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif gettext-bootstrap
@@ -20313,7 +20315,7 @@ all-stage3-gettext: configure-stage3-gettext
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
TFLAGS="$(STAGE3_TFLAGS)" \
$(TARGET-stage3-gettext)
@@ -20327,7 +20329,7 @@ clean-stage3-gettext:
$(MAKE) stage3-start; \
fi; \
cd $(HOST_SUBDIR)/gettext && \
- $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
+ $(MAKE) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif gettext-bootstrap
@@ -20356,7 +20358,7 @@ all-stage4-gettext: configure-stage4-gettext
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
TFLAGS="$(STAGE4_TFLAGS)" \
$(TARGET-stage4-gettext)
@@ -20370,7 +20372,7 @@ clean-stage4-gettext:
$(MAKE) stage4-start; \
fi; \
cd $(HOST_SUBDIR)/gettext && \
- $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
+ $(MAKE) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif gettext-bootstrap
@@ -20399,7 +20401,7 @@ all-stageprofile-gettext: configure-stageprofile-gettext
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
TFLAGS="$(STAGEprofile_TFLAGS)" \
$(TARGET-stageprofile-gettext)
@@ -20413,7 +20415,7 @@ clean-stageprofile-gettext:
$(MAKE) stageprofile-start; \
fi; \
cd $(HOST_SUBDIR)/gettext && \
- $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
+ $(MAKE) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif gettext-bootstrap
@@ -20442,7 +20444,7 @@ all-stagetrain-gettext: configure-stagetrain-gettext
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
TFLAGS="$(STAGEtrain_TFLAGS)" \
$(TARGET-stagetrain-gettext)
@@ -20456,7 +20458,7 @@ clean-stagetrain-gettext:
$(MAKE) stagetrain-start; \
fi; \
cd $(HOST_SUBDIR)/gettext && \
- $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
+ $(MAKE) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif gettext-bootstrap
@@ -20485,7 +20487,7 @@ all-stagefeedback-gettext: configure-stagefeedback-gettext
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
TFLAGS="$(STAGEfeedback_TFLAGS)" \
$(TARGET-stagefeedback-gettext)
@@ -20499,7 +20501,7 @@ clean-stagefeedback-gettext:
$(MAKE) stagefeedback-start; \
fi; \
cd $(HOST_SUBDIR)/gettext && \
- $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
+ $(MAKE) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif gettext-bootstrap
@@ -20528,7 +20530,7 @@ all-stageautoprofile-gettext: configure-stageautoprofile-gettext
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
TFLAGS="$(STAGEautoprofile_TFLAGS)" \
$(TARGET-stageautoprofile-gettext)
@@ -20542,7 +20544,7 @@ clean-stageautoprofile-gettext:
$(MAKE) stageautoprofile-start; \
fi; \
cd $(HOST_SUBDIR)/gettext && \
- $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
+ $(MAKE) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif gettext-bootstrap
@@ -20571,7 +20573,7 @@ all-stageautofeedback-gettext: configure-stageautofeedback-gettext
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
TFLAGS="$(STAGEautofeedback_TFLAGS)" PERF_DATA=perf.data \
$(TARGET-stageautofeedback-gettext)
@@ -20585,7 +20587,7 @@ clean-stageautofeedback-gettext:
$(MAKE) stageautofeedback-start; \
fi; \
cd $(HOST_SUBDIR)/gettext && \
- $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
+ $(MAKE) $(POSTSTAGE1_FLAGS_TO_PASS) clean
@endif gettext-bootstrap
diff --git a/Makefile.tpl b/Makefile.tpl
index 1d5813cd5695..dd3ec65036e3 100644
--- a/Makefile.tpl
+++ b/Makefile.tpl
@@ -1261,6 +1261,8 @@ configure-stage[+id+]-[+prefix+][+module+]:
[+ ENDIF bootstrap +]
[+ ENDDEF +]
+[+ DEFINE all--args +][+ (get "all_args_override" (get "args")) +][+ ENDDEF +]
+
[+ DEFINE all +]
.PHONY: all-[+prefix+][+module+] maybe-all-[+prefix+][+module+]
maybe-all-[+prefix+][+module+]:
@@ -1277,7 +1279,7 @@ all-[+prefix+][+module+]: configure-[+prefix+][+module+][+ IF bootstrap +][+ ELS
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
[+exports+] [+extra_exports+] \
(cd [+subdir+]/[+module+] && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) [+args+] [+stage1_args+] [+extra_make_flags+] \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) [+all--args+] [+stage1_args+] [+extra_make_flags+] \
$(TARGET-[+prefix+][+module+]))
@endif [+prefix+][+module+]
@@ -1312,7 +1314,7 @@ all-stage[+id+]-[+prefix+][+module+]: configure-stage[+id+]-[+prefix+][+module+]
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- [+args+] [+IF prev +][+poststage1_args+][+ ELSE prev +] \
+ [+all--args+] [+IF prev +][+poststage1_args+][+ ELSE prev +] \
[+stage1_args+][+ ENDIF prev +] [+extra_make_flags+] \
TFLAGS="$(STAGE[+id+]_TFLAGS)" [+profile_data+] \
$(TARGET-stage[+id+]-[+prefix+][+module+])
@@ -1327,7 +1329,7 @@ clean-stage[+id+]-[+prefix+][+module+]:
$(MAKE) stage[+id+]-start; \
fi; \
cd [+subdir+]/[+module+] && \
- $(MAKE) [+args+] [+ IF prev +][+poststage1_args+][+ ELSE prev +] \
+ $(MAKE) [+all--args+] [+ IF prev +][+poststage1_args+][+ ELSE prev +] \
[+stage1_args+][+ ENDIF prev +] [+extra_make_flags+] clean
@endif [+prefix+][+module+]-bootstrap
--
2.44.0
next prev parent reply other threads:[~2024-04-14 0:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-13 21:58 [PATCH 0/3] Recover in-tree libiconv build support Arsen Arsenović
2024-04-13 21:58 ` Arsen Arsenović [this message]
2024-04-13 21:58 ` [PATCH 2/3] gitignore: ignore /libiconv* Arsen Arsenović
2024-04-13 21:58 ` [PATCH 3/3] *: support in-tree libiconv again Arsen Arsenović
2024-04-18 16:41 ` [PATCH 0/3] Recover in-tree libiconv build support Kévin Le Gouguec
2024-05-04 18:48 ` Ping: " Arsen Arsenović
2024-06-15 12:50 ` Ping^2: " Arsen Arsenović
2024-07-08 0:30 ` Ping^3: " Arsen Arsenović
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=20240414001113.1698685-2-arsen@aarsen.me \
--to=arsen@aarsen.me \
--cc=gcc-patches@gcc.gnu.org \
--cc=legouguec@adacore.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).