]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
ltmain.in: Set allow_undefined to no on OS/2
authorKO Myung-Hun <komh78@gmail.com>
Tue, 10 Mar 2026 14:35:00 +0000 (23:35 +0900)
committerIleana Dumitrescu <ileanadumitrescu95@gmail.com>
Wed, 22 Apr 2026 17:15:25 +0000 (20:15 +0300)
OS/2 does not allow undefined symbols at all when linking a dll. So,
setting allow_undefined to no by default is reasonable.

* build-aux/ltmain.in (func_mode_link): Set allow_undefined to no on
OS/2.

build-aux/ltmain.in

index 67175443b5999cf9c44fbaf3a5d9dc50f752d2a6..70d0e111091c39440b67db6e559660c8db3e8e27 100644 (file)
@@ -4838,7 +4838,15 @@ func_mode_link ()
       # even a static library is built.  For now, we need to specify
       # -no-undefined on the libtool link line when we can be certain
       # that all symbols are satisfied, otherwise we get a static library.
-      allow_undefined=yes
+      case $host in
+      *-*-os2*)
+        # OS/2 does not allow undefined symbols at all when linking a dll.
+        allow_undefined=no
+        ;;
+      *)
+        allow_undefined=yes
+        ;;
+      esac
       ;;
     *)
       allow_undefined=yes