sim: Disable chained fixups for sim_macho_init.c

This is a workaround for https://github.com/apache/nuttx/issues/15208

Tested with:
    macOS 15.2
    x86-64
    Xcode 16.2
This commit is contained in:
YAMAMOTO Takashi 2024-12-16 22:26:31 +09:00 committed by Xiang Xiao
parent 3e62be8361
commit e5ac1c620e

View file

@ -133,6 +133,13 @@ ifeq ($(CONFIG_HAVE_CXXINITIALIZE),y)
# the place in the object list for linking. Namely, its constructor # the place in the object list for linking. Namely, its constructor
# should be the first one in the executable. # should be the first one in the executable.
HEADSRC = sim_macho_init.c HEADSRC = sim_macho_init.c
# sim_macho_init.c is not compatible with chained fixups.
# cf. https://github.com/apache/nuttx/issues/15208
ifeq ($(shell $(LD) -ld_classic -no_fixup_chains 2>&1 | grep "unknown option"),)
LDLINKFLAGS += -ld_classic -no_fixup_chains
LDFLAGS += -Wl,-ld_classic,-no_fixup_chains
endif
endif endif
else else
STDLIBS += -lrt STDLIBS += -lrt