From patchwork Thu Dec 21 19:19:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Arsen_Arsenovi=C4=87?= X-Patchwork-Id: 82701 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4D8E7384DEE3 for ; Thu, 21 Dec 2023 19:36:18 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mout-p-101.mailbox.org (mout-p-101.mailbox.org [IPv6:2001:67c:2050:0:465::101]) by sourceware.org (Postfix) with ESMTPS id D351B385842B; Thu, 21 Dec 2023 19:35:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D351B385842B Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=aarsen.me Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=aarsen.me ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D351B385842B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:67c:2050:0:465::101 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703187337; cv=none; b=UnCy024IuCQUJ1or67YSOsFOYs8LwkPmyYzUcB43LdEvgElFOCls55MiInByzhp2aWEmtTGPwO33+SBcPI0g7XsJRf/9ObJi5v2w4rSSm0E7Oh3TrAFfrExXIbVTzCTTzKixT2sgshD4+CyU6oXmaaUYPlAY9vL4JQib+ajJLeU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703187337; c=relaxed/simple; bh=P/AxToj35yjTywdOWNBMhrKKSNLkvSOraGP4+QoJCS4=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=ZUibqvcRUJJHyXVnYKdxfHXIiJJ+QPu4oskKyKctdupnBJQmkUA+wgFZetLiieU/DAdRzaeTNuGIKCfwj5tb4udwxrDWA5nMbvKWmwcBG+0ukPDKr31UlJ/xoqF+RcTbnBTZIMgdTfnM/2i28H/dJ765ZXQRb6niMCZKVvaY8Kw= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4Sx0yW2xpQz9sW5; Thu, 21 Dec 2023 20:35:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aarsen.me; s=MBO0001; t=1703187331; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=Ys5MIW9jJBpQ0V5wF4EBenAZuSpoQQ04RnGM99TbLRw=; b=OocaUITFPCG792LjZy+kndVmfJM25Vhp3guApP4Iom5QAJsSMNRel/8hEV2vH5g2dDskFn gHrjFPewP26+wm1/mQjyoPqYryKNSBDuWRYDud9Ucgf4cpLi/XNE2fR++PJQhqY7W0Muko E4WZm57Udo+PyCIB8K+tI0mzCfI8KWm8k/z0/sUmBYkeJFuWhI50tdk4DNVnCA1+YZjuM9 6B3W4OIkrNV2jMxORkD3PO//zKzuxj+VCHmRf5p6Iazn1FSk9jt4ciaNp6KUL56U3T56g7 TA0X9gQMdX8M7XMzh2EiL9if8to05kIG3KDajeXHQOPtdnvE6lLgd2RJ7wczTg== From: =?utf-8?q?Arsen_Arsenovi=C4=87?= To: gcc-patches@gcc.gnu.org, gdb-patches@sourceware.org, binutils@sourceware.org Cc: =?utf-8?q?Arsen_Arsenovi=C4=87?= Subject: [PATCH] toplevel: don't override gettext-runtime/configure-discovered build args Date: Thu, 21 Dec 2023 20:19:29 +0100 Message-ID: <20231221193243.368541-1-arsen@aarsen.me> MIME-Version: 1.0 X-Rspamd-Queue-Id: 4Sx0yW2xpQz9sW5 X-Spam-Status: No, score=-13.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_INFOUSMEBIZ, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org 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