sim: MODULE definitions for macOS

This commit is contained in:
YAMAMOTO Takashi 2020-03-26 11:28:08 +09:00 committed by Xiang Xiao
parent 18c574d66a
commit 748777e3f5
3 changed files with 36 additions and 0 deletions

View File

@ -86,6 +86,18 @@ else
LDMODULEFLAGS += -T $(TOPDIR)/libs/libc/modlib/gnu-elf.ld
endif
# NuttX modules are ELF binaries.
# Non-ELF platforms like macOS need to use a separate ELF toolchain.
ifeq ($(CONFIG_HOST_MACOS),y)
# eg. brew install x86_64-elf-gcc
MODULECC = x86_64-elf-gcc
MODULELD = x86_64-elf-ld
# It seems macOS/x86_64 loads the program text around 00000001_xxxxxxxx.
# The gcc default (-mcmodel=small) would produce out-of-range 32-bit
# relocations.
CMODULEFLAGS += -mcmodel=large
endif
# ELF module definitions
CELFFLAGS = $(CFLAGS)

View File

@ -82,6 +82,18 @@ else
LDMODULEFLAGS += -T $(TOPDIR)/libs/libc/modlib/gnu-elf.ld
endif
# NuttX modules are ELF binaries.
# Non-ELF platforms like macOS need to use a separate ELF toolchain.
ifeq ($(CONFIG_HOST_MACOS),y)
# eg. brew install x86_64-elf-gcc
MODULECC = x86_64-elf-gcc
MODULELD = x86_64-elf-ld
# It seems macOS/x86_64 loads the program text around 00000001_xxxxxxxx.
# The gcc default (-mcmodel=small) would produce out-of-range 32-bit
# relocations.
CMODULEFLAGS += -mcmodel=large
endif
# ELF module definitions
CELFFLAGS = $(CFLAGS)

View File

@ -88,6 +88,18 @@ else
LDMODULEFLAGS += -T $(TOPDIR)/libs/libc/modlib/gnu-elf.ld
endif
# NuttX modules are ELF binaries.
# Non-ELF platforms like macOS need to use a separate ELF toolchain.
ifeq ($(CONFIG_HOST_MACOS),y)
# eg. brew install x86_64-elf-gcc
MODULECC = x86_64-elf-gcc
MODULELD = x86_64-elf-ld
# It seems macOS/x86_64 loads the program text around 00000001_xxxxxxxx.
# The gcc default (-mcmodel=small) would produce out-of-range 32-bit
# relocations.
CMODULEFLAGS += -mcmodel=large
endif
# ELF module definitions
CELFFLAGS = $(CFLAGS)