This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new e5ac1c620e sim: Disable chained fixups for sim_macho_init.c
e5ac1c620e is described below
commit e5ac1c620e493e9d5533f2824576e0a5760759cb
Author: YAMAMOTO Takashi <[email protected]>
AuthorDate: Mon Dec 16 22:26:31 2024 +0900
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
---
arch/sim/src/Makefile | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/sim/src/Makefile b/arch/sim/src/Makefile
index a0fd93e1b5..280bb45cae 100644
--- a/arch/sim/src/Makefile
+++ b/arch/sim/src/Makefile
@@ -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