[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: export_symbols_cmds erroneously expanded
From: |
Ralf Wildenhues |
Subject: |
Re: export_symbols_cmds erroneously expanded |
Date: |
Tue, 12 Dec 2006 01:03:41 +0100 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
* Charles Wilson wrote on Mon, Dec 11, 2006 at 06:58:56PM CET:
> On Mon, 11 Dec 2006 18:36:56 +0100, "Ralf Wildenhues" said:
> >
> > > [[ bug report and export_filter variable "fix" snipped ]]
> >
> > The above looks like a cleaner approach to me than the second one you
> > offer; but it means we'd need to change the definition of
> > export_symbols_cmds for each and every system, not just Cygin/MinGW.
>
> Yes, I figured that. I believe it would also be true for the other
> solution, as well. The problem is we need to expand *part* of cmd, but
> not *all* of it -- and this is true on every system and every tag,
> including the default definition of export_symbols_cmds.
Or we need to make sure the extra expansion does not matter.
Arguably, this is a hack, but in practice it may be enough for now.
I had to create a directory /s to expose the bug -- do you have an
S: drive?
Please try this patch.
Cheers,
Ralf
* libtool.m4 (AC_LIBTOOL_PROG_LD_SHLIBS) [ cygwin, mingw ]
<export_symbols_cmds>: Avoid shell expansion of '/s/.*' through
double expansion, in case there is a 'S:' drive.
Report by Charles Wilson.
Index: libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/Attic/libtool.m4,v
retrieving revision 1.314.2.166
diff -u -r1.314.2.166 libtool.m4
--- libtool.m4 19 Oct 2006 05:05:55 -0000 1.314.2.166
+++ libtool.m4 11 Dec 2006 23:59:40 -0000
@@ -5490,7 +5490,7 @@
_LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
;;
cygwin* | mingw*)
- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience |
$global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.*
__nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\''
| sort | uniq > $export_symbols'
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience |
$global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1
DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I
/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
;;
*)
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience |
$global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
@@ -5629,7 +5629,7 @@
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
_LT_AC_TAGVAR(always_export_symbols, $1)=no
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience |
$global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' |
$SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience |
$global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1
DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq >
$export_symbols'
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs
$compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base
-Xlinker --out-implib -Xlinker $lib'