Re: Supporting -export-dynamic on AIX
On Tue, Aug 08, 2006 at 02:58:44PM -0500, Albert Chin wrote: > > Another version. Patch against branch-1-5 only. I've reordered where > --export-dynamic occurs so we don't have to worry about the above. Our use of both $export_dynamic_symbols_cmds and $export_dynamic_flag_spec somewhat breaks the "whether a program can dlopen itself" test: case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" ... Why? Because we set $export_dynamic_flag_spec to: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)="\${wl}$exp_sym_flag:\$export_symbols" so, in the above LDFLAGS="$LDFLAGS -Wl,-bexport:". Because -bexport: requires an argument, we get an error from the linker: ld: 0706-015 The -b export option needs a parameter. Option syntax: -b export:PARM We could make this test pass by creating conftest.exp, setting export_symbols=conftest.exp, and adding "fnord" to it: save_LDFLAGS="$LDFLAGS" echo fnord >conftest.exp wl=$lt_prog_compiler_wl export_symbols=conftest.exp \ eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" Should we do this or let it continue failing? -- albert chin ([EMAIL PROTECTED]) ___ http://lists.gnu.org/mailman/listinfo/libtool
Re: Supporting -export-dynamic on AIX
On Sun, Jul 02, 2006 at 10:58:23PM +0900, Peter O'Gorman wrote: > On Tue, 2006-06-20 at 12:12 -0500, Albert Chin wrote: > > Albert also questioned the documentation: > > > On some operating systems, a program symbol must be specially > > declared > > in order to be dynamically resolved with the `dlsym' (or equivalent) > > function. > > > > Libtool provides the `-export-dynamic' and `-module' link flags > > (*note Link mode::), which do this declaration. You need to use > > these > > flags if you are linking an application program that dlopens other > > modules or a libtool library that will also be dlopened. > > > > Should the last sentence above end with ", respectively"? > > I think this is a documentation bug. -export-dynamic does not imply > -module, there is a line of code in ltmain that adds dlname to the .la > file if either -module or -export-dynamic was specified, but this only > "works" if modules and libraries are otherwise equivalent, so it should > probably be removed and the documentation adjusted for HEAD, thoughts? > Either way this patch does not affect that behavior at all. > > Here are patches against branch-1-5 and HEAD, okay (with apropriate > ChangeLog, of course)? Another version. Patch against branch-1-5 only. I've reordered where --export-dynamic occurs so we don't have to worry about the above. -- albert chin ([EMAIL PROTECTED]) Index: libtool.m4 === RCS file: /cvsroot/libtool/libtool/Attic/libtool.m4,v retrieving revision 1.314.2.162 diff -u -p -r1.314.2.162 libtool.m4 --- libtool.m4 3 Aug 2006 14:31:47 - 1.314.2.162 +++ libtool.m4 8 Aug 2006 13:16:45 - @@ -2911,6 +2911,13 @@ case $host_os in exp_sym_flag='-bexport' no_entry_flag='-bnoentry' + + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + _LT_AC_TAGVAR(export_dynamic_symbols_cmds, $1)='$NM -Bpg $objs $libobjs $old_deplibs $old_convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + else + _LT_AC_TAGVAR(export_dynamic_symbols_cmds, $1)='$NM -BCpg $objs $libobjs $old_deplibs $old_convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + fi + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)="\${wl}$exp_sym_flag:\$export_symbols" fi # When large executables or shared objects are built, AIX ld can @@ -3974,6 +3981,7 @@ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)= _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(archive_expsym_cmds, $1)= +_LT_AC_TAGVAR(export_dynamic_symbols_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= @@ -4209,6 +4217,7 @@ if test -f "$ltmain"; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ +_LT_AC_TAGVAR(export_dynamic_symbols_cmds, $1) \ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ @@ -4243,6 +4252,7 @@ if test -f "$ltmain"; then _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ _LT_AC_TAGVAR(archive_cmds, $1) | \ _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ +_LT_AC_TAGVAR(export_dynamic_symbols_cmds, $1) | \ _LT_AC_TAGVAR(module_cmds, $1) | \ _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ @@ -4455,6 +4465,7 @@ link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_ no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) # Compiler flag to allow reflexive dlopens. +export_dynamic_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_dynamic_symbols_cmds, $1) export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) # Compiler flag to generate shared objects directly from archives. @@ -5480,6 +5491,7 @@ ifelse([$1],[CXX],[ _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= + _LT_AC_TAGVAR(export_dynamic_symbols_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= @@ -5788,8 +5800,11 @@ _LT_EOF # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + _LT_AC_TAGVAR(export_dyna
Re: Supporting -export-dynamic on AIX
On Mon, 2006-07-03 at 01:29 -0500, Albert Chin wrote: > On Sun, Jul 02, 2006 at 10:58:23PM +0900, Peter O'Gorman wrote: > > Here are patches against branch-1-5 and HEAD, okay (with apropriate > > ChangeLog, of course)? > > The patch I submitted doesn't work when the command-line length is > exceeded so the patch needs a little more work. I'll try to address > this soon. As far as I can see we never check max_cmd_len when building programs, only libraries, so there is no need to do this. Peter signature.asc Description: This is a digitally signed message part ___ http://lists.gnu.org/mailman/listinfo/libtool
Re: Supporting -export-dynamic on AIX
On Sun, Jul 02, 2006 at 10:58:23PM +0900, Peter O'Gorman wrote: > Here are patches against branch-1-5 and HEAD, okay (with apropriate > ChangeLog, of course)? The patch I submitted doesn't work when the command-line length is exceeded so the patch needs a little more work. I'll try to address this soon. -- albert chin ([EMAIL PROTECTED]) ___ http://lists.gnu.org/mailman/listinfo/libtool
Re: Supporting -export-dynamic on AIX
On Tue, 2006-06-20 at 12:12 -0500, Albert Chin wrote: > On Sun, Jun 11, 2006 at 01:14:23AM -0500, Albert Chin wrote: > > On Sat, Jun 10, 2006 at 07:12:34PM -0500, Albert Chin wrote: > > > On Sun, Jun 11, 2006 at 01:04:17AM +0200, Ralf Wildenhues wrote: > > > > * Albert Chin wrote on Sat, Jun 10, 2006 at 08:49:29PM CEST: > > > > > On Sat, Jun 10, 2006 at 08:29:44PM +0200, Ralf Wildenhues wrote: > > > > > > * Albert Chin wrote on Sat, Jun 10, 2006 at 08:08:15PM CEST: > > > > > > > Any reason we don't use -bexpall to support -export-dynamic on > > > > > > > AIX? > > > > > > > > > > I'm thinking of a patch along the lines of the one below. What do you > > think? > > Well, this has some problems. First, if only export_dynamic_flag_spec > is set, the new export list code is wrong. Fixed in the patch below. Albert and I have talked about this a little off-list. There are a couple of issues with Albert's patch. We really need to export all symbols from the executable, so we need to add static libraries and convenience archives too. Since the $convenience variable is not set at the time export_dynamic is checked, I moved this much closer to the program link stage. Then I could build and run irssi on aix with perl support. > The second problem is when libtool is passed multiple source files, > rather than object files to create the executable. This method totally > fails then. What to do in this case? I don't think this is supported, it works "by accident" because unknown things are simply added to $compile_command, the source files get added to the compile command and the compiler does the right thing. If you try this when building a library, it will fail: $ libtool --mode=link gcc -o libfoo.la libfoo.c ar cru .libs/libfoo.a ...empty archive created. Albert also questioned the documentation: > On some operating systems, a program symbol must be specially > declared > in order to be dynamically resolved with the `dlsym' (or equivalent) > function. > > Libtool provides the `-export-dynamic' and `-module' link flags > (*note Link mode::), which do this declaration. You need to use > these > flags if you are linking an application program that dlopens other > modules or a libtool library that will also be dlopened. > > Should the last sentence above end with ", respectively"? I think this is a documentation bug. -export-dynamic does not imply -module, there is a line of code in ltmain that adds dlname to the .la file if either -module or -export-dynamic was specified, but this only "works" if modules and libraries are otherwise equivalent, so it should probably be removed and the documentation adjusted for HEAD, thoughts? Either way this patch does not affect that behavior at all. Here are patches against branch-1-5 and HEAD, okay (with apropriate ChangeLog, of course)? Peter Index: libtool.m4 === RCS file: /cvsroot/libtool/libtool/Attic/libtool.m4,v retrieving revision 1.314.2.159 diff -u -3 -p -u -r1.314.2.159 libtool.m4 --- libtool.m4 24 Jun 2006 05:00:22 - 1.314.2.159 +++ libtool.m4 2 Jul 2006 13:39:17 - @@ -2908,11 +2908,17 @@ case $host_os in done ;; esac - exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi +if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + _LT_AC_TAGVAR(export_dynamic_symbols_cmds, $1)='$NM -Bpg $objs $old_deplibs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' +else + _LT_AC_TAGVAR(export_dynamic_symbols_cmds, $1)='$NM -BCpg $objs $old_deplibs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' +fi +_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)="\${wl}$exp_sym_flag:\$export_symbols" + # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to @@ -3950,6 +3956,7 @@ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)= _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(archive_expsym_cmds, $1)= +_LT_AC_TAGVAR(export_dynamic_symbols_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= @@ -4185,6 +4192,7 @@ if test -f "$ltmain"; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ +_LT_AC_TAGVAR(export_dynamic_symbols_cmds, $1) \ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ @@ -4219,6 +4227,7 @@ if test -f "$ltmain"; t
Re: Supporting -export-dynamic on AIX
On Sun, Jun 11, 2006 at 01:14:23AM -0500, Albert Chin wrote: > On Sat, Jun 10, 2006 at 07:12:34PM -0500, Albert Chin wrote: > > On Sun, Jun 11, 2006 at 01:04:17AM +0200, Ralf Wildenhues wrote: > > > * Albert Chin wrote on Sat, Jun 10, 2006 at 08:49:29PM CEST: > > > > On Sat, Jun 10, 2006 at 08:29:44PM +0200, Ralf Wildenhues wrote: > > > > > * Albert Chin wrote on Sat, Jun 10, 2006 at 08:08:15PM CEST: > > > > > > Any reason we don't use -bexpall to support -export-dynamic on AIX? > > > > > > > > > > Yes, as commented in libtool.m4: > > > > > > > I think this is still correct. How should I fix it? > > > > > > Well. In what way(s) do gaim and galculator fail, and why? > > > Is there a way to reproduce the failure without much hassle > > > such as lots of required packages, maybe even a stripped down > > > test case? Are those packages doing something we may want > > > to allow, or is it impossible to realize portably anyway? > > > I'm sorry but I cannot answer your question without more > > > information. (That is not to say that I could otherwise ;-) > > > > When I say "how should I fix it", I mean what's the best way to > > implement -export-dynamic on AIX. Maybe a new export_dynamic_cmds > > command that creates the symbols ala export_symbols_cmds and then > > export_dynamic_flag_spec to add the ld flag to export the symbols from > > export_symbols_cmds to the binary? > > I'm thinking of a patch along the lines of the one below. What do you > think? Well, this has some problems. First, if only export_dynamic_flag_spec is set, the new export list code is wrong. Fixed in the patch below. The second problem is when libtool is passed multiple source files, rather than object files to create the executable. This method totally fails then. What to do in this case? -- albert chin ([EMAIL PROTECTED]) -- snip snip Index: libtool.m4 === RCS file: /cvsroot/libtool/libtool/Attic/libtool.m4,v retrieving revision 1.314.2.158 diff -u -p -r1.314.2.158 libtool.m4 --- libtool.m4 12 Jun 2006 05:25:26 - 1.314.2.158 +++ libtool.m4 20 Jun 2006 17:09:14 - @@ -2911,6 +2911,13 @@ case $host_os in exp_sym_flag='-bexport' no_entry_flag='-bnoentry' + + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + _LT_AC_TAGVAR(export_dynamic_symbols_cmds, $1)='$NM -Bpg $objs | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + else + _LT_AC_TAGVAR(export_dynamic_symbols_cmds, $1)='$NM -BCpg $objs | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + fi + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)="\${wl}$exp_sym_flag:\$export_symbols" fi # When large executables or shared objects are built, AIX ld can @@ -3950,6 +3957,7 @@ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)= _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(archive_expsym_cmds, $1)= +_LT_AC_TAGVAR(export_dynamic_symbols_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= @@ -4178,6 +4186,7 @@ if test -f "$ltmain"; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ +_LT_AC_TAGVAR(export_dynamic_symbols_cmds, $1) \ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ @@ -4212,6 +4221,7 @@ if test -f "$ltmain"; then _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ _LT_AC_TAGVAR(archive_cmds, $1) | \ _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ +_LT_AC_TAGVAR(export_dynamic_symbols_cmds, $1) | \ _LT_AC_TAGVAR(module_cmds, $1) | \ _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ @@ -4424,6 +4434,7 @@ link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_ no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) # Compiler flag to allow reflexive dlopens. +export_dynamic_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_dynamic_symbols_cmds, $1) export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) # Compiler flag to generate shared objects directly from archives. @@ -5449,6 +5460,7 @@ ifelse([$1],[CXX],[ _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= + _LT_AC_TAGVAR(export_dynamic_symbols_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= @@ -5757,8 +5769,11 @@ _LT_EOF # -C means demangle to AIX
Re: Supporting -export-dynamic on AIX
> From: Albert Chin <[EMAIL PROTECTED]> > > Any reason we don't use -bexpall to support -export-dynamic on AIX? > >From ld(1): > autoexp >Automatically exports some symbols from the output module without >having to list them in an export file. (This option does not >export all symbols from the output module. Use the -bexpall option >to export all symbols.)This is the default. Use this option when >linking a main program. The linker assumes that you are linking a >main program when you do not specify a module type (with the M or >modtype option) beginning with S and you do not use the noentry >option. > > It's needed for things like gaim and galculator to work. -bexpall always seemed to do things a little strange. It doesn't export anything starting with "_", and it does export a few symbols it probably shouldn't. I didn't notice that this caused any errors, but it did generate warnings for duplicate symbols. Because of this, I've avoided using -bexpall when building shared libraries, thought I have occasionally used it to build main programs that need to export symbols to it's shared libraries or loadable objects. Dan ___ http://lists.gnu.org/mailman/listinfo/libtool
Re: Supporting -export-dynamic on AIX
On Sat, Jun 10, 2006 at 07:12:34PM -0500, Albert Chin wrote: > On Sun, Jun 11, 2006 at 01:04:17AM +0200, Ralf Wildenhues wrote: > > * Albert Chin wrote on Sat, Jun 10, 2006 at 08:49:29PM CEST: > > > On Sat, Jun 10, 2006 at 08:29:44PM +0200, Ralf Wildenhues wrote: > > > > * Albert Chin wrote on Sat, Jun 10, 2006 at 08:08:15PM CEST: > > > > > Any reason we don't use -bexpall to support -export-dynamic on AIX? > > > > > > > > Yes, as commented in libtool.m4: > > > > > I think this is still correct. How should I fix it? > > > > Well. In what way(s) do gaim and galculator fail, and why? > > Is there a way to reproduce the failure without much hassle > > such as lots of required packages, maybe even a stripped down > > test case? Are those packages doing something we may want > > to allow, or is it impossible to realize portably anyway? > > I'm sorry but I cannot answer your question without more > > information. (That is not to say that I could otherwise ;-) > > When I say "how should I fix it", I mean what's the best way to > implement -export-dynamic on AIX. Maybe a new export_dynamic_cmds > command that creates the symbols ala export_symbols_cmds and then > export_dynamic_flag_spec to add the ld flag to export the symbols from > export_symbols_cmds to the binary? I'm thinking of a patch along the lines of the one below. What do you think? -- albert chin ([EMAIL PROTECTED]) -- snip snip Index: libtool.m4 === RCS file: /cvsroot/libtool/libtool/Attic/libtool.m4,v retrieving revision 1.314.2.157 diff -u -p -r1.314.2.157 libtool.m4 --- libtool.m4 1 Jun 2006 18:46:12 - 1.314.2.157 +++ libtool.m4 11 Jun 2006 06:13:24 - @@ -2911,6 +2911,13 @@ case $host_os in exp_sym_flag='-bexport' no_entry_flag='-bnoentry' + + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + _LT_AC_TAGVAR(export_dynamic_symbols_cmds, $1)='$NM -Bpg $objs | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + else + _LT_AC_TAGVAR(export_dynamic_symbols_cmds, $1)='$NM -BCpg $objs | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + fi + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)="\${wl}$exp_sym_flag:\$export_symbols" fi # When large executables or shared objects are built, AIX ld can @@ -3952,6 +3958,7 @@ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)= _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(archive_expsym_cmds, $1)= +_LT_AC_TAGVAR(export_dynamic_symbols_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= @@ -4180,6 +4187,7 @@ if test -f "$ltmain"; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ +_LT_AC_TAGVAR(export_dynamic_symbols_cmds, $1) \ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ @@ -4214,6 +4222,7 @@ if test -f "$ltmain"; then _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ _LT_AC_TAGVAR(archive_cmds, $1) | \ _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ +_LT_AC_TAGVAR(export_dynamic_symbols_cmds, $1) | \ _LT_AC_TAGVAR(module_cmds, $1) | \ _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ @@ -4426,6 +4435,7 @@ link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_ no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) # Compiler flag to allow reflexive dlopens. +export_dynamic_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_dynamic_symbols_cmds, $1) export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) # Compiler flag to generate shared objects directly from archives. @@ -5451,6 +5461,7 @@ ifelse([$1],[CXX],[ _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= + _LT_AC_TAGVAR(export_dynamic_symbols_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= @@ -5759,8 +5770,11 @@ _LT_EOF # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + _LT_AC_TAGVAR(export_dynamic_symbols_cmds, $1)='$NM -Bpg $objs | awk '\''{ if (((\[$]2 ==
Re: Supporting -export-dynamic on AIX
On Sun, Jun 11, 2006 at 01:04:17AM +0200, Ralf Wildenhues wrote: > * Albert Chin wrote on Sat, Jun 10, 2006 at 08:49:29PM CEST: > > On Sat, Jun 10, 2006 at 08:29:44PM +0200, Ralf Wildenhues wrote: > > > * Albert Chin wrote on Sat, Jun 10, 2006 at 08:08:15PM CEST: > > > > Any reason we don't use -bexpall to support -export-dynamic on AIX? > > > > > > Yes, as commented in libtool.m4: > > > I think this is still correct. How should I fix it? > > Well. In what way(s) do gaim and galculator fail, and why? > Is there a way to reproduce the failure without much hassle > such as lots of required packages, maybe even a stripped down > test case? Are those packages doing something we may want > to allow, or is it impossible to realize portably anyway? > I'm sorry but I cannot answer your question without more > information. (That is not to say that I could otherwise ;-) When I say "how should I fix it", I mean what's the best way to implement -export-dynamic on AIX. Maybe a new export_dynamic_cmds command that creates the symbols ala export_symbols_cmds and then export_dynamic_flag_spec to add the ld flag to export the symbols from export_symbols_cmds to the binary? gaim/galculator fail because they require symbols in the main executable to be exported to dlopen()'ed modules. -- albert chin ([EMAIL PROTECTED]) ___ http://lists.gnu.org/mailman/listinfo/libtool
Re: Supporting -export-dynamic on AIX
* Albert Chin wrote on Sat, Jun 10, 2006 at 08:49:29PM CEST: > On Sat, Jun 10, 2006 at 08:29:44PM +0200, Ralf Wildenhues wrote: > > * Albert Chin wrote on Sat, Jun 10, 2006 at 08:08:15PM CEST: > > > Any reason we don't use -bexpall to support -export-dynamic on AIX? > > > > Yes, as commented in libtool.m4: > I think this is still correct. How should I fix it? Well. In what way(s) do gaim and galculator fail, and why? Is there a way to reproduce the failure without much hassle such as lots of required packages, maybe even a stripped down test case? Are those packages doing something we may want to allow, or is it impossible to realize portably anyway? I'm sorry but I cannot answer your question without more information. (That is not to say that I could otherwise ;-) Cheers, Ralf ___ http://lists.gnu.org/mailman/listinfo/libtool
Re: Supporting -export-dynamic on AIX
On Sat, Jun 10, 2006 at 08:29:44PM +0200, Ralf Wildenhues wrote: > * Albert Chin wrote on Sat, Jun 10, 2006 at 08:08:15PM CEST: > > Any reason we don't use -bexpall to support -export-dynamic on AIX? > > Yes, as commented in libtool.m4: > # It seems that -bexpall does not export symbols beginning with > # underscore (_), so it is better to generate a list of symbols to export. > _LT_AC_TAGVAR(always_export_symbols, $1)=yes > > No, I haven't researched the origin of this, nor its validity for > non-ancient systems. The 2001-04-19 change seems relevant. I think this is still correct. How should I fix it? -- albert chin ([EMAIL PROTECTED]) ___ http://lists.gnu.org/mailman/listinfo/libtool
Re: Supporting -export-dynamic on AIX
Hi Albert, * Albert Chin wrote on Sat, Jun 10, 2006 at 08:08:15PM CEST: > Any reason we don't use -bexpall to support -export-dynamic on AIX? Yes, as commented in libtool.m4: # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes No, I haven't researched the origin of this, nor its validity for non-ancient systems. The 2001-04-19 change seems relevant. Cheers, Ralf ___ http://lists.gnu.org/mailman/listinfo/libtool