nixpkgs/pkgs/servers/foundationdb/patches/ldflags-5.1.patch
Austin Seipp a13a0c8de4
foundationdb: refactor vsmake patch application
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2019-05-15 09:54:10 -05:00

91 lines
3.5 KiB
Diff

diff --git a/FDBLibTLS/local.mk b/FDBLibTLS/local.mk
index 0b6eac8..b1891ca 100644
--- a/FDBLibTLS/local.mk
+++ b/FDBLibTLS/local.mk
@@ -1,6 +1,5 @@
FDBLibTLS_CFLAGS := -fPIC -I/usr/local/include -I$(BOOSTDIR)
-FDBLibTLS_STATIC_LIBS := -ltls -lssl -lcrypto
-FDBLibTLS_LDFLAGS := -L/usr/local/lib -static-libstdc++ -static-libgcc -lrt
+FDBLibTLS_LDFLAGS := -L/usr/local/lib -static-libstdc++ -static-libgcc -lrt -ltls -lssl -lcrypto
FDBLibTLS_LDFLAGS += -Wl,-soname,FDBLibTLS.so -Wl,--version-script=FDBLibTLS/FDBLibTLS.map
# The plugin isn't a typical library, so it feels more sensible to have a copy
diff --git a/bindings/c/local.mk b/bindings/c/local.mk
index 44f0c31..7aea5a4 100644
--- a/bindings/c/local.mk
+++ b/bindings/c/local.mk
@@ -29,8 +29,8 @@ fdb_c_tests_HEADERS := -Ibindings/c
CLEAN_TARGETS += fdb_c_tests_clean
ifeq ($(PLATFORM),linux)
- fdb_c_LIBS += lib/libstdc++.a -lm -lpthread -lrt -ldl
- fdb_c_LDFLAGS += -Wl,--version-script=bindings/c/fdb_c.map -static-libgcc -Wl,-z,nodelete
+ fdb_c_LIBS += lib/libstdc++.a
+ fdb_c_LDFLAGS += -Wl,--version-script=bindings/c/fdb_c.map -static-libgcc -Wl,-z,nodelete -lm -lpthread -lrt -ldl
fdb_c_tests_LIBS += -lpthread
endif
diff --git a/bindings/flow/tester/local.mk b/bindings/flow/tester/local.mk
index 2ef4fcb..6e59625 100644
--- a/bindings/flow/tester/local.mk
+++ b/bindings/flow/tester/local.mk
@@ -35,8 +35,7 @@ _fdb_flow_tester_clean:
@rm -rf bindings/flow/bin
ifeq ($(PLATFORM),linux)
- fdb_flow_tester_LIBS += -ldl -lpthread -lrt
- fdb_flow_tester_LDFLAGS += -static-libstdc++ -static-libgcc
+ fdb_flow_tester_LDFLAGS += -static-libstdc++ -static-libgcc -ldl -lpthread -lrt
else ifeq ($(PLATFORM),osx)
fdb_flow_tester_LDFLAGS += -lc++
endif
diff --git a/fdbbackup/local.mk b/fdbbackup/local.mk
index 033fe7d..865fc92 100644
--- a/fdbbackup/local.mk
+++ b/fdbbackup/local.mk
@@ -25,8 +25,7 @@ fdbbackup_LDFLAGS := $(fdbrpc_LDFLAGS)
fdbbackup_LIBS := lib/libfdbclient.a lib/libfdbrpc.a lib/libflow.a
ifeq ($(PLATFORM),linux)
- fdbbackup_LIBS += -ldl -lpthread -lrt
- fdbbackup_LDFLAGS += -static-libstdc++ -static-libgcc
+ fdbbackup_LDFLAGS += -static-libstdc++ -static-libgcc -ldl -lpthread -lrt
# GPerfTools profiler (uncomment to use)
# fdbbackup_CFLAGS += -I/opt/gperftools/include -DUSE_GPERFTOOLS=1
diff --git a/fdbcli/local.mk b/fdbcli/local.mk
index 81a4a42..892c079 100644
--- a/fdbcli/local.mk
+++ b/fdbcli/local.mk
@@ -22,14 +22,13 @@
fdbcli_CFLAGS := $(fdbclient_CFLAGS)
fdbcli_LDFLAGS := $(fdbrpc_LDFLAGS)
-fdbcli_LIBS := lib/libfdbclient.a lib/libfdbrpc.a lib/libflow.a -ldl
+fdbcli_LIBS := lib/libfdbclient.a lib/libfdbrpc.a lib/libflow.a
fdbcli_STATIC_LIBS :=
fdbcli_GENERATED_SOURCES += versions.h
ifeq ($(PLATFORM),linux)
- fdbcli_LDFLAGS += -static-libstdc++ -static-libgcc
- fdbcli_LIBS += -lpthread -lrt
+ fdbcli_LDFLAGS += -static-libstdc++ -static-libgcc -lpthread -lrt -ldl
else ifeq ($(PLATFORM),osx)
fdbcli_LDFLAGS += -lc++
endif
diff --git a/fdbserver/local.mk b/fdbserver/local.mk
index 78cad1b..36f2c0f 100644
--- a/fdbserver/local.mk
+++ b/fdbserver/local.mk
@@ -25,8 +25,7 @@ fdbserver_LDFLAGS := $(fdbrpc_LDFLAGS)
fdbserver_LIBS := lib/libfdbclient.a lib/libfdbrpc.a lib/libflow.a
ifeq ($(PLATFORM),linux)
- fdbserver_LIBS += -ldl -lpthread -lrt
- fdbserver_LDFLAGS += -static-libstdc++ -static-libgcc
+ fdbserver_LDFLAGS += -static-libstdc++ -static-libgcc -ldl -lpthread -lrt
# GPerfTools profiler (uncomment to use)
# fdbserver_CFLAGS += -I/opt/gperftools/include -DUSE_GPERFTOOLS=1