diff options
author | Mark H Weaver <mhw@netris.org> | 2015-06-21 14:30:22 -0400 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2015-06-21 14:30:22 -0400 |
commit | bf76d98789a0fc6303c303beddbc1ed609f2a6ea (patch) | |
tree | 1df8db2fa06f6826a1c7a1cb1faa253df704834e /gnu/packages/patches | |
parent | fc9ff915b3cfcb494dbb5c8ab767972352fa31da (diff) | |
parent | 12b04cbee6b9c725db8a5c898b597de8e667bef0 (diff) | |
download | guix-bf76d98789a0fc6303c303beddbc1ed609f2a6ea.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r-- | gnu/packages/patches/clang-libc-search-path.patch | 19 | ||||
-rw-r--r-- | gnu/packages/patches/guile-linux-syscalls.patch | 22 |
2 files changed, 31 insertions, 10 deletions
diff --git a/gnu/packages/patches/clang-libc-search-path.patch b/gnu/packages/patches/clang-libc-search-path.patch new file mode 100644 index 0000000000..327336ac09 --- /dev/null +++ b/gnu/packages/patches/clang-libc-search-path.patch @@ -0,0 +1,19 @@ +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'. + +--- cfe-3.6.0.src/lib/Driver/ToolChains.cpp 2015-02-18 22:03:07.000000000 +0100 ++++ cfe-3.6.0.src/lib/Driver/ToolChains.cpp 2015-06-19 16:37:20.459701044 +0200 +@@ -3085,6 +3085,10 @@ Linux::Linux(const Driver &D, const llvm + + addPathIfExists(SysRoot + "/lib", Paths); + addPathIfExists(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("@GLIBC_LIBDIR@", Paths); + } + + bool Linux::HasNativeLLVMSupport() const { diff --git a/gnu/packages/patches/guile-linux-syscalls.patch b/gnu/packages/patches/guile-linux-syscalls.patch index 25a5e90e35..ac74d021d7 100644 --- a/gnu/packages/patches/guile-linux-syscalls.patch +++ b/gnu/packages/patches/guile-linux-syscalls.patch @@ -3,11 +3,9 @@ This patch adds bindings to Linux syscalls for which glibc has symbols. Using the FFI would have been nice, but that's not an option when using a statically-linked Guile in an initrd that doesn't have libc.so around. -diff --git a/libguile/posix.c b/libguile/posix.c -index 324f21b..cbee94d 100644 ---- a/libguile/posix.c -+++ b/libguile/posix.c -@@ -2245,6 +2245,263 @@ scm_init_popen (void) +--- guile-2.0.11/libguile/posix.c.orig 2014-02-28 15:01:27.000000000 -0500 ++++ guile-2.0.11/libguile/posix.c 2015-06-21 14:28:23.624251038 -0400 +@@ -2245,6 +2245,269 @@ } #endif @@ -26,15 +24,18 @@ index 324f21b..cbee94d 100644 +#define FUNC_NAME s_scm_mount +{ + int err; -+ char *c_source, *c_target, *c_type; ++ char *c_source, *c_target, *c_type, *c_data; + unsigned long c_flags; -+ void *c_data; + + c_source = scm_to_locale_string (source); + c_target = scm_to_locale_string (target); + c_type = scm_to_locale_string (type); + c_flags = SCM_UNBNDP (flags) ? 0 : scm_to_ulong (flags); -+ c_data = SCM_UNBNDP (data) ? NULL : scm_to_pointer (data); ++ ++ if (SCM_UNBNDP (data) || scm_is_false (data)) ++ c_data = NULL; ++ else ++ c_data = scm_to_locale_string (data); + + err = mount (c_source, c_target, c_type, c_flags, c_data); + if (err != 0) @@ -44,6 +45,9 @@ index 324f21b..cbee94d 100644 + free (c_target); + free (c_type); + ++ if (c_data != NULL) ++ free (c_data); ++ + if (err != 0) + { + errno = err; @@ -271,5 +275,3 @@ index 324f21b..cbee94d 100644 void scm_init_posix () { --- -2.4.1 |