From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout-p-201.mailbox.org (mout-p-201.mailbox.org [IPv6:2001:67c:2050:0:465::201]) by sourceware.org (Postfix) with ESMTPS id 6D7493857016; Mon, 7 Aug 2023 11:19:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6D7493857016 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=aarsen.me Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=aarsen.me Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4RKDNx6bsLz9sR3; Mon, 7 Aug 2023 13:19:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aarsen.me; s=MBO0001; t=1691407169; 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=I5WoepKovBWOVpOCQuTubmauxpMxlJOAlBbYchC3+68=; b=WNDGR0lIk/NoTQqMsmqkqBvs0C3qy188/LxA2xW4F5uRzb++l05h1fVLooZuqZIz0hZgz9 TgS6CPRMvHtC4qBwqmtxkK9wSsFoNwtuZ9b65bqGCOJ+n3mSjVVaPw8xKa1spXCh7n1T6g bREsh9DJueSFvDbfjzOdiv1dO1Md+jrUQ9AfZ+k8ySwBeMGy+CjD3kJpNKnmB787XziuWw D0eRPUtwZg6W8/O/PJw1/bm5c2qi+prt2JtRNP/rbRNiTMro1qFOAd5Zt38dD7ctRt3lsy SnkHni2jG6H9pmelHnpTOacECUT0Cz8fv8toFFbjxgYZdxsgMM6/lAEs+ck3Gg== From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= To: gdb-patches@sourceware.org, binutils@sourceware.org Cc: Andrew Pinski Subject: [PATCH 18/45] Fix PR bootstrap/102389: --with-build-config=bootstrap-lto is broken Date: Mon, 7 Aug 2023 13:07:21 +0200 Message-ID: <20230807111029.2320238-19-arsen@aarsen.me> In-Reply-To: <20230807111029.2320238-1-arsen@aarsen.me> References: <20230807111029.2320238-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: From: Andrew Pinski So the problem here is that now the lto-plugin requires NM that works with LTO to work so we need to pass down NM just like we do for ranlib and ar. OK? Bootstrapped and tested with --with-build-config=bootstrap-lto on aarch64-linux-gnu. Note you need to use binutils 2.35 or later too due to ttps://sourceware.org/PR25355 (I will submit another patch to improve the installation instructions too). config/ChangeLog: PR bootstrap/102389 * bootstrap-lto-lean.mk: Handle NM like RANLIB AND AR. * bootstrap-lto.mk: Likewise. --- config/bootstrap-lto-lean.mk | 6 ++++-- config/bootstrap-lto.mk | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/config/bootstrap-lto-lean.mk b/config/bootstrap-lto-lean.mk index 79cea50a4c6..42cb3394c70 100644 --- a/config/bootstrap-lto-lean.mk +++ b/config/bootstrap-lto-lean.mk @@ -9,9 +9,11 @@ STAGEfeedback_CFLAGS += -flto=jobserver # assumes the host supports the linker plugin LTO_AR = $$r/$(HOST_SUBDIR)/prev-gcc/gcc-ar$(exeext) -B$$r/$(HOST_SUBDIR)/prev-gcc/ LTO_RANLIB = $$r/$(HOST_SUBDIR)/prev-gcc/gcc-ranlib$(exeext) -B$$r/$(HOST_SUBDIR)/prev-gcc/ +LTO_NM = $$r/$(HOST_SUBDIR)/prev-gcc/gcc-nm$(exeext) -B$$r/$(HOST_SUBDIR)/prev-gcc/ LTO_EXPORTS = AR="$(LTO_AR)"; export AR; \ - RANLIB="$(LTO_RANLIB)"; export RANLIB; -LTO_FLAGS_TO_PASS = AR="$(LTO_AR)" RANLIB="$(LTO_RANLIB)" + RANLIB="$(LTO_RANLIB)"; export RANLIB; \ + NM="$(LTO_NM)"; export NM; +LTO_FLAGS_TO_PASS = AR="$(LTO_AR)" RANLIB="$(LTO_RANLIB)" NM="$(LTO_NM)" do-compare = /bin/true diff --git a/config/bootstrap-lto.mk b/config/bootstrap-lto.mk index 4de07e5b226..1ddb1d870ba 100644 --- a/config/bootstrap-lto.mk +++ b/config/bootstrap-lto.mk @@ -9,10 +9,12 @@ STAGEfeedback_CFLAGS += -flto=jobserver -frandom-seed=1 # assumes the host supports the linker plugin LTO_AR = $$r/$(HOST_SUBDIR)/prev-gcc/gcc-ar$(exeext) -B$$r/$(HOST_SUBDIR)/prev-gcc/ LTO_RANLIB = $$r/$(HOST_SUBDIR)/prev-gcc/gcc-ranlib$(exeext) -B$$r/$(HOST_SUBDIR)/prev-gcc/ +LTO_NM = $$r/$(HOST_SUBDIR)/prev-gcc/gcc-nm$(exeext) -B$$r/$(HOST_SUBDIR)/prev-gcc/ LTO_EXPORTS = AR="$(LTO_AR)"; export AR; \ - RANLIB="$(LTO_RANLIB)"; export RANLIB; -LTO_FLAGS_TO_PASS = AR="$(LTO_AR)" RANLIB="$(LTO_RANLIB)" + RANLIB="$(LTO_RANLIB)"; export RANLIB; \ + NM="$(LTO_NM)"; export NM; +LTO_FLAGS_TO_PASS = AR="$(LTO_AR)" RANLIB="$(LTO_RANLIB)" NM="$(LTO_NM)" do-compare = $(SHELL) $(srcdir)/contrib/compare-lto $$f1 $$f2 extra-compare = gcc/lto1$(exeext) -- 2.41.0