nixpkgs/pkgs/servers/foundationdb/patches/ldflags-6.0.patch

79 lines
3 KiB
Diff
Raw Normal View History

diff --git a/bindings/c/local.mk b/bindings/c/local.mk
index c861a29c..ff886e93 100644
--- a/bindings/c/local.mk
+++ b/bindings/c/local.mk
@@ -30,8 +30,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 2ef4fcb7..6e59625c 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 ca5dbab6..012f0130 100644
--- a/fdbbackup/local.mk
+++ b/fdbbackup/local.mk
@@ -26,8 +26,7 @@ fdbbackup_LIBS := lib/libfdbclient.a lib/libfdbrpc.a lib/libflow.a $(FDB_TLS_LIB
fdbbackup_STATIC_LIBS := $(TLS_LIBS)
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 fd738876..3af026b9 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 $(FDB_TLS_LIB)
+fdbcli_LIBS := lib/libfdbclient.a lib/libfdbrpc.a lib/libflow.a $(FDB_TLS_LIB)
fdbcli_STATIC_LIBS := $(TLS_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 690916d0..475abbaf 100644
--- a/fdbserver/local.mk
+++ b/fdbserver/local.mk
@@ -26,8 +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_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