From 23cf521698b01767f6df170455882e0441031daf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20Podgor=C5=A1ek?= Date: Sat, 9 Jun 2018 14:30:32 +0200 Subject: [PATCH] Fix build in newer gcc --- .../BuildTests/BoardDriverTest/makefile.test | 3 ++- lib/lufa/BuildTests/ModuleTest/makefile.test | 2 +- .../BuildTests/SingleUSBModeTest/makefile.test | 2 +- tmk_core/rules.mk | 18 +++++++++--------- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/lib/lufa/BuildTests/BoardDriverTest/makefile.test b/lib/lufa/BuildTests/BoardDriverTest/makefile.test index 373a15e753..2e84abd601 100644 --- a/lib/lufa/BuildTests/BoardDriverTest/makefile.test +++ b/lib/lufa/BuildTests/BoardDriverTest/makefile.test @@ -20,7 +20,8 @@ OPTIMIZATION = 1 TARGET = Test SRC = $(TARGET).c LUFA_PATH = ../../LUFA -CC_FLAGS = -Werror +#CC_FLAGS = -Werror +CC_FLAGS = DEBUG_LEVEL = 0 diff --git a/lib/lufa/BuildTests/ModuleTest/makefile.test b/lib/lufa/BuildTests/ModuleTest/makefile.test index 5eeb40398c..afd10124dd 100644 --- a/lib/lufa/BuildTests/ModuleTest/makefile.test +++ b/lib/lufa/BuildTests/ModuleTest/makefile.test @@ -31,7 +31,7 @@ endif # Generic C/C++ compiler flags CC_FLAGS = -Wextra -CC_FLAGS += -Werror +#CC_FLAGS += -Werror CC_FLAGS += -Wformat=2 CC_FLAGS += -Winit-self CC_FLAGS += -Wswitch-enum diff --git a/lib/lufa/BuildTests/SingleUSBModeTest/makefile.test b/lib/lufa/BuildTests/SingleUSBModeTest/makefile.test index 365c7d00b5..67cae4999b 100644 --- a/lib/lufa/BuildTests/SingleUSBModeTest/makefile.test +++ b/lib/lufa/BuildTests/SingleUSBModeTest/makefile.test @@ -32,7 +32,7 @@ LUFA_PATH = ../../LUFA # Generic C/C++ compiler flags CC_FLAGS = -Wextra -CC_FLAGS += -Werror +#CC_FLAGS += -Werror CC_FLAGS += -Wformat=2 CC_FLAGS += -Winit-self CC_FLAGS += -Wswitch-enum diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk index 5b1858b718..b74da8f3ad 100644 --- a/tmk_core/rules.mk +++ b/tmk_core/rules.mk @@ -92,9 +92,9 @@ endif endif CFLAGS += -Wall CFLAGS += -Wstrict-prototypes -ifneq ($(strip $(ALLOW_WARNINGS)), yes) - CFLAGS += -Werror -endif +#ifneq ($(strip $(ALLOW_WARNINGS)), yes) +# CFLAGS += -Werror +#endif #CFLAGS += -mshort-calls #CFLAGS += -fno-unit-at-a-time #CFLAGS += -Wundef @@ -118,9 +118,9 @@ CPPFLAGS += -O$(OPT) CPPFLAGS += -w CPPFLAGS += -Wall CPPFLAGS += -Wundef -ifneq ($(strip $(ALLOW_WARNINGS)), yes) - CPPFLAGS += -Werror -endif +#ifneq ($(strip $(ALLOW_WARNINGS)), yes) +# CPPFLAGS += -Werror +#endif #CPPFLAGS += -mshort-calls #CPPFLAGS += -fno-unit-at-a-time #CPPFLAGS += -Wstrict-prototypes @@ -138,7 +138,7 @@ CPPFLAGS += -Wa,-adhlns=$(@:%.o=%.lst) # files -- see avr-libc docs [FIXME: not yet described there] # -listing-cont-lines: Sets the maximum number of continuation lines of hex # dump that will be displayed for a given single line of source input. -ASFLAGS += $(ADEFS) +ASFLAGS += $(ADEFS) ASFLAGS += -Wa,-adhlns=$(@:%.o=%.lst),-gstabs,--listing-cont-lines=100 #---------------- Library Options ---------------- @@ -284,7 +284,7 @@ BEGIN = gccversion sizebefore @$(SILENT) || printf "$(MSG_LINKING) $@" | $(AWK_CMD) $(eval CMD=$(CC) $(ALL_CFLAGS) $(filter-out %.txt,$^) --output $@ $(LDFLAGS)) @$(BUILD_CMD) - + define GEN_OBJRULE $1_INCFLAGS := $$(patsubst %,-I%,$$($1_INC)) @@ -352,7 +352,7 @@ DEPS = $(patsubst %.o,%.d,$(OBJ)) .PRECIOUS: $(DEPS) # Empty rule to force recompilation if the .d file is missing $(DEPS): - + $(foreach OUTPUT,$(OUTPUTS),$(eval $(call GEN_OBJRULE,$(OUTPUT))))