Browse Source
When libtool links DLLs that include C++ code, it does so by
passing -nostdlib and manually adding the compiler built-in
default libraries. When linking, clang specifies the compiler-rt
library by passing the full path to the .a file, instead of using
-L + -l. libtool currently doesn't pick up such a full path to
a static library as a library it should include.
This patch is a custom libtool patch from chromium os [1],
upstreaming is in progress at [2].
[1] 88201a517e
[2] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27866
pull/68/head
2 changed files with 21 additions and 0 deletions
@ -0,0 +1,20 @@ |
|||
Libtool checks only for libraries linked as -l* when trying to |
|||
find internal compiler libraries. Clang, however uses the absolute |
|||
path to link its internal libraries e.g. compiler_rt. This patch |
|||
handles clang's statically linked libraries when finding internal |
|||
compiler libraries. |
|||
https://crbug.com/749263 |
|||
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27866 |
|||
|
|||
--- a/libltdl/m4/libtool.m4
|
|||
+++ b/libltdl/m4/libtool.m4
|
|||
@@ -7531,7 +7544,7 @@
|
|||
for p in `eval "$output_verbose_link_cmd"`; do |
|||
case $prev$p in |
|||
|
|||
- -L* | -R* | -l*)
|
|||
+ -L* | -R* | -l* | */libclang_rt.*.a)
|
|||
# Some compilers place space between "-{L,R}" and the path. |
|||
# Remove the space. |
|||
if test x-L = "$p" || |
|||
|
|||
Loading…
Reference in new issue