public inbox for binutils-cvs@sourceware.org
 help / color / mirror / Atom feed
* [binutils-gdb] configure: Allow host fragments to react to --enable-host-shared.
@ 2023-08-12  1:00 Alan Modra
  0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2023-08-12  1:00 UTC (permalink / raw)
  To: bfd-cvs, gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c841db953822200b5f9babeb7ddeaefe0bb377df

commit c841db953822200b5f9babeb7ddeaefe0bb377df
Author: Iain Sandoe <iain@sandoe.co.uk>
Date:   Mon Aug 7 13:07:24 2023 +0200

    configure: Allow host fragments to react to --enable-host-shared.
    
    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 <iain@sandoe.co.uk>
    
    config/
            * mh-darwin: Require a non-shared host configuration to
            enable  mdynamic-no-pic where that is supported.

Diff:
---
 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-08-12  1:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-12  1:00 [binutils-gdb] configure: Allow host fragments to react to --enable-host-shared Alan Modra

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