sim: MODULE definitions for macOS
This commit is contained in:
parent
18c574d66a
commit
748777e3f5
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user