Skip to content

Commit 28ffea0

Browse files
mike-evolvedadamretter
authored andcommitted
Target Power 8 for portable PowerPC builds
1 parent 930da14 commit 28ffea0

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

build_tools/build_detect_platform

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,9 @@ if [ "$PORTABLE" == "" ] || [ "$PORTABLE" == 0 ]; then
652652
if test -n "`echo $TARGET_ARCHITECTURE | grep ^ppc64`"; then
653653
# Tune for this POWER processor, treating '+' models as base models
654654
POWER=`LD_SHOW_AUXV=1 /bin/true | grep AT_PLATFORM | grep -E -o power[0-9]+`
655-
COMMON_FLAGS="$COMMON_FLAGS -mcpu=$POWER -mtune=$POWER "
655+
if [ -n "$POWER" ]; then
656+
COMMON_FLAGS="$COMMON_FLAGS -mcpu=$POWER -mtune=$POWER "
657+
fi
656658
elif test -n "`echo $TARGET_ARCHITECTURE | grep -e^arm -e^aarch64`"; then
657659
# TODO: Handle this with approprite options.
658660
COMMON_FLAGS="$COMMON_FLAGS"
@@ -679,7 +681,10 @@ if [ "$PORTABLE" == "" ] || [ "$PORTABLE" == 0 ]; then
679681
else
680682
# PORTABLE specified
681683
if [ "$PORTABLE" == 1 ]; then
682-
if test -n "`echo $TARGET_ARCHITECTURE | grep ^s390x`"; then
684+
if test -n "`echo $TARGET_ARCHITECTURE | grep ^ppc64`"; then
685+
# For portable powerPC builds, use generic power8
686+
COMMON_FLAGS="$COMMON_FLAGS -mcpu=power8 -mtune=power8 "
687+
elif test -n "`echo $TARGET_ARCHITECTURE | grep ^s390x`"; then
683688
COMMON_FLAGS="$COMMON_FLAGS -march=z196 "
684689
elif test -n "`echo $TARGET_ARCHITECTURE | grep ^riscv64`"; then
685690
COMMON_FLAGS="$COMMON_FLAGS -march=rv64gc"

0 commit comments

Comments
 (0)