Merge pull request #210 from inverse-inc/compiler_flags

Add -O2 compilation by default and -g debug info
pull/211/head
extrafu 2016-06-03 07:12:46 -04:00
commit 8225480029
1 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,6 @@
# Use GCC level 2 optimization by default
# Might be overridden below
ADDITIONAL_OBJCFLAGS=-O2
ifeq ($(test-uninitialized),yes)
ifeq ($(debug),yes)
ADDITIONAL_OBJCFLAGS=-O0
@ -5,3 +8,9 @@ else
ADDITIONAL_OBJCFLAGS=-Wuninitialized
endif
endif
# Ensure we store in the ELF files minimal debugging
# information plus the compiler flags used; that can
# be afterwards read with:
# readelf -p .GCC.command.line /path/to/elf_file
ADDITIONAL_OBJCFLAGS += -g -frecord-gcc-switches