diff --git a/platforms/nuttx/NuttX/Make.defs.in b/platforms/nuttx/NuttX/Make.defs.in index 08056decaec8..ae1e2a4ff3b0 100644 --- a/platforms/nuttx/NuttX/Make.defs.in +++ b/platforms/nuttx/NuttX/Make.defs.in @@ -133,6 +133,11 @@ ifeq ($(CONFIG_ARMV7M_STACKCHECK),y) FLAGS += -finstrument-functions -ffixed-r10 endif +# don't warn about attributes +ifeq ($(CONFIG_ARCH_ARM64),y) + FLAGS += -Wno-attributes +endif + ARCHCFLAGS = -std=gnu11 \ $(FLAGS) \ -Wno-bad-function-cast \ @@ -187,7 +192,7 @@ define ASSEMBLE endef define ARCHIVE - $(AR) $1 $(2) + $(AR) $1 $(2) endef # ELF module definitions @@ -202,5 +207,9 @@ LDENDGROUP = --end-group LDLIBPATH = $(foreach PATH, $(USERLIBS), $(addprefix -L, $(dir $(PATH)))) LDLIBFILES = $(foreach PATH, $(USERLIBS), $(notdir $(PATH))) LDLIBS = $(patsubst %.a,%,$(patsubst lib%,-l%,$(LDLIBFILES))) -LDELFFLAGS = -r -e _start -Bstatic +LDELFFLAGS = -e _start -Bstatic LDELFFLAGS += $(addprefix -T, $(ELFLDNAME)) + +ifeq ($(CONFIG_BINFMT_ELF_RELOCATABLE),y) + LDELFFLAGS += -r +endif