]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
ltmain.in: Recognise options for static linking with Clang
authorIleana Dumitrescu <ileanadumitrescu95@gmail.com>
Tue, 30 Dec 2025 16:08:05 +0000 (18:08 +0200)
committerIleana Dumitrescu <ileanadumitrescu95@gmail.com>
Sat, 3 Jan 2026 15:57:34 +0000 (17:57 +0200)
Reported: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=78072

* build-aux/ltmain.in: Add --static and -Bstatic options.
* NEWS: Update.

NEWS
build-aux/ltmain.in

diff --git a/NEWS b/NEWS
index 4b1ecc2d354b3a31e21f5b64409c788be9976041..0daedf1cd35526344d2675cbbd43a4110b9e9f12 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -18,6 +18,8 @@ NEWS - list of user-visible changes between releases of GNU Libtool
   - Remove unused variable on OS/2, which could cause issues with static
     library generation if defined.
 
+  - Recognise more static linking options for Clang.
+
 ** Changes in supported systems or compilers:
 
   - Add support for SlimCC compiler.
index 68593972189eb5d29d6f49979b8885b6b6336add..d58b232b1754d1161e3c76de5f26e789aa50fb6c 100644 (file)
@@ -4910,7 +4910,7 @@ func_mode_link ()
        build_old_libs=no
        break
        ;;
-      -all-static | -static | -static-libtool-libs)
+      -all-static | -static | -static-libtool-libs | --static | -Bstatic)
        case $arg in
        -all-static)
          if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then
@@ -4927,7 +4927,7 @@ func_mode_link ()
          fi
          prefer_static_libs=built
          ;;
-       -static-libtool-libs)
+       -static-libtool-libs | --static | -Bstatic)
          if test -z "$pic_flag" && test -n "$link_static_flag"; then
            dlopen_self=$dlopen_self_static
          fi