Skip to content

Commit

Permalink
sim: Fix build errors on macOS
Browse files Browse the repository at this point in the history
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'
```
  • Loading branch information
yamt authored and xiaoxiang781216 committed Dec 17, 2024
1 parent 382c030 commit 7b0aa11
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions boards/sim/sim/sim/scripts/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,13 @@ ifeq ($(CONFIG_SIM_M32),y)
ARCHCFLAGS += -m32
ARCHCXXFLAGS += -m32
else
ARCHCFLAGS += -fno-pic -mcmodel=medium
ARCHCXXFLAGS += -fno-pic -mcmodel=medium
ifeq ($(CONFIG_HOST_MACOS),y)
ARCHCFLAGS += -fno-pic
ARCHCXXFLAGS += -fno-pic
else
ARCHCFLAGS += -fno-pic -mcmodel=medium
ARCHCXXFLAGS += -fno-pic -mcmodel=medium
endif
endif

# LLVM style architecture flags
Expand Down

0 comments on commit 7b0aa11

Please sign in to comment.