summary refs log tree commit diff
path: root/gnu/packages/patches/clang-libc-search-path.patch
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2015-06-21 14:30:22 -0400
committerMark H Weaver <mhw@netris.org>2015-06-21 14:30:22 -0400
commitbf76d98789a0fc6303c303beddbc1ed609f2a6ea (patch)
tree1df8db2fa06f6826a1c7a1cb1faa253df704834e /gnu/packages/patches/clang-libc-search-path.patch
parentfc9ff915b3cfcb494dbb5c8ab767972352fa31da (diff)
parent12b04cbee6b9c725db8a5c898b597de8e667bef0 (diff)
downloadguix-bf76d98789a0fc6303c303beddbc1ed609f2a6ea.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/patches/clang-libc-search-path.patch')
-rw-r--r--gnu/packages/patches/clang-libc-search-path.patch19
1 files changed, 19 insertions, 0 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 {