]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
libtool: permit compiler libs in shlibs
authorAlex Ameen <alex.ameen.tx@gmail.com>
Mon, 9 May 2022 02:46:30 +0000 (21:46 -0500)
committerAlex Ameen <alex.ameen.tx@gmail.com>
Mon, 9 May 2022 02:46:30 +0000 (21:46 -0500)
build-aux/ltmain.in
m4/libtool.m4

index a5f21a1db0548eebb2773e8a415c7d959e5d714f..22500a9d67b576aad984d3b35139515525976484 100644 (file)
@@ -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 "*) ;;
            *)
index 79a2451ef520f20ca43211f03a28a05b241a773e..ab5af3351765d621b46347858dee67975d27bab8 100644 (file)
@@ -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" ||