aboutsummaryrefslogtreecommitdiffstats
path: root/testing/rocksdb/ppc64le-determine-platform.patch
diff options
context:
space:
mode:
Diffstat (limited to 'testing/rocksdb/ppc64le-determine-platform.patch')
-rw-r--r--testing/rocksdb/ppc64le-determine-platform.patch11
1 files changed, 11 insertions, 0 deletions
diff --git a/testing/rocksdb/ppc64le-determine-platform.patch b/testing/rocksdb/ppc64le-determine-platform.patch
new file mode 100644
index 0000000000..05bee96187
--- /dev/null
+++ b/testing/rocksdb/ppc64le-determine-platform.patch
@@ -0,0 +1,11 @@
+--- a/build_tools/build_detect_platform
++++ b/build_tools/build_detect_platform
+@@ -507,7 +507,7 @@
+ if test -z "$PORTABLE"; then
+ 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]+`
++ POWER=`cat /proc/cpuinfo | grep -m1 -E -o POWER[0-9]+ | awk '{print tolower($0)}'`
+ COMMON_FLAGS="$COMMON_FLAGS -mcpu=$POWER -mtune=$POWER "
+ elif test -n "`echo $TARGET_ARCHITECTURE | grep ^s390x`"; then
+ COMMON_FLAGS="$COMMON_FLAGS -march=z10 "