blob: 83c74373ae03d9e86c67009c8156961c3cea4ed2 [file] [log] [blame]
Andrew Geisslereff27472021-10-29 15:35:00 -05001From: Khem Raj <raj.khem@gmail.com>
Andrew Geisslereff27472021-10-29 15:35:00 -05002Subject: [PATCH 08/12] libtool: Check for static libs for internal compiler libraries
3
4Libtool checks only for libraries linked as -l* when trying to
5find internal compiler libraries. Clang, however uses the absolute
6path to link its internal libraries e.g. compiler_rt. This patch
7handles clang's statically linked libraries when finding internal
8compiler libraries.
9
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12
13https://crbug.com/749263
14https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27866
15
16Upstream-Status: Submitted [https://lists.gnu.org/archive/html/libtool-patches/2021-10/msg00016.html]
Andrew Geisslereff27472021-10-29 15:35:00 -050017
18diff --git a/m4/libtool.m4 b/m4/libtool.m4
Andrew Geissler9aee5002022-03-30 16:27:02 +000019index 180dd9d1..022c1292 100644
Andrew Geisslereff27472021-10-29 15:35:00 -050020--- a/m4/libtool.m4
21+++ b/m4/libtool.m4
Andrew Geissler9aee5002022-03-30 16:27:02 +000022@@ -7560,7 +7560,7 @@ if AC_TRY_EVAL(ac_compile); then
Andrew Geisslereff27472021-10-29 15:35:00 -050023 for p in `eval "$output_verbose_link_cmd"`; do
24 case $prev$p in
25
26- -L* | -R* | -l*)
27+ -L* | -R* | -l* | */libclang_rt.*.a)
28 # Some compilers place space between "-{L,R}" and the path.
29 # Remove the space.
30 if test x-L = "$p" ||
31--
Andrew Geissler9aee5002022-03-30 16:27:02 +0000322.25.1
Andrew Geisslereff27472021-10-29 15:35:00 -050033