[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
This commit is contained in:
Theodore Ateba 2022-11-22 23:25:25 +00:00
parent 7891b55c05
commit a6b58ecb3e
1 changed files with 8 additions and 1 deletions

View File

@ -73,7 +73,7 @@ CPPDEFS = -DF_CPU=$(F_CPU)UL
# Paths where to search for sources # Paths where to search for sources
VPATH = $(SRCPATHS) VPATH = $(SRCPATHS)
# Various settings # Various settings for C flags.
MCFLAGS := -mmcu=$(MCU) MCFLAGS := -mmcu=$(MCU)
CFLAGS = $(MCFLAGS) -I. -gdwarf-2 $(CDEFS) $(OPT) -funsigned-char CFLAGS = $(MCFLAGS) -I. -gdwarf-2 $(CDEFS) $(OPT) -funsigned-char
CFLAGS += -funsigned-bitfields -fpack-struct -fshort-enums $(CWARN) 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 += -std=gnu11 -mrelax -fdata-sections -ffunction-sections
CFLAGS += -Wundef -MMD -MP #-MF 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 ---------------- #---------------- Assembler Options ----------------
# -Wa,...: tell GCC to pass this to the assembler. # -Wa,...: tell GCC to pass this to the assembler.
# -adhlns: create listing # -adhlns: create listing