uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
52
pkgs/servers/foundationdb/patches/clang-libcxx.patch
Normal file
52
pkgs/servers/foundationdb/patches/clang-libcxx.patch
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
commit 7ed4745a092a203f92fc37ab5894e92117db0c94
|
||||
Author: Austin Seipp <aseipp@pobox.com>
|
||||
Date: Sat May 4 15:23:35 2019 -0500
|
||||
|
||||
flow: fix a build failure with Clang/libcxx on Linux
|
||||
|
||||
11bd7d7da introduced a hack on Linux to work around a missing symbol in
|
||||
libstdc++'s _pic library on Ubuntu. Unfortunately, this causes the build
|
||||
to fail when using Clang, as it doesn't believe this symbol is part of
|
||||
its headers in c++11 mode.
|
||||
|
||||
Unfortunately there's no good way to distinguish libcxx from libstdc++
|
||||
with the preprocessor, so we merely gate it by only checking for clang,
|
||||
iff we are on Linux.
|
||||
|
||||
With this change, Clang 8.x can build FoundationDB on Linux using libcxx
|
||||
as the standard C++ library.
|
||||
|
||||
Signed-off-by: Austin Seipp <aseipp@pobox.com>
|
||||
|
||||
diff --git a/flow/Platform.cpp b/flow/Platform.cpp
|
||||
index 3d3f1ac0..9f21dfd4 100644
|
||||
--- a/flow/Platform.cpp
|
||||
+++ b/flow/Platform.cpp
|
||||
@@ -2841,13 +2841,26 @@ void setupSlowTaskProfiler() {
|
||||
#endif
|
||||
}
|
||||
|
||||
-#ifdef __linux__
|
||||
+#if defined(__linux__) && !defined(__clang__)
|
||||
// There's no good place to put this, so it's here.
|
||||
// Ubuntu's packaging of libstdc++_pic offers different symbols than libstdc++. Go figure.
|
||||
// Notably, it's missing a definition of std::istream::ignore(long), which causes compilation errors
|
||||
// in the bindings. Thus, we provide weak versions of their definitions, so that if the
|
||||
// linked-against libstdc++ is missing their definitions, we'll be able to use the provided
|
||||
// ignore(long, int) version.
|
||||
+//
|
||||
+// Note that this hack is DISABLED when we use Clang. It is only needed when we statically link
|
||||
+// to the _pic libraries, but only official FDB Linux binaries are built this way using GCC. If we
|
||||
+// don't use the _pic libraries, then this hack is entirely unneeded -- likely the case when using
|
||||
+// Clang on Linux.
|
||||
+//
|
||||
+// Doing this allows us to use LLVM's libc++ with Clang on Linux -- otherwise, providing
|
||||
+// a weak symbol definition for an internal (non-public) class member fails (due to that member
|
||||
+// being non-existant on libc++.) See upstream GitHub issue #1533 for more information.
|
||||
+//
|
||||
+// TODO FIXME: Obliterate this when the official build environment is upgraded beyond Ubuntu 14.04.
|
||||
+// (This problem should be fixed in later LTS releases.)
|
||||
+
|
||||
#include <istream>
|
||||
namespace std {
|
||||
typedef basic_istream<char, std::char_traits<char>> char_basic_istream;
|
||||
42
pkgs/servers/foundationdb/patches/fix-scm-version.patch
Normal file
42
pkgs/servers/foundationdb/patches/fix-scm-version.patch
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
diff --git a/build/scver.mk b/build/scver.mk
|
||||
index bdae8be..7539864 100644
|
||||
--- a/build/scver.mk
|
||||
+++ b/build/scver.mk
|
||||
@@ -98,33 +98,10 @@ endif
|
||||
GITPRESENT := $(wildcard $(FDBDIR)/.git)
|
||||
HGPRESENT := $(wildcard $(FDBDIR)/.hg)
|
||||
|
||||
-# Use Git, if not missing
|
||||
-ifneq ($(GITPRESENT),)
|
||||
- SCVER := $(shell cd "$(FDBDIR)" && git --version 2>/dev/null)
|
||||
- ifneq ($(SCVER),)
|
||||
- VERSION_ID := $(shell cd "$(FDBDIR)" && git rev-parse --verify HEAD)
|
||||
- SOURCE_CONTROL := GIT
|
||||
- SCBRANCH := $(shell cd "$(FDBDIR)" && git rev-parse --abbrev-ref HEAD)
|
||||
- else
|
||||
-$(error Missing git executable on $(PLATFORM) )
|
||||
- endif
|
||||
-# Otherwise, use Mercurial
|
||||
-else
|
||||
- # Otherwise, use Mercurial, if not missing
|
||||
- ifneq ($(HGPRESENT),)
|
||||
- SCVER := $(shell cd "$(FDBDIR)" && hg --version 2>/dev/null)
|
||||
- ifdef SCVER
|
||||
- VERSION_ID := $(shell cd "$(FDBDIR)" && hg id -n)
|
||||
- SOURCE_CONTROL := MERCURIAL
|
||||
- SCBRANCH := $(shell cd "$(FDBDIR)" && hg branch)
|
||||
- else
|
||||
-$(error Missing hg executable on $(PLATFORM))
|
||||
- endif
|
||||
- else
|
||||
- FDBFILES := (shell ls -la $(FDBDIR))
|
||||
-$(error Missing source control information for source on $(PLATFORM) in directory: $(FDBDIR) with files: $(FDBFILES))
|
||||
- endif
|
||||
-endif
|
||||
+# NixOS-specific non-VCS packaging, filled out by the nix build
|
||||
+SOURCE_CONTROL := GIT
|
||||
+VERSION_ID := @NIXOS_FDB_VERSION_ID@
|
||||
+SCBRANCH := @NIXOS_FDB_SCBRANCH@
|
||||
|
||||
# Set the RELEASE variable based on the KVRELEASE variable.
|
||||
ifeq ($(KVRELEASE),1)
|
||||
138
pkgs/servers/foundationdb/patches/gcc-fixes.patch
Normal file
138
pkgs/servers/foundationdb/patches/gcc-fixes.patch
Normal file
|
|
@ -0,0 +1,138 @@
|
|||
diff --git a/fdbrpc/ContinuousSample.h b/fdbrpc/ContinuousSample.h
|
||||
index 54ff1b109..577c228ae 100644
|
||||
--- a/fdbrpc/ContinuousSample.h
|
||||
+++ b/fdbrpc/ContinuousSample.h
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "flow/IRandom.h"
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
+#include <cmath>
|
||||
|
||||
template <class T>
|
||||
class ContinuousSample {
|
||||
diff --git a/fdbrpc/Smoother.h b/fdbrpc/Smoother.h
|
||||
index 3ed8e6e98..fb4694750 100644
|
||||
--- a/fdbrpc/Smoother.h
|
||||
+++ b/fdbrpc/Smoother.h
|
||||
@@ -23,6 +23,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "flow/flow.h"
|
||||
+#include <cmath>
|
||||
|
||||
struct Smoother {
|
||||
// Times (t) are expected to be nondecreasing
|
||||
@@ -90,4 +91,4 @@ struct TimerSmoother {
|
||||
double time, total, estimate;
|
||||
};
|
||||
|
||||
-#endif
|
||||
\ No newline at end of file
|
||||
+#endif
|
||||
diff --git a/fdbrpc/libcoroutine/Coro.c b/fdbrpc/libcoroutine/Coro.c
|
||||
index cbfdc8fde..9993cee44 100644
|
||||
--- a/fdbrpc/libcoroutine/Coro.c
|
||||
+++ b/fdbrpc/libcoroutine/Coro.c
|
||||
@@ -66,6 +66,8 @@ VALGRIND_STACK_DEREGISTER((coro)->valgrindStackId)
|
||||
#define STACK_DEREGISTER(coro)
|
||||
#endif
|
||||
|
||||
+#pragma GCC diagnostic ignored "-Wreturn-local-addr"
|
||||
+
|
||||
// Define outside
|
||||
extern intptr_t g_stackYieldLimit;
|
||||
|
||||
diff --git a/fdbserver/Knobs.cpp b/fdbserver/Knobs.cpp
|
||||
index 819c513c6..acfbfe7db 100644
|
||||
--- a/fdbserver/Knobs.cpp
|
||||
+++ b/fdbserver/Knobs.cpp
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "Knobs.h"
|
||||
#include "fdbrpc/Locality.h"
|
||||
+#include <cmath>
|
||||
|
||||
ServerKnobs const* SERVER_KNOBS = new ServerKnobs();
|
||||
|
||||
diff --git a/flow/Knobs.cpp b/flow/Knobs.cpp
|
||||
index b485a8495..82541d439 100644
|
||||
--- a/flow/Knobs.cpp
|
||||
+++ b/flow/Knobs.cpp
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "Knobs.h"
|
||||
#include "flow/flow.h"
|
||||
+#include <cmath>
|
||||
|
||||
FlowKnobs const* FLOW_KNOBS = new FlowKnobs();
|
||||
|
||||
diff --git a/flow/Platform.cpp b/flow/Platform.cpp
|
||||
index 69dac889a..62bda9edb 100644
|
||||
--- a/flow/Platform.cpp
|
||||
+++ b/flow/Platform.cpp
|
||||
@@ -40,6 +40,7 @@
|
||||
#include <algorithm>
|
||||
|
||||
#include <sys/types.h>
|
||||
+#include <sys/sysmacros.h>
|
||||
#include <time.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
@@ -623,7 +624,7 @@ void getDiskStatistics(std::string const& directory, uint64_t& currentIOs, uint6
|
||||
unsigned int minorId;
|
||||
disk_stream >> majorId;
|
||||
disk_stream >> minorId;
|
||||
- if(majorId == (unsigned int) major(buf.st_dev) && minorId == (unsigned int) minor(buf.st_dev)) {
|
||||
+ if(majorId == (unsigned int) gnu_dev_major(buf.st_dev) && minorId == (unsigned int) gnu_dev_minor(buf.st_dev)) {
|
||||
std::string ignore;
|
||||
uint64_t rd_ios; /* # of reads completed */
|
||||
// This is the total number of reads completed successfully.
|
||||
diff --git a/flow/Profiler.actor.cpp b/flow/Profiler.actor.cpp
|
||||
index 27af613e6..69f38c237 100644
|
||||
--- a/flow/Profiler.actor.cpp
|
||||
+++ b/flow/Profiler.actor.cpp
|
||||
@@ -35,8 +35,6 @@
|
||||
|
||||
extern volatile int profilingEnabled;
|
||||
|
||||
-static uint64_t gettid() { return syscall(__NR_gettid); }
|
||||
-
|
||||
struct SignalClosure {
|
||||
void (* func)(int, siginfo_t*, void*, void*);
|
||||
void *userdata;
|
||||
diff --git a/flow/TDMetric.actor.h b/flow/TDMetric.actor.h
|
||||
index 5421b83b5..711a96093 100755
|
||||
--- a/flow/TDMetric.actor.h
|
||||
+++ b/flow/TDMetric.actor.h
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "CompressedInt.h"
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
+#include <cmath>
|
||||
|
||||
struct MetricNameRef {
|
||||
MetricNameRef() {}
|
||||
diff --git a/flow/flow.h b/flow/flow.h
|
||||
index 0c220afae..f685fbc63 100644
|
||||
--- a/flow/flow.h
|
||||
+++ b/flow/flow.h
|
||||
@@ -248,19 +248,6 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
- bool operator == (ErrorOr const& o) const {
|
||||
- return error == o.error && (!present() || get() == o.get());
|
||||
- }
|
||||
- bool operator != (ErrorOr const& o) const {
|
||||
- return !(*this == o);
|
||||
- }
|
||||
-
|
||||
- bool operator < (ErrorOr const& o) const {
|
||||
- if (error != o.error) return error < o.error;
|
||||
- if (!present()) return false;
|
||||
- return get() < o.get();
|
||||
- }
|
||||
-
|
||||
bool isError() const { return error.code() != invalid_error_code; }
|
||||
bool isError(int code) const { return error.code() == code; }
|
||||
Error getError() const { ASSERT(isError()); return error; }
|
||||
137
pkgs/servers/foundationdb/patches/include-fixes-6.0.patch
Normal file
137
pkgs/servers/foundationdb/patches/include-fixes-6.0.patch
Normal file
|
|
@ -0,0 +1,137 @@
|
|||
diff --git a/fdbrpc/ContinuousSample.h b/fdbrpc/ContinuousSample.h
|
||||
index 54ff1b109..577c228ae 100644
|
||||
--- a/fdbrpc/ContinuousSample.h
|
||||
+++ b/fdbrpc/ContinuousSample.h
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "flow/IRandom.h"
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
+#include <cmath>
|
||||
|
||||
template <class T>
|
||||
class ContinuousSample {
|
||||
diff --git a/fdbrpc/Smoother.h b/fdbrpc/Smoother.h
|
||||
index 3ed8e6e98..f3e4504b6 100644
|
||||
--- a/fdbrpc/Smoother.h
|
||||
+++ b/fdbrpc/Smoother.h
|
||||
@@ -23,6 +23,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "flow/flow.h"
|
||||
+#include <cmath>
|
||||
|
||||
struct Smoother {
|
||||
// Times (t) are expected to be nondecreasing
|
||||
@@ -50,7 +51,7 @@ struct Smoother {
|
||||
double elapsed = t - time;
|
||||
if(elapsed) {
|
||||
time = t;
|
||||
- estimate += (total-estimate) * (1-exp( -elapsed/eFoldingTime ));
|
||||
+ estimate += (total-estimate) * (1-std::exp( -elapsed/eFoldingTime ));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,11 +84,11 @@ struct TimerSmoother {
|
||||
void update(double t) {
|
||||
double elapsed = t - time;
|
||||
time = t;
|
||||
- estimate += (total-estimate) * (1-exp( -elapsed/eFoldingTime ));
|
||||
+ estimate += (total-estimate) * (1-std::exp( -elapsed/eFoldingTime ));
|
||||
}
|
||||
|
||||
double eFoldingTime;
|
||||
double time, total, estimate;
|
||||
};
|
||||
|
||||
-#endif
|
||||
\ No newline at end of file
|
||||
+#endif
|
||||
diff --git a/fdbserver/Knobs.cpp b/fdbserver/Knobs.cpp
|
||||
index a924bc905..0dc70e7ac 100644
|
||||
--- a/fdbserver/Knobs.cpp
|
||||
+++ b/fdbserver/Knobs.cpp
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "Knobs.h"
|
||||
#include "fdbrpc/Locality.h"
|
||||
+#include <cmath>
|
||||
|
||||
ServerKnobs const* SERVER_KNOBS = new ServerKnobs();
|
||||
|
||||
diff --git a/flow/Knobs.cpp b/flow/Knobs.cpp
|
||||
index 2d706dddd..5dbe08861 100644
|
||||
--- a/flow/Knobs.cpp
|
||||
+++ b/flow/Knobs.cpp
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "Knobs.h"
|
||||
#include "flow/flow.h"
|
||||
+#include <cmath>
|
||||
|
||||
FlowKnobs const* FLOW_KNOBS = new FlowKnobs();
|
||||
|
||||
@@ -128,7 +129,7 @@ FlowKnobs::FlowKnobs(bool randomize, bool isSimulated) {
|
||||
init( MAX_METRICS, 600 );
|
||||
init( MAX_METRIC_SIZE, 2500 );
|
||||
init( MAX_METRIC_LEVEL, 25 );
|
||||
- init( METRIC_LEVEL_DIVISOR, log(4) );
|
||||
+ init( METRIC_LEVEL_DIVISOR, std::log(4) );
|
||||
init( METRIC_LIMIT_START_QUEUE_SIZE, 10 ); // The queue size at which to start restricting logging by disabling levels
|
||||
init( METRIC_LIMIT_RESPONSE_FACTOR, 10 ); // The additional queue size at which to disable logging of another level (higher == less restrictive)
|
||||
|
||||
diff --git a/flow/Platform.cpp b/flow/Platform.cpp
|
||||
index a754c8747..4d47fad32 100644
|
||||
--- a/flow/Platform.cpp
|
||||
+++ b/flow/Platform.cpp
|
||||
@@ -98,6 +98,8 @@
|
||||
#include <sys/resource.h>
|
||||
/* Needed for crash handler */
|
||||
#include <signal.h>
|
||||
+/* Needed for major() and minor() with recent glibc */
|
||||
+#include <sys/sysmacros.h>
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
diff --git a/flow/Profiler.actor.cpp b/flow/Profiler.actor.cpp
|
||||
index 4603dcb77..78eda7278 100644
|
||||
--- a/flow/Profiler.actor.cpp
|
||||
+++ b/flow/Profiler.actor.cpp
|
||||
@@ -35,8 +35,6 @@
|
||||
|
||||
extern volatile int profilingEnabled;
|
||||
|
||||
-static uint64_t gettid() { return syscall(__NR_gettid); }
|
||||
-
|
||||
struct SignalClosure {
|
||||
void (* func)(int, siginfo_t*, void*, void*);
|
||||
void *userdata;
|
||||
diff --git a/flow/TDMetric.actor.h b/flow/TDMetric.actor.h
|
||||
index 306352c39..fc63e12f9 100755
|
||||
--- a/flow/TDMetric.actor.h
|
||||
+++ b/flow/TDMetric.actor.h
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "genericactors.actor.h"
|
||||
#include "CompressedInt.h"
|
||||
#include <algorithm>
|
||||
+#include <cmath>
|
||||
#include <functional>
|
||||
|
||||
struct MetricNameRef {
|
||||
@@ -799,7 +800,7 @@ struct EventMetric : E, ReferenceCounted<EventMetric<E>>, MetricUtil<EventMetric
|
||||
if (x == 0.0)
|
||||
l = FLOW_KNOBS->MAX_METRIC_LEVEL-1;
|
||||
else
|
||||
- l = std::min(FLOW_KNOBS->MAX_METRIC_LEVEL-1, (int64_t)(::log(1.0/x) / FLOW_KNOBS->METRIC_LEVEL_DIVISOR));
|
||||
+ l = std::min(FLOW_KNOBS->MAX_METRIC_LEVEL-1, (int64_t)(std::log(1.0/x) / FLOW_KNOBS->METRIC_LEVEL_DIVISOR));
|
||||
|
||||
if(!canLog(l))
|
||||
return 0;
|
||||
@@ -1274,7 +1275,7 @@ public:
|
||||
l = std::min(
|
||||
FLOW_KNOBS->MAX_METRIC_LEVEL-1,
|
||||
(int64_t)(
|
||||
- log((toggleTime - tv.time) / x) /
|
||||
+ std::log((toggleTime - tv.time) / x) /
|
||||
FLOW_KNOBS->METRIC_LEVEL_DIVISOR
|
||||
)
|
||||
);
|
||||
90
pkgs/servers/foundationdb/patches/ldflags-5.1.patch
Normal file
90
pkgs/servers/foundationdb/patches/ldflags-5.1.patch
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
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
|
||||
90
pkgs/servers/foundationdb/patches/ldflags-5.2.patch
Normal file
90
pkgs/servers/foundationdb/patches/ldflags-5.2.patch
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
diff --git a/FDBLibTLS/local.mk b/FDBLibTLS/local.mk
|
||||
index 5e6b9cfb..73f4e5f3 100644
|
||||
--- a/FDBLibTLS/local.mk
|
||||
+++ b/FDBLibTLS/local.mk
|
||||
@@ -1,6 +1,5 @@
|
||||
FDBLibTLS_CFLAGS := -fPIC -I/usr/local/include -I$(BOOSTDIR) -Ifdbrpc
|
||||
-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 44f0c31b..7aea5a4f 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 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 033fe7d4..865fc923 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 81a4a42e..892c079c 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 78cad1bf..36f2c0f7 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
|
||||
78
pkgs/servers/foundationdb/patches/ldflags-6.0.patch
Normal file
78
pkgs/servers/foundationdb/patches/ldflags-6.0.patch
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
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
|
||||
24
pkgs/servers/foundationdb/patches/stdexcept-6.1.patch
Normal file
24
pkgs/servers/foundationdb/patches/stdexcept-6.1.patch
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
diff --git a/FDBLibTLS/FDBLibTLSPolicy.cpp b/FDBLibTLS/FDBLibTLSPolicy.cpp
|
||||
index 728ff871d..46e1dd289 100644
|
||||
--- a/FDBLibTLS/FDBLibTLSPolicy.cpp
|
||||
+++ b/FDBLibTLS/FDBLibTLSPolicy.cpp
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <algorithm>
|
||||
#include <exception>
|
||||
#include <map>
|
||||
+#include <stdexcept>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
diff --git a/FDBLibTLS/FDBLibTLSVerify.cpp b/FDBLibTLS/FDBLibTLSVerify.cpp
|
||||
index 594389916..1c8b9b50d 100644
|
||||
--- a/FDBLibTLS/FDBLibTLSVerify.cpp
|
||||
+++ b/FDBLibTLS/FDBLibTLSVerify.cpp
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <algorithm>
|
||||
#include <exception>
|
||||
#include <cstring>
|
||||
+#include <stdexcept>
|
||||
|
||||
static int hexValue(char c) {
|
||||
static char const digits[] = "0123456789ABCDEF";
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
commit 8076537a52bb026941f13f5542395aac69ef0825
|
||||
Author: Austin Seipp <aseipp@pobox.com>
|
||||
Date: Sat May 4 17:34:51 2019 -0500
|
||||
|
||||
cmake: add workarounds for NixOS-specific deficiencies [NixOS]
|
||||
|
||||
The NixOS debug builder hook adds '-Wa,--compress-debug-sections' to the
|
||||
link flags (it actually adds it to the compiler flags, but the compiler
|
||||
is used for linking, so...). This makes the compiler angry when -Werror
|
||||
is passed, because it's unused at link-time (-Wa applies to the
|
||||
assembler). Suppress this warning with -Wno-unused-command-line-argument
|
||||
|
||||
NB: we *could* use -Wno-error=unused-command-line-argument, but that
|
||||
still results in warnings anyway, just not fatal ones. We'd like to
|
||||
remove them all for the sake of the build output.
|
||||
|
||||
Signed-off-by: Austin Seipp <aseipp@pobox.com>
|
||||
|
||||
diff --git a/cmake/ConfigureCompiler.cmake b/cmake/ConfigureCompiler.cmake
|
||||
index 03af9c10..7d059375 100644
|
||||
--- a/cmake/ConfigureCompiler.cmake
|
||||
+++ b/cmake/ConfigureCompiler.cmake
|
||||
@@ -119,6 +119,11 @@ else()
|
||||
else()
|
||||
add_compile_options(-Werror)
|
||||
endif()
|
||||
+ if (CLANG)
|
||||
+ # aseipp: NixOS hack
|
||||
+ add_compile_options(-Wno-unused-command-line-argument)
|
||||
+ add_link_options(-Wno-unused-command-line-argument)
|
||||
+ endif()
|
||||
add_compile_options($<$<BOOL:${GCC}>:-Wno-pragmas>)
|
||||
add_compile_options(-Wno-error=format
|
||||
-Wunused-variable
|
||||
Loading…
Add table
Add a link
Reference in a new issue