From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [IPv6:2001:67c:2050:0:465::202]) by sourceware.org (Postfix) with ESMTPS id CB230385773A; Mon, 7 Aug 2023 11:19:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CB230385773A 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 [IPv6:2001:67c:2050:b231:465::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-202.mailbox.org (Postfix) with ESMTPS id 4RKDP12D1nz9sS4; Mon, 7 Aug 2023 13:19:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aarsen.me; s=MBO0001; t=1691407173; 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=Z4itcn4+BIJWAe5YUaxDYW6wImA3Y28cKi5Kpu1SK4A=; b=vdxHgKfQqFXIpzMGU9eQGzAR+LULEzyTKa7obTHn0r2xmnuiXBOYfMOLwkmaIB4Rnedq32 aV4LkbXS2HGr0+xRY7t3AXBaFyR0/z/sQuO8bUykgPOJNGQs0abkejb2eXCsL+3d62d6YD Ql4Yb49jfs/3YJ1HP9w02Wb0lV+O2dCxUSXj/3XMjpHnfNcTbUE0urIhMWwhCn6qrbIh3d YbRXzCzpASpLmL0pFzabcAIDGO+/jhjdz9KeZJ3sONgaflHyzmFXcBN0WqZgwT10o+BGoL OywtjP43fkUIeMXBMXJdyrsHzmwLTGKmGpL4idHyHeH6cJRD12gqp1Ve70B0QA== From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= To: gdb-patches@sourceware.org, binutils@sourceware.org Cc: Iain Sandoe Subject: [PATCH 21/45] configure: Allow host fragments to react to --enable-host-shared. Date: Mon, 7 Aug 2023 13:07:24 +0200 Message-ID: <20230807111029.2320238-22-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-Rspamd-Queue-Id: 4RKDP12D1nz9sS4 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: Iain Sandoe This makes the host_shared value available to host makefile fragments. It uses this to adjust Darwin's mdynamic-no-pic in the case that shared host resources are required. Signed-off-by: Iain Sandoe config/ChangeLog: * mh-darwin: Require a non-shared host configuration to enable mdynamic-no-pic where that is supported. --- config/mh-darwin | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config/mh-darwin b/config/mh-darwin index fb2bb5ad1d9..b72835ae953 100644 --- a/config/mh-darwin +++ b/config/mh-darwin @@ -11,9 +11,15 @@ # non-bootstrapped compiler), later stages will be built by GCC which supports # the required flags. +# We cannot use mdynamic-no-pic when building shared host resources. + +ifeq (${host_shared},no) BOOTSTRAP_TOOL_CAN_USE_MDYNAMIC_NO_PIC := $(shell \ $(CC) -S -xc /dev/null -o /dev/null -Werror -mno-dynamic-no-pic 2>/dev/null \ && echo true) +else +BOOTSTRAP_TOOL_CAN_USE_MDYNAMIC_NO_PIC := false +endif @if gcc-bootstrap ifeq (${BOOTSTRAP_TOOL_CAN_USE_MDYNAMIC_NO_PIC},true) @@ -21,8 +27,10 @@ STAGE1_CFLAGS += -mdynamic-no-pic else STAGE1_CFLAGS += -fPIC endif +ifeq (${host_shared},no) # Add -mdynamic-no-pic to later stages when we know it is built with GCC. BOOT_CFLAGS += -mdynamic-no-pic +endif @endif gcc-bootstrap @unless gcc-bootstrap -- 2.41.0