libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 05/12] AIX runtime linking allows undef syms by default.


From: Michael Haubenwallner
Subject: [PATCH 05/12] AIX runtime linking allows undef syms by default.
Date: Tue, 2 Oct 2012 17:34:46 +0200

On AIX, when runtime linking is active, undefined symbols are allowd by
default. Additionally, the '-G' linker flag needs to be specified before
the '-bernotok' and any other user-defined linker flag, or '-G' would
override some of them again.
* m4/libtool.m4: (no_undefined_flag) Define for AIX runtime linking.
(allow_undefined_flag) Undefine for AIX runtime linking.
(archive_expsym_cmds) Reorder to have -G before $no_undefined_flag.
---
 m4/libtool.m4 |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/m4/libtool.m4 b/m4/libtool.m4
index 88d8799..503bbc3 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -5053,14 +5053,12 @@ _LT_EOF
       # underscore (_), so it is better to generate a list of symbols to 
export.
       _LT_TAGVAR(always_export_symbols, $1)=yes
       if test yes = "$aix_use_runtimelinking"; 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)=' $wl-bernotok'
         # Determine the default libpath from the value encoded in an
         # empty executable.
         _LT_SYS_MODULE_PATH_AIX([$1])
         _LT_TAGVAR(hardcode_libdir_flag_spec, 
$1)='$wl-blibpath:$libdir:'"$aix_libpath"
-        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname 
$libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n 
"$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; 
fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
+        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname 
$libobjs $deplibs $wl'$no_entry_flag' $compiler_flags 
'$shared_flag'$allow_undefined_flag $wl'$exp_sym_flag:\$export_symbols
       else
        if test ia64 = "$host_cpu"; then
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R 
$libdir:/usr/lib:/lib'
@@ -6043,15 +6041,13 @@ if test yes != "$_lt_caught_CXX_error"; then
        # export.
         _LT_TAGVAR(always_export_symbols, $1)=yes
         if test yes = "$aix_use_runtimelinking"; 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)=' $wl-bernotok'
           # Determine the default libpath from the value encoded in an empty
           # executable.
           _LT_SYS_MODULE_PATH_AIX([$1])
           _LT_TAGVAR(hardcode_libdir_flag_spec, 
$1)='$wl-blibpath:$libdir:'"$aix_libpath"
 
-          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname 
$libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n 
"$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; 
fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
+          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname 
$libobjs $deplibs $wl'$no_entry_flag' $compiler_flags 
'$shared_flag'$allow_undefined_flag $wl'$exp_sym_flag:\$export_symbols
         else
           if test ia64 = "$host_cpu"; then
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R 
$libdir:/usr/lib:/lib'
-- 
1.7.3.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]