Merge pull request #1019 from javacruft/wip-omit-leaf-frame-pointer-archs

build: Improve -momit-leaf-frame-pointer usage
This commit is contained in:
Igor Canadi 2016-02-29 09:32:16 -08:00
commit 3492889ab8

View File

@ -84,12 +84,11 @@ endif
# compile with -O2 if debug level is not 2 # compile with -O2 if debug level is not 2
ifneq ($(DEBUG_LEVEL), 2) ifneq ($(DEBUG_LEVEL), 2)
OPT += -O2 -fno-omit-frame-pointer OPT += -O2 -fno-omit-frame-pointer
ifeq (,$(findstring ppc64,$(MACHINE))) # ppc64[le] doesn't support -momit-leaf-frame-pointer # Skip for archs that don't support -momit-leaf-frame-pointer
ifneq ($(MACHINE),armv7l) ifeq (,$(shell $(CXX) -fsyntax-only -momit-leaf-frame-pointer -xc /dev/null 2>&1))
OPT += -momit-leaf-frame-pointer OPT += -momit-leaf-frame-pointer
endif endif
endif endif
endif
# if we're compiling for release, compile without debug code (-DNDEBUG) and # if we're compiling for release, compile without debug code (-DNDEBUG) and
# don't treat warnings as errors # don't treat warnings as errors