Skip to content

Commit

Permalink
nuttx/Make.defs.in: Support for ARM64
Browse files Browse the repository at this point in the history
The aarch64 compiler does not like some attributes used by NuttX, so
suppress the warning.

The flag is used in upstream as well.
  • Loading branch information
pussuw committed Sep 11, 2024
1 parent 237cbe0 commit c0cdc72
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions platforms/nuttx/NuttX/Make.defs.in
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -187,7 +192,7 @@ define ASSEMBLE
endef

define ARCHIVE
$(AR) $1 $(2)
$(AR) $1 $(2)
endef

# ELF module definitions
Expand All @@ -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

0 comments on commit c0cdc72

Please sign in to comment.