libtool-patches
[Top][All Lists]
Advanced

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

Re: [PATCH] msvc: don't try to export import descriptors.


From: Ralf Wildenhues
Subject: Re: [PATCH] msvc: don't try to export import descriptors.
Date: Fri, 24 Sep 2010 07:15:43 +0200
User-agent: Mutt/1.5.20 (2010-08-04)

Hi Peter,

* Peter Rosin wrote on Fri, Sep 24, 2010 at 12:39:13AM CEST:
> With the patch posted with subject: [PATCH] tests: import variables for MSVC.
> I found that libtool tries to put some bad symbols in the generated
> symbol lookup table leading to errors such as this:

> Ok to push?

Yes, with nit below addressed.

> Subject: [PATCH] msvc: don't try to export import descriptors.
> 
> * libltdl/m4/libtool.m4 (_LT_LINKER_SHLIBS) [cygwin, mingw]
> [pw32, cegcc] <cl*, exclude_expsyms>: Don't export symbols in
> import libraries related to describing what dll(s) the import
> library is importing. Fixes problem in tests/demo-make.test
> and some other tests.

> --- a/libltdl/m4/libtool.m4
> +++ b/libltdl/m4/libtool.m4
> @@ -4492,7 +4492,9 @@ m4_if([$1], [CXX], [
>      ;;
>    cygwin* | mingw* | cegcc*)
>      case $cc_basename in
> -    cl*) ;;
> +    cl*)
> +      _LT_TAGVAR(exclude_expsyms, 
> $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*|_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*']

Does cl generate _GLOBAL_OFFSET_TABLE_ symbols, or _GLOBAL__F* ones?
If yes, is the leading underscore for the former optional?

I'm guessing "no" for both of these, which means you can omit them here.
I'm also guessing that GCC won't generate them either on w32, but really
not so sure about that; and the MSVC case is easier because we don't risk
regressions in leaving them out for now.

Same below, of course.

> +      ;;
>      *)
>        _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | 
> $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 
> DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ 
> ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
>        _LT_TAGVAR(exclude_expsyms, 
> $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
> @@ -5064,6 +5066,7 @@ _LT_EOF
>       # The linker will not automatically build a static lib if we build a 
> DLL.
>       # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
>       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
> +     _LT_TAGVAR(exclude_expsyms, 
> $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*|_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*']
>       _LT_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'
>       # Don't use ranlib
>       _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'

Thanks,
Ralf



reply via email to

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