Hello Ralf!

On AIX, when runtime linking is in effect, '-G' linker flag is used
to create the shared objects - which allows undefined symbols.

But libtool.m4 defines the allow_undefined_flag (=-berok) instead
of the no_undefined_flag (=-bernotok), which actually renders the
-no-undefined libtool switch useless when runtime linking is active.

Thank you!
diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2011-06-29  Michael Haubenwallner <michael.haubenwall...@salomon.at>
+
+       With AIX runtime linking, undefined symbols are allowed by default.
+       * libltdl/m4/libtool.m4: Define the 'no_undefined_flag' instead of
+       'allow_undefined_flag' when AIX runtime linking is active, to
+       actually let the -no-undefined switch have any effect in this case.
+
 2011-04-10  Kurt Roeckx  <k...@roeckx.be>
 
        tagdemo: do not rely on picking up symbols from indirect deps.
diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4
--- a/libltdl/m4/libtool.m4
+++ b/libltdl/m4/libtool.m4
@@ -5060,7 +5060,7 @@ _LT_EOF
       if test "$aix_use_runtimelinking" = yes; then
        # Warning - without using the other runtime loading flags (-brtl),
        # -berok will link without error, but may produce a broken library.
-       _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
+       _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
         # Determine the default libpath from the value encoded in an
         # empty executable.
         _LT_SYS_MODULE_PATH_AIX([$1])
@@ -6058,7 +6058,7 @@ if test "$_lt_caught_CXX_error" != yes; then
         if test "$aix_use_runtimelinking" = yes; then
           # Warning - without using the other runtime loading flags (-brtl),
           # -berok will link without error, but may produce a broken library.
-          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
+          _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
           # Determine the default libpath from the value encoded in an empty
           # executable.
           _LT_SYS_MODULE_PATH_AIX([$1])

Reply via email to