diff --git a/boards/sim/sim/sim/scripts/Make.defs b/boards/sim/sim/sim/scripts/Make.defs index 90d3827424..4260f093dd 100644 --- a/boards/sim/sim/sim/scripts/Make.defs +++ b/boards/sim/sim/sim/scripts/Make.defs @@ -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