From 8e8607e8a6902a2d374b3f54084c2b68a1ade541 Mon Sep 17 00:00:00 2001 From: Manoj Gupta Date: Wed, 10 Oct 2018 10:50:23 +0300 Subject: [PATCH 1/2] Pick up clang_rt static archives compiler internal libraries 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 --- m4/libtool.m4 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/m4/libtool.m4 b/m4/libtool.m4 index b55a6e57..e6fc29bb 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -7553,10 +7553,11 @@ if AC_TRY_EVAL(ac_compile); then # the conftest object file. pre_test_object_deps_done=no + eval std_shrext=\"$shrext_cmds\" for p in `eval "$output_verbose_link_cmd"`; do case $prev$p in - -L* | -R* | -l*) + -L* | -R* | -l* | *.${libext} | *${std_shrext}) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test x-L = "$p" || -- 2.17.1