WIP MachO binutils port assisted by AI I may consider upstreaming this in the future.
0

Configure Feed

Select the types of activity you want to include in your feed.

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.

authored by

Iain Sandoe and committed by
Alan Modra
(Aug 12, 2023, 10:24 AM +0930) c841db95 3c4e12ba

+8
+8
config/mh-darwin
··· 11 11 # non-bootstrapped compiler), later stages will be built by GCC which supports 12 12 # the required flags. 13 13 14 + # We cannot use mdynamic-no-pic when building shared host resources. 15 + 16 + ifeq (${host_shared},no) 14 17 BOOTSTRAP_TOOL_CAN_USE_MDYNAMIC_NO_PIC := $(shell \ 15 18 $(CC) -S -xc /dev/null -o /dev/null -Werror -mno-dynamic-no-pic 2>/dev/null \ 16 19 && echo true) 20 + else 21 + BOOTSTRAP_TOOL_CAN_USE_MDYNAMIC_NO_PIC := false 22 + endif 17 23 18 24 @if gcc-bootstrap 19 25 ifeq (${BOOTSTRAP_TOOL_CAN_USE_MDYNAMIC_NO_PIC},true) ··· 21 27 else 22 28 STAGE1_CFLAGS += -fPIC 23 29 endif 30 + ifeq (${host_shared},no) 24 31 # Add -mdynamic-no-pic to later stages when we know it is built with GCC. 25 32 BOOT_CFLAGS += -mdynamic-no-pic 33 + endif 26 34 @endif gcc-bootstrap 27 35 28 36 @unless gcc-bootstrap