Skip to content

Commit f9c1cec

Browse files
committed
sim: Disable chained fixups for sim_macho_init.c
This is a workaround for apache#15208 Tested with: macOS 15.2 x86-64 Xcode 16.2
1 parent 55da7d8 commit f9c1cec

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

arch/sim/src/Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,13 @@ ifeq ($(CONFIG_HAVE_CXXINITIALIZE),y)
133133
# the place in the object list for linking. Namely, its constructor
134134
# should be the first one in the executable.
135135
HEADSRC = sim_macho_init.c
136+
137+
# sim_macho_init.c is not compatible with chained fixups.
138+
# cf. https://github.com/apache/nuttx/issues/15208
139+
ifeq ($(shell $(LD) -ld_classic -no_fixup_chains 2>&1 | grep "unknown option"),)
140+
LDLINKFLAGS += -ld_classic -no_fixup_chains
141+
LDFLAGS += -Wl,-ld_classic,-no_fixup_chains
142+
endif
136143
endif
137144
else
138145
STDLIBS += -lrt

0 commit comments

Comments
 (0)