diff --git a/boards/arm/mps/mps2-an500/scripts/Make.defs b/boards/arm/mps/mps2-an500/scripts/Make.defs index 84f445475f..f33d6fb03d 100644 --- a/boards/arm/mps/mps2-an500/scripts/Make.defs +++ b/boards/arm/mps/mps2-an500/scripts/Make.defs @@ -38,11 +38,23 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -CFLAGS := $(ARCHCFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) -pipe +CFLAGS := $(ARCHCFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) +ifeq ($(CONFIG_ARM_TOOLCHAIN_GHS),y) + CFLAGS += $(subst -Wno-cpp,,$(EXTRAFLAGS)) +endif CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS) -CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) -pipe +CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) +ifeq ($(CONFIG_ARM_TOOLCHAIN_GHS),y) + CXXFLAGS += $(subst -Wno-cpp,,$(EXTRAFLAGS)) +endif CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS) -CPPFLAGS := $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) +CPPFLAGS := $(ARCHINCLUDES) $(ARCHDEFINES) +ifeq ($(CONFIG_ARM_TOOLCHAIN_GHS),y) + CPPFLAGS += $(subst -Wno-cpp,,$(EXTRAFLAGS)) +else + CFLAGS += $(EXTRAFLAGS) + CPPFLAGS += $(EXTRAFLAGS) +endif AFLAGS := $(CFLAGS) -D__ASSEMBLY__ # NXFLAT module definitions