public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] toplevel: don't override gettext-runtime/configure-discovered build args
@ 2023-12-21 19:19 Arsen Arsenović
  2023-12-30 12:21 ` Ping: " Arsen Arsenović
  0 siblings, 1 reply; 3+ messages in thread
From: Arsen Arsenović @ 2023-12-21 19:19 UTC (permalink / raw)
  To: gcc-patches, gdb-patches, binutils; +Cc: Arsen Arsenović

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.
---
Hi,

This patch fixes the build failure noted in PR112534 by preventing the
build system from overriding the compiler flags the gettext-runtime
subconfigure discovers.

This would appear to keep bootstrap working correctly, as shown in:

  [arsen@gcc2-power8 build2]$ readelf -p .comment */intl/dcgettext.o

  File: gettext/intl/dcgettext.o

  String dump of section '.comment':
    [     1]  GCC: (GNU) 14.0.0 20231220 (experimental)


  File: prev-gettext/intl/dcgettext.o

  String dump of section '.comment':
    [     1]  GCC: (GNU) 14.0.0 20231220 (experimental)


  File: stage1-gettext/intl/dcgettext.o

  String dump of section '.comment':
    [     1]  GCC: (GNU) 4.8.5 20150623 (Red Hat 4.8.5-44)

Tested on ppc64le-redhat-linux, OK for trunk?

TIA, have a lovely day.

 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 3f8962c28032..93222bfd7a4b 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 c6313048c914..e67a50750c76 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -3168,6 +3168,8 @@ TAGS: do-TAGS
 
 
 
+
+
 # --------------------------------------
 # Modules which run on the build machine
 # --------------------------------------
@@ -20189,7 +20191,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
 
@@ -20219,7 +20221,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)
@@ -20234,7 +20236,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
 
@@ -20264,7 +20266,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)
 
@@ -20278,7 +20280,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
 
 
@@ -20307,7 +20309,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)
 
@@ -20321,7 +20323,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
 
 
@@ -20350,7 +20352,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)
 
@@ -20364,7 +20366,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
 
 
@@ -20393,7 +20395,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)
 
@@ -20407,7 +20409,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
 
 
@@ -20436,7 +20438,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)
 
@@ -20450,7 +20452,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
 
 
@@ -20479,7 +20481,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)
 
@@ -20493,7 +20495,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
 
 
@@ -20522,7 +20524,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)
 
@@ -20536,7 +20538,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
 
 
@@ -20565,7 +20567,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)
 
@@ -20579,7 +20581,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 6e22adecd2f1..2c9226af74da 100644
--- a/Makefile.tpl
+++ b/Makefile.tpl
@@ -1258,6 +1258,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+]:
@@ -1274,7 +1276,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+]
 
@@ -1309,7 +1311,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+])
@@ -1324,7 +1326,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.43.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Ping: [PATCH] toplevel: don't override gettext-runtime/configure-discovered build args
  2023-12-21 19:19 [PATCH] toplevel: don't override gettext-runtime/configure-discovered build args Arsen Arsenović
@ 2023-12-30 12:21 ` Arsen Arsenović
  2024-01-15 21:52   ` Ping^2: " Arsen Arsenović
  0 siblings, 1 reply; 3+ messages in thread
From: Arsen Arsenović @ 2023-12-30 12:21 UTC (permalink / raw)
  To: Arsen Arsenović; +Cc: gcc-patches, gdb-patches, binutils

[-- Attachment #1: Type: text/plain, Size: 96 bytes --]

Hi,

Ping on this patch.

TIA, have a lovely day and happy holidays!
--
Arsen Arsenović

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 381 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Ping^2: [PATCH] toplevel: don't override gettext-runtime/configure-discovered build args
  2023-12-30 12:21 ` Ping: " Arsen Arsenović
@ 2024-01-15 21:52   ` Arsen Arsenović
  0 siblings, 0 replies; 3+ messages in thread
From: Arsen Arsenović @ 2024-01-15 21:52 UTC (permalink / raw)
  To: Arsen Arsenović; +Cc: gcc-patches, gdb-patches, binutils

[-- Attachment #1: Type: text/plain, Size: 128 bytes --]

Evening folks,

Hope you had wonderful holidays.

Gentle ping on this patch.

Have a lovely night!
--
Arsen Arsenović

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 381 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-01-15 21:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-21 19:19 [PATCH] toplevel: don't override gettext-runtime/configure-discovered build args Arsen Arsenović
2023-12-30 12:21 ` Ping: " Arsen Arsenović
2024-01-15 21:52   ` Ping^2: " Arsen Arsenović

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).