From a6b58ecb3e5cf4ee878bd5d8f1f729f5bc50b513 Mon Sep 17 00:00:00 2001 From: Theodore Ateba Date: Tue, 22 Nov 2022 23:25:25 +0000 Subject: [PATCH] [AVR] Add CPP C flags for C++ compilation. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@15849 27425a3e-05d8-49a3-a47f-9c15f0e5edd8 --- os/common/ports/AVR/compilers/GCC/rules.mk | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/os/common/ports/AVR/compilers/GCC/rules.mk b/os/common/ports/AVR/compilers/GCC/rules.mk index 161db692e..8d6731096 100644 --- a/os/common/ports/AVR/compilers/GCC/rules.mk +++ b/os/common/ports/AVR/compilers/GCC/rules.mk @@ -73,7 +73,7 @@ CPPDEFS = -DF_CPU=$(F_CPU)UL # Paths where to search for sources VPATH = $(SRCPATHS) -# Various settings +# Various settings for C flags. MCFLAGS := -mmcu=$(MCU) CFLAGS = $(MCFLAGS) -I. -gdwarf-2 $(CDEFS) $(OPT) -funsigned-char CFLAGS += -funsigned-bitfields -fpack-struct -fshort-enums $(CWARN) @@ -81,6 +81,13 @@ CFLAGS += -Wa,-adhlns=$(LSTDIR)/$(notdir $(<:.c=.lst)) $(DEFS) CFLAGS += -std=gnu11 -mrelax -fdata-sections -ffunction-sections CFLAGS += -Wundef -MMD -MP #-MF +# Various settings for CPP flags. +CPPFLAGS = $(MCFLAGS) -I. -gdwarf-2 $(CDEFS) $(OPT) -funsigned-char +CPFLAGS += -funsigned-bitfields -fpack-struct -fshort-enums $(CWARN) +CPFLAGS += -Wa,-adhlns=$(LSTDIR)/$(notdir $(<:.c=.lst)) $(DEFS) +CPFLAGS += -std=gnu++11 -mrelax -fdata-sections -ffunction-sections +CPFLAGS += -Wundef -MMD -MP #-MF + #---------------- Assembler Options ---------------- # -Wa,...: tell GCC to pass this to the assembler. # -adhlns: create listing