range_tree requires GNU libc on ppc64 (#8070)
Summary: If the platform is ppc64 and the libc is not GNU libc, then we exclude the range_tree from compilation. See https://jira.percona.com/browse/PS-7559 Pull Request resolved: https://github.com/facebook/rocksdb/pull/8070 Reviewed By: jay-zhuang Differential Revision: D27246004 Pulled By: mrambacher fbshipit-source-id: 59d8433242ce7ce608988341becb4f83312445f5
This commit is contained in:
parent
e32a64aa54
commit
5884cf5d5b
6
Makefile
6
Makefile
@ -510,6 +510,12 @@ ifeq ($(USE_FOLLY_DISTRIBUTED_MUTEX),1)
|
|||||||
LIB_OBJECTS += $(patsubst %.cpp, $(OBJ_DIR)/%.o, $(FOLLY_SOURCES))
|
LIB_OBJECTS += $(patsubst %.cpp, $(OBJ_DIR)/%.o, $(FOLLY_SOURCES))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# range_tree is not compatible with non GNU libc on ppc64
|
||||||
|
# see https://jira.percona.com/browse/PS-7559
|
||||||
|
ifneq ($(PPC_LIBC_IS_GNU),0)
|
||||||
|
LIB_OBJECTS += $(patsubst %.cc, $(OBJ_DIR)/%.o, $(RANGE_TREE_SOURCES))
|
||||||
|
endif
|
||||||
|
|
||||||
GTEST = $(OBJ_DIR)/$(GTEST_DIR)/gtest/gtest-all.o
|
GTEST = $(OBJ_DIR)/$(GTEST_DIR)/gtest/gtest-all.o
|
||||||
TESTUTIL = $(OBJ_DIR)/test_util/testutil.o
|
TESTUTIL = $(OBJ_DIR)/test_util/testutil.o
|
||||||
TESTHARNESS = $(OBJ_DIR)/test_util/testharness.o $(TESTUTIL) $(GTEST)
|
TESTHARNESS = $(OBJ_DIR)/test_util/testharness.o $(TESTUTIL) $(GTEST)
|
||||||
|
@ -135,11 +135,15 @@ def generate_targets(repo_path, deps_map):
|
|||||||
TARGETS.add_library(
|
TARGETS.add_library(
|
||||||
"rocksdb_lib",
|
"rocksdb_lib",
|
||||||
src_mk["LIB_SOURCES"] +
|
src_mk["LIB_SOURCES"] +
|
||||||
|
# always add range_tree, it's only excluded on ppc64, which we don't use internally
|
||||||
|
src_mk["RANGE_TREE_SOURCES"] +
|
||||||
src_mk["TOOL_LIB_SOURCES"])
|
src_mk["TOOL_LIB_SOURCES"])
|
||||||
# rocksdb_whole_archive_lib
|
# rocksdb_whole_archive_lib
|
||||||
TARGETS.add_library(
|
TARGETS.add_library(
|
||||||
"rocksdb_whole_archive_lib",
|
"rocksdb_whole_archive_lib",
|
||||||
src_mk["LIB_SOURCES"] +
|
src_mk["LIB_SOURCES"] +
|
||||||
|
# always add range_tree, it's only excluded on ppc64, which we don't use internally
|
||||||
|
src_mk["RANGE_TREE_SOURCES"] +
|
||||||
src_mk["TOOL_LIB_SOURCES"],
|
src_mk["TOOL_LIB_SOURCES"],
|
||||||
deps=None,
|
deps=None,
|
||||||
headers=None,
|
headers=None,
|
||||||
|
@ -663,6 +663,23 @@ else
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test -n "`echo $TARGET_ARCHITECTURE | grep ^ppc64`"; then
|
||||||
|
# check for GNU libc on ppc64
|
||||||
|
$CXX -x c++ - -o /dev/null 2>/dev/null <<EOF
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <gnu/libc-version.h>
|
||||||
|
|
||||||
|
int main(int argc, char *argv[]) {
|
||||||
|
printf("GNU libc version: %s\n", gnu_get_libc_version());
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
if [ "$?" != 0 ]; then
|
||||||
|
PPC_LIBC_IS_GNU=0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if test "$TRY_SSE_ETC"; then
|
if test "$TRY_SSE_ETC"; then
|
||||||
# The USE_SSE flag now means "attempt to compile with widely-available
|
# The USE_SSE flag now means "attempt to compile with widely-available
|
||||||
# Intel architecture extensions utilized by specific optimizations in the
|
# Intel architecture extensions utilized by specific optimizations in the
|
||||||
@ -856,3 +873,6 @@ echo "LUA_PATH=$LUA_PATH" >> "$OUTPUT"
|
|||||||
if test -n "$USE_FOLLY_DISTRIBUTED_MUTEX"; then
|
if test -n "$USE_FOLLY_DISTRIBUTED_MUTEX"; then
|
||||||
echo "USE_FOLLY_DISTRIBUTED_MUTEX=$USE_FOLLY_DISTRIBUTED_MUTEX" >> "$OUTPUT"
|
echo "USE_FOLLY_DISTRIBUTED_MUTEX=$USE_FOLLY_DISTRIBUTED_MUTEX" >> "$OUTPUT"
|
||||||
fi
|
fi
|
||||||
|
if test -n "$PPC_LIBC_IS_GNU"; then
|
||||||
|
echo "PPC_LIBC_IS_GNU=$PPC_LIBC_IS_GNU" >> "$OUTPUT"
|
||||||
|
fi
|
||||||
|
26
src.mk
26
src.mk
@ -255,18 +255,6 @@ LIB_SOURCES = \
|
|||||||
utilities/transactions/lock/lock_manager.cc \
|
utilities/transactions/lock/lock_manager.cc \
|
||||||
utilities/transactions/lock/point/point_lock_tracker.cc \
|
utilities/transactions/lock/point/point_lock_tracker.cc \
|
||||||
utilities/transactions/lock/point/point_lock_manager.cc \
|
utilities/transactions/lock/point/point_lock_manager.cc \
|
||||||
utilities/transactions/lock/range/range_tree/lib/locktree/concurrent_tree.cc \
|
|
||||||
utilities/transactions/lock/range/range_tree/lib/locktree/keyrange.cc \
|
|
||||||
utilities/transactions/lock/range/range_tree/lib/locktree/lock_request.cc \
|
|
||||||
utilities/transactions/lock/range/range_tree/lib/locktree/locktree.cc \
|
|
||||||
utilities/transactions/lock/range/range_tree/lib/locktree/manager.cc \
|
|
||||||
utilities/transactions/lock/range/range_tree/lib/locktree/range_buffer.cc \
|
|
||||||
utilities/transactions/lock/range/range_tree/lib/locktree/treenode.cc \
|
|
||||||
utilities/transactions/lock/range/range_tree/lib/locktree/txnid_set.cc \
|
|
||||||
utilities/transactions/lock/range/range_tree/lib/locktree/wfg.cc \
|
|
||||||
utilities/transactions/lock/range/range_tree/lib/standalone_port.cc \
|
|
||||||
utilities/transactions/lock/range/range_tree/lib/util/dbt.cc \
|
|
||||||
utilities/transactions/lock/range/range_tree/lib/util/memarena.cc \
|
|
||||||
utilities/transactions/optimistic_transaction.cc \
|
utilities/transactions/optimistic_transaction.cc \
|
||||||
utilities/transactions/optimistic_transaction_db_impl.cc \
|
utilities/transactions/optimistic_transaction_db_impl.cc \
|
||||||
utilities/transactions/pessimistic_transaction.cc \
|
utilities/transactions/pessimistic_transaction.cc \
|
||||||
@ -298,6 +286,20 @@ LIB_SOURCES_ASM =
|
|||||||
LIB_SOURCES_C =
|
LIB_SOURCES_C =
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
RANGE_TREE_SOURCES =\
|
||||||
|
utilities/transactions/lock/range/range_tree/lib/locktree/concurrent_tree.cc \
|
||||||
|
utilities/transactions/lock/range/range_tree/lib/locktree/keyrange.cc \
|
||||||
|
utilities/transactions/lock/range/range_tree/lib/locktree/lock_request.cc \
|
||||||
|
utilities/transactions/lock/range/range_tree/lib/locktree/locktree.cc \
|
||||||
|
utilities/transactions/lock/range/range_tree/lib/locktree/manager.cc \
|
||||||
|
utilities/transactions/lock/range/range_tree/lib/locktree/range_buffer.cc \
|
||||||
|
utilities/transactions/lock/range/range_tree/lib/locktree/treenode.cc \
|
||||||
|
utilities/transactions/lock/range/range_tree/lib/locktree/txnid_set.cc \
|
||||||
|
utilities/transactions/lock/range/range_tree/lib/locktree/wfg.cc \
|
||||||
|
utilities/transactions/lock/range/range_tree/lib/standalone_port.cc \
|
||||||
|
utilities/transactions/lock/range/range_tree/lib/util/dbt.cc \
|
||||||
|
utilities/transactions/lock/range/range_tree/lib/util/memarena.cc
|
||||||
|
|
||||||
TOOL_LIB_SOURCES = \
|
TOOL_LIB_SOURCES = \
|
||||||
tools/io_tracer_parser_tool.cc \
|
tools/io_tracer_parser_tool.cc \
|
||||||
tools/ldb_cmd.cc \
|
tools/ldb_cmd.cc \
|
||||||
|
Loading…
Reference in New Issue
Block a user