[Top][All Lists]
[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
- [PATCH 00/12] Improve AIX support: libltdl, filename-based versioning., Michael Haubenwallner, 2012/10/02
- [PATCH 01/12] Support loading shared library archive members., Michael Haubenwallner, 2012/10/02
- [PATCH 04/12] Specify shared member in soname_spec on AIX., Michael Haubenwallner, 2012/10/02
- [PATCH 11/12] No cross-library undefined symbols test on AIX., Michael Haubenwallner, 2012/10/02
- [PATCH 06/12] Drop useless symlinks with AIX runtime linking., Michael Haubenwallner, 2012/10/02
- [PATCH 08/12] Implement enable/disable aix-soname options., Michael Haubenwallner, 2012/10/02
- [PATCH 05/12] AIX runtime linking allows undef syms by default.,
Michael Haubenwallner <=
- [PATCH 03/12] Do not remove shared archive member in mode clean., Michael Haubenwallner, 2012/10/02
- [PATCH 07/12] Declare enable/disable aix-soname options., Michael Haubenwallner, 2012/10/02
- [PATCH 10/12] Detect XFAIL based on hardcode configuration., Michael Haubenwallner, 2012/10/02
- [PATCH 02/12] Prepare -dlopen option for shared archive members., Michael Haubenwallner, 2012/10/02
- [PATCH 12/12] Set aix-soname=yes as default., Michael Haubenwallner, 2012/10/02
- [PATCH 09/12] Run versioning checks on aix with 'aix-soname'., Michael Haubenwallner, 2012/10/02
- Re: [PATCH 00/12] Improve AIX support: libltdl, filename-based versioning., Michael Haubenwallner, 2012/10/17