shared GCC settings between projects
This commit is contained in:
parent
4dafc65d69
commit
48db08aaae
|
@ -7,6 +7,8 @@ CHIBIOS = ChibiOS
|
||||||
RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC
|
RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC
|
||||||
RULESFILE = $(RULESPATH)/rules.mk
|
RULESFILE = $(RULESPATH)/rules.mk
|
||||||
|
|
||||||
|
include rusefi_rules.mk
|
||||||
|
|
||||||
# Define project name here
|
# Define project name here
|
||||||
PROJECT = rusefi
|
PROJECT = rusefi
|
||||||
PROJECT_DIR = .
|
PROJECT_DIR = .
|
||||||
|
@ -35,9 +37,12 @@ endif
|
||||||
|
|
||||||
# Compiler options here.
|
# Compiler options here.
|
||||||
ifeq ($(USE_OPT),)
|
ifeq ($(USE_OPT),)
|
||||||
USE_OPT = $(EXTRA_PARAMS) $(DEBUG_LEVEL_OPT) $(RFLAGS) -Wno-error=implicit-fallthrough -Wno-error=bool-operation -fomit-frame-pointer -falign-functions=16 -Werror -Wno-error=pointer-sign -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=sign-compare -Wno-error=unused-parameter -Werror=missing-field-initializers -Werror=type-limits -Wno-error=strict-aliasing -Wno-error=attributes
|
USE_OPT = $(EXTRA_PARAMS) $(DEBUG_LEVEL_OPT) $(RFLAGS) -Wno-error=implicit-fallthrough -Wno-error=bool-operation -fomit-frame-pointer -falign-functions=16 -Werror=type-limits -Wno-error=strict-aliasing -Wno-error=attributes
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
USE_OPT += $(RUSEFI_OPT)
|
||||||
|
|
||||||
# C specific options here (added to USE_OPT).
|
# C specific options here (added to USE_OPT).
|
||||||
ifeq ($(USE_COPT),)
|
ifeq ($(USE_COPT),)
|
||||||
USE_COPT = -fgnu89-inline -std=gnu99 -Werror-implicit-function-declaration
|
USE_COPT = -fgnu89-inline -std=gnu99 -Werror-implicit-function-declaration
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
RUSEFI_OPT=-Werror -Wno-error=pointer-sign -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=sign-compare -Wno-error=unused-parameter -Werror=missing-field-initializers
|
||||||
|
|
||||||
|
RUSEFI_OPT+=-Wno-error=missing-prototypes
|
||||||
|
|
||||||
|
RUSEFI_OPT+=-Werror=switch
|
|
@ -18,6 +18,8 @@ RULESPATH = $(CHIBIOS)/os/common/startup/SIMIA32/compilers/GCC
|
||||||
RULESFILE = $(RULESPATH)/rules.mk
|
RULESFILE = $(RULESPATH)/rules.mk
|
||||||
|
|
||||||
include ../firmware/rusefi.mk
|
include ../firmware/rusefi.mk
|
||||||
|
RULESFILE = ../firmware/rusefi_rules.mk
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Compiler options here.
|
# Compiler options here.
|
||||||
|
@ -28,7 +30,7 @@ ifeq ($(USE_OPT),)
|
||||||
# this config producec a smaller binary file
|
# this config producec a smaller binary file
|
||||||
# 7.3 compiler would want -Wno-error=implicit-fallthrough while 6.4 does not know about it
|
# 7.3 compiler would want -Wno-error=implicit-fallthrough while 6.4 does not know about it
|
||||||
# see https://github.com/rusefi/rusefi/issues/517
|
# see https://github.com/rusefi/rusefi/issues/517
|
||||||
USE_OPT = -Wall -O2 -Wno-error=implicit-fallthrough -Werror-implicit-function-declaration -Werror -Wno-error=pointer-sign -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=sign-compare -Wno-error=unused-parameter -Werror=missing-field-initializers -Wno-error=write-strings -Wno-error=strict-aliasing
|
USE_OPT = -Wall -O2 -Wno-error=implicit-fallthrough -Wno-error=write-strings -Wno-error=strict-aliasing
|
||||||
|
|
||||||
ifeq ($(OS),Windows_NT)
|
ifeq ($(OS),Windows_NT)
|
||||||
else
|
else
|
||||||
|
@ -36,6 +38,8 @@ ifeq ($(USE_OPT),)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
USE_OPT += $(RUSEFI_OPT)
|
||||||
|
|
||||||
ifeq ($(CCACHE_DIR),)
|
ifeq ($(CCACHE_DIR),)
|
||||||
$(info No CCACHE_DIR)
|
$(info No CCACHE_DIR)
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue