From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [80.241.56.172]) by sourceware.org (Postfix) with ESMTPS id 07AD2385843B for ; Sun, 14 Apr 2024 00:12:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 07AD2385843B 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 07AD2385843B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=80.241.56.172 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713053558; cv=none; b=lXXGJdn93G34GRxGlkVhNgfSyPQVgujR4iCaAtPAhsyrB3qtCXUNml2ZiimonvDqenDjKgZApl42xON/fLCFRIfnC6/BtinTL1BAxuPtUit2sRgClNRHr9v8jqFSVrd5QZV+5nUoYERpHcJEHl9C3EODQCb+DzMVgDxIl9SEp3I= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713053558; c=relaxed/simple; bh=sRJaQ8hZpzPv6li2XNKewGUHP+2rygZViUonBNO5yd4=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Q0UY/d8wDx+zyRd0vSZqWuFuE/yZxjwxjTYsHkK8apW8W5FiDxLXsQuKBb62Cb0xiAZZNWipwmi9/sZSQFLit8hQwId6lDqdoBdA1a5yQiineWqTI3tnom0J2uUl0HZgslBciV++YJ5R2kZqN1CY5nRGZXi24D+VLc7QY18Dd8g= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (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-202.mailbox.org (Postfix) with ESMTPS id 4VH9jX1zd9z9sZ5; Sun, 14 Apr 2024 02:12:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aarsen.me; s=MBO0001; t=1713053552; 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: in-reply-to:in-reply-to:references:references; bh=wV+N5x7lIn8I7VxDaODjQaV2Gw1SpGJe2rBQaJug4fM=; b=pcfn2pSs+CTmKsbe6OJlysuncCMHfOxmyzjbD/R/1U2g/6Hl1EvR1RE2mFuAhSyVsx7VJi IEHkt/myaEtsz3tm4b4wNXu4DOrHxJLRMpeB26UKGeePiQIE5hL6sZ4UEsCdgtW7jD4orJ Yu//TcA6BVvwFOGGG3BBzvv1YMWlevbT+3xYjuOH2Wh/jq+WRBf2ebT14Kchv32W7L6tAM 2DNQIn9aCcll8KSrtmERdkJKQhvnSgaznGMo0TsF3vWCdVR0rT/DGVNndN5xoOn5HOjHMM AujXKwf/353N6MNEkA0rTtVqzRQCklOXupxMUwnxMvc2/2pYkGnQtu/P4HP+5g== From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= To: gcc-patches@gcc.gnu.org Cc: =?UTF-8?q?K=C3=A9vin=20Le=20Gouguec?= , =?UTF-8?q?Arsen=20Arsenovi=C4=87?= Subject: [PATCH 1/3] toplevel: don't override gettext-runtime/configure-discovered build args Date: Sat, 13 Apr 2024 23:58:02 +0200 Message-ID: <20240414001113.1698685-2-arsen@aarsen.me> In-Reply-To: <20240414001113.1698685-1-arsen@aarsen.me> References: <20240414001113.1698685-1-arsen@aarsen.me> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.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 autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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