From d08aad7fc46955c08d6f59d345f528dec765af8f Mon Sep 17 00:00:00 2001 From: mpilman Date: Wed, 27 Feb 2019 15:39:47 -0800 Subject: [PATCH] Old build system now working on both docker images --- README.md | 2 +- bindings/c/local.mk | 3 +++ build/link-wrapper.sh | 2 +- fdbserver/local.mk | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c8caf4f27a..851f374646 100755 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ become the only build system available. 1. Run the docker image interactively [Docker Run](https://docs.docker.com/engine/reference/run/#general-form) with the directory containing the foundationdb repo mounted [Docker Mounts](https://docs.docker.com/storage/volumes/). ```shell - docker run -it -v '/local/dir/path/foundationdb:/docker/dir/path/foundationdb' foundationdb/foundationdb-build:latest /bin/bash + docker run -it -v '/local/dir/path/foundationdb:/docker/dir/path/foundationdb' foundationdb/foundationdb-build:latest ``` 1. Navigate to the container's mounted directory which contains the foundationdb repo. diff --git a/bindings/c/local.mk b/bindings/c/local.mk index 901294ae9a..eebd6233c1 100644 --- a/bindings/c/local.mk +++ b/bindings/c/local.mk @@ -31,6 +31,9 @@ CLEAN_TARGETS += fdb_c_tests_clean ifeq ($(PLATFORM),linux) fdb_c_LDFLAGS += -Wl,--version-script=bindings/c/fdb_c.map -static-libgcc -Wl,-z,nodelete -lm -lpthread -lrt -ldl + ifeq ($(LIBSTDCPP_HACK),1) + fdb_c_LIBS += lib/libstdc++.a + endif fdb_c_tests_LIBS += -lpthread endif diff --git a/build/link-wrapper.sh b/build/link-wrapper.sh index 8d29498a1a..9c80359e68 100755 --- a/build/link-wrapper.sh +++ b/build/link-wrapper.sh @@ -23,7 +23,7 @@ case $1 in OPTIONS= fi - OPTIONS=$( eval echo "$OPTIONS $LDFLAGS \$$2_LDFLAGS \$$2_OBJECTS \$$2_LIBS \$$2_STATIC_LIBS_REAL -o $3" ) + OPTIONS=$( eval echo "$OPTIONS $LDFLAGS \$$2_OBJECTS \$$2_LIBS \$$2_STATIC_LIBS_REAL \$$2_LDFLAGS -o $3" ) if echo $OPTIONS | grep -q -- -static-libstdc\+\+ ; then OPTIONS=$( echo $OPTIONS | sed -e s,-static-libstdc\+\+,, -e s,\$,\ `$CC -print-file-name=libstdc++.a`\ -lm, ) diff --git a/fdbserver/local.mk b/fdbserver/local.mk index fde2f22fba..7f3dcb10d7 100644 --- a/fdbserver/local.mk +++ b/fdbserver/local.mk @@ -26,7 +26,7 @@ fdbserver_LIBS := lib/libfdbclient.a lib/libfdbrpc.a lib/libflow.a $(FDB_TLS_LIB fdbserver_STATIC_LIBS := $(TLS_LIBS) ifeq ($(PLATFORM),linux) - fdbserver_LDFLAGS += -static-libstdc++ -static-libgcc -ldl -lpthread -lrt + fdbserver_LDFLAGS += -ldl -lpthread -lrt -static-libstdc++ -static-libgcc # GPerfTools profiler (uncomment to use) # fdbserver_CFLAGS += -I/opt/gperftools/include -DUSE_GPERFTOOLS=1