Merge pull request #955 from bcbrock/ppc64-build

Simple changes to support builds for ppc64[le] consistent with X86
This commit is contained in:
Igor Canadi 2016-01-19 09:05:44 -08:00
commit 594a5ef021
3 changed files with 9 additions and 3 deletions

View File

@ -21,7 +21,7 @@ depend on gflags. You will need to have gflags installed to run `make all`. This
use binaries compiled by `make all` in production. use binaries compiled by `make all` in production.
* By default the binary we produce is optimized for the platform you're compiling on * By default the binary we produce is optimized for the platform you're compiling on
(-march=native). If you want to build a portable binary, add 'PORTABLE=1' before (-march=native or the equivalent). If you want to build a portable binary, add 'PORTABLE=1' before
your make commands, like this: `PORTABLE=1 make static_lib` your make commands, like this: `PORTABLE=1 make static_lib`
## Dependencies ## Dependencies

View File

@ -84,7 +84,7 @@ 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
ifneq ($(MACHINE),ppc64) # ppc64 doesn't support -momit-leaf-frame-pointer ifeq (,$(findstring ppc64,$(MACHINE))) # ppc64[le] doesn't support -momit-leaf-frame-pointer
OPT += -momit-leaf-frame-pointer OPT += -momit-leaf-frame-pointer
endif endif
endif endif

View File

@ -359,7 +359,13 @@ if test "$USE_SSE"; then
# if Intel SSE instruction set is supported, set USE_SSE=1 # if Intel SSE instruction set is supported, set USE_SSE=1
COMMON_FLAGS="$COMMON_FLAGS -msse -msse4.2 " COMMON_FLAGS="$COMMON_FLAGS -msse -msse4.2 "
elif test -z "$PORTABLE"; then elif test -z "$PORTABLE"; then
COMMON_FLAGS="$COMMON_FLAGS -march=native " if test -n "`echo $TARGET_ARCHITECTURE | grep ^ppc64`"; then
# Tune for this POWER processor, treating '+' models as base models
POWER=`LD_SHOW_AUXV=1 /bin/true | grep AT_PLATFORM | grep -E -o power[0-9]+`
COMMON_FLAGS="$COMMON_FLAGS -mcpu=$POWER -mtune=$POWER "
else
COMMON_FLAGS="$COMMON_FLAGS -march=native "
fi
fi fi
PLATFORM_CCFLAGS="$PLATFORM_CCFLAGS $COMMON_FLAGS" PLATFORM_CCFLAGS="$PLATFORM_CCFLAGS $COMMON_FLAGS"