Skip to content

Commit

Permalink
sim: Disable chained fixups for sim_macho_init.c
Browse files Browse the repository at this point in the history
This is a workaround for #15208

Tested with:
    macOS 15.2
    x86-64
    Xcode 16.2
  • Loading branch information
yamt authored and xiaoxiang781216 committed Jan 7, 2025
1 parent 3e62be8 commit e5ac1c6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions arch/sim/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,13 @@ ifeq ($(CONFIG_HAVE_CXXINITIALIZE),y)
# the place in the object list for linking. Namely, its constructor
# should be the first one in the executable.
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
else
STDLIBS += -lrt
Expand Down

0 comments on commit e5ac1c6

Please sign in to comment.