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