From e7991d160cd8aaa9961935c08664eb85c662ef8b Mon Sep 17 00:00:00 2001 From: Adam Retter Date: Tue, 26 Nov 2019 10:53:23 -0800 Subject: [PATCH] Fix naming of library on PPC64LE (#6080) Summary: **NOTE**: This also needs to be back-ported to be 6.4.6 Fix a regression introduced in f2bf0b2 by https://github.com/facebook/rocksdb/pull/5674 whereby the compiled library would get the wrong name on PPC64LE platforms. On PPC64LE, the regression caused the library to be named `librocksdbjni-linux64.so` instead of `librocksdbjni-linux-ppc64le.so`. This PR corrects the name back to `librocksdbjni-linux-ppc64le.so` and also corrects the ordering of conditional arguments in the Makefile to match the expected order as defined in the documentation for Make. Pull Request resolved: https://github.com/facebook/rocksdb/pull/6080 Differential Revision: D18710351 fbshipit-source-id: d4db87ef378263b57de7f9edce1b7d15644cf9de --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 90b0b3d83b6..98c1479c228 100644 --- a/Makefile +++ b/Makefile @@ -1641,7 +1641,7 @@ JAVA_INCLUDE = -I$(JAVA_HOME)/include/ -I$(JAVA_HOME)/include/linux ifeq ($(PLATFORM), OS_SOLARIS) ARCH := $(shell isainfo -b) else ifeq ($(PLATFORM), OS_OPENBSD) - ifneq (,$(filter $(MACHINE), amd64 arm64 aarch64 sparc64)) + ifneq (,$(filter amd64 ppc64 ppc64le arm64 aarch64 sparc64, $(MACHINE))) ARCH := 64 else ARCH := 32 @@ -1650,10 +1650,10 @@ else ARCH := $(shell getconf LONG_BIT) endif -ifeq (,$(filter $(MACHINE), ppc arm64 aarch64 sparc64)) - ROCKSDBJNILIB = librocksdbjni-linux$(ARCH).so +ifneq (,$(filter ppc% arm64 aarch64 sparc64, $(MACHINE))) + ROCKSDBJNILIB = librocksdbjni-linux-$(MACHINE).so else - ROCKSDBJNILIB = librocksdbjni-linux-$(MACHINE).so + ROCKSDBJNILIB = librocksdbjni-linux$(ARCH).so endif ROCKSDB_JAR = rocksdbjni-$(ROCKSDB_MAJOR).$(ROCKSDB_MINOR).$(ROCKSDB_PATCH)-linux$(ARCH).jar ROCKSDB_JAR_ALL = rocksdbjni-$(ROCKSDB_MAJOR).$(ROCKSDB_MINOR).$(ROCKSDB_PATCH).jar