From: Alex Ameen Date: Mon, 9 May 2022 02:46:30 +0000 (-0500) Subject: libtool: permit compiler libs in shlibs X-Git-Tag: v2.5.0~89 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1d2577357ee704da2d6d7c7da119ad82ba8ca172;p=thirdparty%2Flibtool.git libtool: permit compiler libs in shlibs --- diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in index a5f21a1db..22500a9d6 100644 --- a/build-aux/ltmain.in +++ b/build-aux/ltmain.in @@ -5900,6 +5900,15 @@ func_mode_link () lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. + case "$deplib" in + # Linking certain compiler provided static libraries, while + # non-portable, is reasonable safe and practically necessary on + # certain platforms. + */libgcc*.$libext | */libclang_rt*.$libext) + deplibs="$deplib $deplibs" + continue + ;; + esac case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) diff --git a/m4/libtool.m4 b/m4/libtool.m4 index 79a2451ef..ab5af3351 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -7554,7 +7554,7 @@ if AC_TRY_EVAL(ac_compile); then for p in `eval "$output_verbose_link_cmd"`; do case $prev$p in - -L* | -R* | -l*) + -L* | -R* | -l* | */clang_rt*.a) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test x-L = "$p" ||