libtool
[Top][All Lists]
Advanced

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

RE: improve support for building DLLs on cygwin and mingw


From: Danny Smith
Subject: RE: improve support for building DLLs on cygwin and mingw
Date: Thu, 07 Sep 2006 10:21:40 +1200


> gcc reports warnings:
> 
> warning: 'externvar' defined locally after being referenced
> with dllimport linkage
> warning: 'externfunc' defined locally after being referenced 
> with dllimport linkage
> 
> Once libtool is changed to not cause link errors for
> self-references, there is no need any more for this warning. 
> gcc should remove this warning. </quote>
> 

Thinking more about this, the whole problem goes away with
-funit-at-a-time and that is turned on by default at 
optimization level of 1 or higher.  So all that is needed  is to make
the warning conditional on !flag_unit_at a time
(& perhaps on OPT_Wattributes?)  

It also goes away with C++ frontend, which  looks at the whole file
before emitting references.
 
Why not just make -funit-at-a-time the default for win32 ports (for
those languages that support it).?

It seems that this problem is really a GCC vs MSVC compiler difference
and it should be addressed in GCC rather
in libtool.

Danny





reply via email to

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