From 46f8889b6a723d39a042accd13d731519bf3c216 Mon Sep 17 00:00:00 2001 From: sdong Date: Thu, 5 May 2022 11:45:51 -0700 Subject: [PATCH] platform010 gcc (#9946) Summary: Make platform010 gcc build work. Pull Request resolved: https://github.com/facebook/rocksdb/pull/9946 Test Plan: ROCKSDB_FBCODE_BUILD_WITH_PLATFORM010=1 make release -j ROCKSDB_FBCODE_BUILD_WITH_PLATFORM010=1 make all check -j Reviewed By: pdillinger, mdcallag Differential Revision: D36152684 fbshipit-source-id: ca7b0916c51501a72bb15ad33a85e8c5cac5b505 --- build_tools/fbcode_config_platform010.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/build_tools/fbcode_config_platform010.sh b/build_tools/fbcode_config_platform010.sh index 588dd88c2..d978b0aac 100644 --- a/build_tools/fbcode_config_platform010.sh +++ b/build_tools/fbcode_config_platform010.sh @@ -118,10 +118,19 @@ if [ -z "$USE_CLANG" ]; then CXX="$GCC_BASE/bin/g++" AR="$GCC_BASE/bin/gcc-ar" - - CFLAGS+=" -B$BINUTILS" + CFLAGS+=" -B$BINUTILS -nostdinc -nostdlib" + CFLAGS+=" -I$GCC_BASE/include" + CFLAGS+=" -isystem $GCC_BASE/lib/gcc/x86_64-redhat-linux-gnu/11.2.1/include" + CFLAGS+=" -isystem $GCC_BASE/lib/gcc/x86_64-redhat-linux-gnu/11.2.1/install-tools/include" + CFLAGS+=" -isystem $GCC_BASE/lib/gcc/x86_64-redhat-linux-gnu/11.2.1/include-fixed/" CFLAGS+=" -isystem $LIBGCC_INCLUDE" CFLAGS+=" -isystem $GLIBC_INCLUDE" + CFLAGS+=" -I$GLIBC_INCLUDE" + CFLAGS+=" -I$LIBGCC_BASE/include" + CFLAGS+=" -I$LIBGCC_BASE/include/c++/11.x/" + CFLAGS+=" -I$LIBGCC_BASE/include/c++/11.x/x86_64-facebook-linux/" + CFLAGS+=" -I$LIBGCC_BASE/include/c++/11.x/backward" + CFLAGS+=" -isystem $GLIBC_INCLUDE -I$GLIBC_INCLUDE" JEMALLOC=1 else # clang