summaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/4store-unset-preprocessor-directive.patch16
-rw-r--r--gnu/packages/patches/clang-3.5-libc-search-path.patch (renamed from gnu/packages/patches/clang-libc-search-path.patch)0
-rw-r--r--gnu/packages/patches/clang-6.0-libc-search-path.patch67
-rw-r--r--gnu/packages/patches/delly-use-system-libraries.patch56
-rw-r--r--gnu/packages/patches/libgnomeui-utf8.patch6
-rw-r--r--gnu/packages/patches/racket-fix-xform-issue.patch63
6 files changed, 205 insertions, 3 deletions
diff --git a/gnu/packages/patches/4store-unset-preprocessor-directive.patch b/gnu/packages/patches/4store-unset-preprocessor-directive.patch
new file mode 100644
index 0000000000..c4b1d6eda4
--- /dev/null
+++ b/gnu/packages/patches/4store-unset-preprocessor-directive.patch
@@ -0,0 +1,16 @@
+This patch removes the _XOPEN_SOURCE preprocessor directive as it does not seem to be needed.
+Setting it removes the definition of strdup, which is used in filter-datatypes.c.
+
+Patch by Roel Janssen <roel@gnu.org>
+*** a/src/frontend/filter-datatypes.c 1970-01-01 01:00:00.000000000 +0100
+--- b/src/frontend/filter-datatypes.c 2018-04-03 17:39:23.177905592 +0200
+***************
+*** 18,24 ****
+ * Copyright (C) 2006 Steve Harris for Garlik
+ */
+
+- #define _XOPEN_SOURCE
+ #include <stdlib.h>
+ #include <string.h>
+ #include <math.h>
+--- 18,23 ----
diff --git a/gnu/packages/patches/clang-libc-search-path.patch b/gnu/packages/patches/clang-3.5-libc-search-path.patch
index 50e4480239..50e4480239 100644
--- a/gnu/packages/patches/clang-libc-search-path.patch
+++ b/gnu/packages/patches/clang-3.5-libc-search-path.patch
diff --git a/gnu/packages/patches/clang-6.0-libc-search-path.patch b/gnu/packages/patches/clang-6.0-libc-search-path.patch
new file mode 100644
index 0000000000..a62e8063c2
--- /dev/null
+++ b/gnu/packages/patches/clang-6.0-libc-search-path.patch
@@ -0,0 +1,67 @@
+Clang attempts to guess file names based on the OS and distro (yes!),
+but unfortunately, that doesn't work for us.
+
+This patch makes it easy to insert libc's $libdir so that Clang passes the
+correct absolute file name of crt1.o etc. to 'ld'. It also disables all
+the distro-specific stuff and removes the hard-coded FHS directory names
+to make sure Clang also works on non-GuixSD systems.
+
+--- cfe-6.0.0.src/lib/Driver/ToolChains/Linux.cpp
++++ cfe-6.0.0.src/lib/Driver/ToolChains/Linux.cpp
+@@ -207,7 +207,9 @@
+ PPaths.push_back(Twine(GCCInstallation.getParentLibPath() + "/../" +
+ GCCInstallation.getTriple().str() + "/bin")
+ .str());
+-
++ // Comment out the distro-specific tweaks so that they don't bite when
++ // using Guix on a foreign distro.
++#if 0
+ Distro Distro(D.getVFS());
+
+ if (Distro.IsAlpineLinux()) {
+@@ -255,6 +257,7 @@
+
+ if (IsAndroid || Distro.IsOpenSUSE())
+ ExtraOpts.push_back("--enable-new-dtags");
++#endif
+
+ // The selection of paths to try here is designed to match the patterns which
+ // the GCC driver itself uses, as this is part of the GCC-compatible driver.
+@@ -329,14 +332,12 @@
+ addPathIfExists(D, D.Dir + "/../" + OSLibDir, Paths);
+ }
+
+- addPathIfExists(D, SysRoot + "/lib/" + MultiarchTriple, Paths);
+- addPathIfExists(D, SysRoot + "/lib/../" + OSLibDir, Paths);
+- addPathIfExists(D, SysRoot + "/usr/lib/" + MultiarchTriple, Paths);
+- addPathIfExists(D, SysRoot + "/usr/lib/../" + OSLibDir, Paths);
+-
+ // Try walking via the GCC triple path in case of biarch or multiarch GCC
+ // installations with strange symlinks.
+ if (GCCInstallation.isValid()) {
++ // The following code would end up adding things like
++ // "/usr/lib/x86_64-unknown-linux-gnu/../../lib64" to the search path.
++#if 0
+ addPathIfExists(D,
+ SysRoot + "/usr/lib/" + GCCInstallation.getTriple().str() +
+ "/../../" + OSLibDir,
+@@ -349,6 +350,7 @@
+ BiarchSibling.gccSuffix(),
+ Paths);
+ }
++#endif
+
+ // See comments above on the multilib variant for details of why this is
+ // included even from outside the sysroot.
+@@ -373,8 +375,9 @@
+ if (StringRef(D.Dir).startswith(SysRoot))
+ addPathIfExists(D, D.Dir + "/../lib", Paths);
+
+- addPathIfExists(D, SysRoot + "/lib", Paths);
+- addPathIfExists(D, SysRoot + "/usr/lib", Paths);
++ // Add libc's lib/ directory to the search path, so that crt1.o, crti.o,
++ // and friends can be found.
++ addPathIfExists(D, "@GLIBC_LIBDIR@", Paths);
+ }
+
+ bool Linux::HasNativeLLVMSupport() const { return true; }
diff --git a/gnu/packages/patches/delly-use-system-libraries.patch b/gnu/packages/patches/delly-use-system-libraries.patch
new file mode 100644
index 0000000000..3315c2a176
--- /dev/null
+++ b/gnu/packages/patches/delly-use-system-libraries.patch
@@ -0,0 +1,56 @@
+--- a/Makefile 2017-04-09 12:48:15.000000000 +0200
++++ b/Makefile 2017-06-21 14:26:02.749282787 +0200
+@@ -9,8 +9,8 @@
+
+ # Flags
+ CXX=g++
+-CXXFLAGS += -isystem ${SEQTK_ROOT} -isystem ${BOOST_ROOT} -pedantic -W -Wall -Wno-unknown-pragmas -D__STDC_LIMIT_MACROS -fno-strict-aliasing
+-LDFLAGS += -L${SEQTK_ROOT} -L${BOOST_ROOT}/stage/lib -lboost_iostreams -lboost_filesystem -lboost_system -lboost_program_options -lboost_date_time
++CXXFLAGS += -pedantic -W -Wall -Wno-unknown-pragmas -D__STDC_LIMIT_MACROS -fno-strict-aliasing
++LDFLAGS += -lboost_iostreams -lboost_filesystem -lboost_system -lboost_program_options -lboost_date_time
+
+ # Additional flags for release/debug
+ ifeq (${PARALLEL}, 1)
+@@ -23,7 +23,7 @@
+ ifeq (${STATIC}, 1)
+ LDFLAGS += -static -static-libgcc -pthread -lhts -lz
+ else
+- LDFLAGS += -lhts -lz -Wl,-rpath,${SEQTK_ROOT},-rpath,${BOOST_ROOT}/stage/lib
++ LDFLAGS += -lhts -lz
+ endif
+ ifeq (${DEBUG}, 1)
+ CXXFLAGS += -g -O0 -fno-inline -DDEBUG
+@@ -41,29 +41,17 @@
+ DELLYSOURCES = $(wildcard src/*.h) $(wildcard src/*.cpp)
+
+ # Targets
+-TARGETS = .htslib .bcftools .boost src/delly src/cov src/dpe
++TARGETS = src/delly src/cov src/dpe
+
+ all: $(TARGETS)
+
+-.htslib: $(HTSLIBSOURCES)
+- cd src/htslib && make && make lib-static && cd ../../ && touch .htslib
+-
+-.bcftools: $(HTSLIBSOURCES)
+- cd src/bcftools && make && cd ../../ && touch .bcftools
+-
+-.boost: $(BOOSTSOURCES)
+- cd src/modular-boost && ./bootstrap.sh --prefix=${PWD}/src/modular-boost --without-icu --with-libraries=iostreams,filesystem,system,program_options,date_time && ./b2 && ./b2 headers && cd ../../ && touch .boost
+-
+-src/delly: .htslib .bcftools .boost $(DELLYSOURCES)
+- $(CXX) $(CXXFLAGS) $@.cpp -o $@ $(LDFLAGS)
+-
+-src/cov: .htslib .bcftools .boost $(DELLYSOURCES)
++src/cov: $(DELLYSOURCES)
+ $(CXX) $(CXXFLAGS) $@.cpp -o $@ $(LDFLAGS)
+
+-src/dpe: .htslib .bcftools .boost $(DELLYSOURCES)
++src/dpe: $(DELLYSOURCES)
+ $(CXX) $(CXXFLAGS) $@.cpp -o $@ $(LDFLAGS)
+
+ clean:
+ cd src/htslib && make clean
+ cd src/modular-boost && ./b2 --clean-all
+- rm -f $(TARGETS) $(TARGETS:=.o) .htslib .boost .bcftools
++ rm -f $(TARGETS) $(TARGETS:=.o)
diff --git a/gnu/packages/patches/libgnomeui-utf8.patch b/gnu/packages/patches/libgnomeui-utf8.patch
index 304d74e1e2..11622b21ee 100644
--- a/gnu/packages/patches/libgnomeui-utf8.patch
+++ b/gnu/packages/patches/libgnomeui-utf8.patch
@@ -8,11 +8,11 @@ make[2]: Entering directory '/tmp/guix-build-libgnomeui-2.24.5.drv-0/libgnomeui-
INFO: Reading ./gnome-marshal.list...
GEN gnome-marshal.h
Traceback (most recent call last):
- File "/gnu/store/azh1is0xknn4xphwj33iqcb5ic9qhk8l-glib-2.54.2-bin/bin/glib-mkenums", line 688, in <module>
+ File "/gnu/store/...-glib-2.54.2-bin/bin/glib-mkenums", line 688, in <module>
process_file(fname)
- File "/gnu/store/azh1is0xknn4xphwj33iqcb5ic9qhk8l-glib-2.54.2-bin/bin/glib-mkenums", line 420, in process_file
+ File "/gnu/store/...-glib-2.54.2-bin/bin/glib-mkenums", line 420, in process_file
line = curfile.readline()
- File "/gnu/store/3lkypf5wnsnvkaidhw0pv7k3yjfh1r9g-python-3.6.3/lib/python3.6/codecs.py", line 321, in decode
+ File "/gnu/store/...-python-3.6.3/lib/python3.6/codecs.py", line 321, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf1 in position 1009: invalid continuation byte
make[2]: *** [Makefile:1109: stamp-gnometypebuiltins.h] Error 1
diff --git a/gnu/packages/patches/racket-fix-xform-issue.patch b/gnu/packages/patches/racket-fix-xform-issue.patch
new file mode 100644
index 0000000000..0a1640ee51
--- /dev/null
+++ b/gnu/packages/patches/racket-fix-xform-issue.patch
@@ -0,0 +1,63 @@
+050cdb59839896b41431791f8ee0ef2564231b8f
+Author: Matthew Flatt <mflatt@racket-lang.org>
+AuthorDate: Tue Mar 6 09:05:08 2018 -0700
+Commit: Matthew Flatt <mflatt@racket-lang.org>
+CommitDate: Tue Mar 6 09:05:08 2018 -0700
+
+Parent: efb9a919fc ffi docs: clarification on `unsafe-socket->port`
+Containing: master
+Follows: v5.0.1 (21612)
+
+xform: avoid problems with `__signbitf128`
+
+Closes #1962 and uses the suggested patch there, among other changes.
+
+2 files changed, 6 insertions(+), 3 deletions(-)
+racket/collects/compiler/private/xform.rkt | 2 +-
+racket/src/racket/src/number.c | 7 +++++--
+
+diff --git a/racket/collects/compiler/private/xform.rkt b/racket/collects/compiler/private/xform.rkt
+index 28a425c057..89ae848f9c 100644
+--- a/collects/compiler/private/xform.rkt
++++ b/collects/compiler/private/xform.rkt
+@@ -904,7 +904,7 @@
+
+ strlen cos cosl sin sinl exp expl pow powl log logl sqrt sqrtl atan2 atan2l frexp
+ isnan isinf fpclass signbit _signbit _fpclass __fpclassify __fpclassifyf __fpclassifyl
+- _isnan __isfinited __isnanl __isnan __signbit __signbitf __signbitd __signbitl
++ _isnan __isfinited __isnanl __isnan __signbit __signbitf __signbitd __signbitl __signbitf128
+ __isinff __isinfl isnanf isinff __isinfd __isnanf __isnand __isinf __isinff128
+ __inline_isnanl __inline_isnan __inline_signbit __inline_signbitf __inline_signbitd __inline_signbitl
+ __builtin_popcount __builtin_clz __builtin_isnan __builtin_isinf __builtin_signbit
+diff --git a/racket/src/racket/src/number.c b/racket/src/racket/src/number.c
+index 71f42aaf3c..3bbad3ba83 100644
+--- a/src/racket/src/number.c
++++ b/src/racket/src/number.c
+@@ -1796,6 +1796,7 @@ double scheme_real_to_double(Scheme_Object *r)
+ }
+
+ XFORM_NONGCING static MZ_INLINE int minus_zero_p(double d)
++ XFORM_SKIP_PROC
+ {
+ #ifdef MZ_IS_NEG_ZERO
+ return MZ_IS_NEG_ZERO(d);
+@@ -1809,7 +1810,9 @@ int scheme_minus_zero_p(double d)
+ return minus_zero_p(d);
+ }
+
+-static int rational_dbl_p(double f) {
++XFORM_NONGCING static int rational_dbl_p(double f)
++ XFORM_SKIP_PROC
++{
+ return !(MZ_IS_NAN(f)
+ || MZ_IS_INFINITY(f));
+ }
+@@ -1955,7 +1958,7 @@ real_p(int argc, Scheme_Object *argv[])
+ return (SCHEME_REALP(o) ? scheme_true : scheme_false);
+ }
+
+-static int is_rational(const Scheme_Object *o)
++XFORM_NONGCING static int is_rational(const Scheme_Object *o)
+ {
+ if (SCHEME_FLOATP(o))
+ return rational_dbl_p(SCHEME_FLOAT_VAL(o)); \ No newline at end of file