sim: Fix build errors on macOS

macOS 15.2
x86-64
Xcode 16.1
```
ld: warning: disabling chained fixups because of unaligned pointers
ld: illegal text-relocation in '_main'+0x1F (/Users/yamamoto/git/nuttx/nuttx/arc
h/sim/src/nuttx.rel) to '_g_argc'
```
This commit is contained in:
YAMAMOTO Takashi 2024-12-16 21:05:57 +09:00 committed by Xiang Xiao
parent 9692409b2f
commit 14edf1385c

View file

@ -149,8 +149,13 @@ ifeq ($(CONFIG_SIM_M32),y)
ARCHCFLAGS += -m32 ARCHCFLAGS += -m32
ARCHCXXFLAGS += -m32 ARCHCXXFLAGS += -m32
else else
ARCHCFLAGS += -fno-pic -mcmodel=medium ifeq ($(CONFIG_HOST_MACOS),y)
ARCHCXXFLAGS += -fno-pic -mcmodel=medium ARCHCFLAGS += -fno-pic
ARCHCXXFLAGS += -fno-pic
else
ARCHCFLAGS += -fno-pic -mcmodel=medium
ARCHCXXFLAGS += -fno-pic -mcmodel=medium
endif
endif endif
# LLVM style architecture flags # LLVM style architecture flags