Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 1 | From 40a2da75e6d95cc7c498ebda95ab19ae0db2ebfb Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Sat, 26 Jan 2019 12:54:26 -0800 |
| 4 | Subject: [PATCH] libtool: Check for static libs for internal compiler |
| 5 | libraries |
| 6 | |
| 7 | Libtool checks only for libraries linked as -l* when trying to |
| 8 | find internal compiler libraries. Clang, however uses the absolute |
| 9 | path to link its internal libraries e.g. compiler_rt. This patch |
| 10 | handles clang's statically linked libraries when finding internal |
| 11 | compiler libraries. |
| 12 | |
| 13 | https://crbug.com/749263 |
| 14 | |
| 15 | Upstream-Status: Submitted [https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27866] |
| 16 | |
| 17 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 18 | --- |
| 19 | m4/libtool.m4 | 2 +- |
| 20 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 21 | |
| 22 | diff --git a/m4/libtool.m4 b/m4/libtool.m4 |
| 23 | index d0389a0..9619c57 100644 |
| 24 | --- a/m4/libtool.m4 |
| 25 | +++ b/m4/libtool.m4 |
| 26 | @@ -7536,7 +7536,7 @@ if AC_TRY_EVAL(ac_compile); then |
| 27 | for p in `eval "$output_verbose_link_cmd"`; do |
| 28 | case $prev$p in |
| 29 | |
| 30 | - -L* | -R* | -l*) |
| 31 | + -L* | -R* | -l* | */libclang_rt.*.a) |
| 32 | # Some compilers place space between "-{L,R}" and the path. |
| 33 | # Remove the space. |
| 34 | if test x-L = "$p" || |
| 35 | -- |
| 36 | 2.20.1 |
| 37 | |