equal
deleted
inserted
replaced
258 # WARNINGS_ARE_ERRORS += -Wno-tautological-constant-out-of-range-compare |
258 # WARNINGS_ARE_ERRORS += -Wno-tautological-constant-out-of-range-compare |
259 WARNINGS_ARE_ERRORS += -Wno-delete-non-virtual-dtor -Wno-deprecated -Wno-format -Wno-dynamic-class-memaccess |
259 WARNINGS_ARE_ERRORS += -Wno-delete-non-virtual-dtor -Wno-deprecated -Wno-format -Wno-dynamic-class-memaccess |
260 WARNINGS_ARE_ERRORS += -Wno-empty-body |
260 WARNINGS_ARE_ERRORS += -Wno-empty-body |
261 endif |
261 endif |
262 |
262 |
263 WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wunused-value |
263 WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wformat=2 -Wno-error=format-nonliteral |
264 |
264 |
265 ifeq ($(USE_CLANG),) |
265 ifeq ($(USE_CLANG),) |
266 # Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit |
266 # Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit |
267 # conversions which might affect the values. Only enable it in earlier versions. |
267 # conversions which might affect the values. Only enable it in earlier versions. |
268 ifeq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0" |
268 ifeq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0" |
287 CFLAGS += -fno-strict-aliasing |
287 CFLAGS += -fno-strict-aliasing |
288 |
288 |
289 # The flags to use for an Optimized g++ build |
289 # The flags to use for an Optimized g++ build |
290 ifeq ($(OS_VENDOR), Darwin) |
290 ifeq ($(OS_VENDOR), Darwin) |
291 # use -Os by default, unless -O3 can be proved to be worth the cost, as per policy |
291 # use -Os by default, unless -O3 can be proved to be worth the cost, as per policy |
292 # <http://wikis.sun.com/display/OpenJDK/Mac+OS+X+Port+Compilers> |
292 # <https://wiki.openjdk.java.net/display/MacOSXPort/Compiler+Errata> |
293 OPT_CFLAGS_DEFAULT ?= SIZE |
293 OPT_CFLAGS_DEFAULT ?= SIZE |
294 else |
294 else |
295 OPT_CFLAGS_DEFAULT ?= SPEED |
295 OPT_CFLAGS_DEFAULT ?= SPEED |
296 endif |
296 endif |
297 |
297 |