1# 2# Common global compiler configuration 3# 4 5# Common Compiler Flags ######################################################## 6 7# CHRE requires C++11 and C99 support. 8COMMON_CXX_CFLAGS += -std=c++11 9COMMON_C_CFLAGS += -x c 10COMMON_C_CFLAGS += -std=c99 11 12# Configure 'all' and 'extra' warnings and promote warnings to errors. 13COMMON_CFLAGS += -Wall 14COMMON_CFLAGS += -Wextra 15COMMON_CFLAGS += -Werror 16 17# Disabled warnings. You better have a good reason to add more here. 18COMMON_CFLAGS += -Wno-unused-parameter 19 20# Additional warnings. Even more! :] 21COMMON_CFLAGS += -Wshadow 22COMMON_CFLAGS += -Wdouble-promotion 23 24# Disable exceptions and RTTI. 25COMMON_CXX_CFLAGS += -fno-exceptions 26COMMON_CXX_CFLAGS += -fno-rtti 27 28# Enable the linker to garbage collect unused code and variables. 29COMMON_CFLAGS += -fdata-sections 30COMMON_CFLAGS += -ffunction-sections 31 32# Enable debugging symbols for debug builds. 33COMMON_DEBUG_CFLAGS += -g 34 35# Dependency Resolution 36DEP_CFLAGS = -MM -MG -MP -MF $$(basename $$@).d 37 38# Compile with hidden visibility by default. 39COMMON_CFLAGS += -fvisibility=hidden 40 41# Common Archive Flags ######################################################### 42 43COMMON_ARFLAGS += rsc 44