[ANNOUNCEMENT] Updated: experimental package: gcc4-4.3.2-2
Dave Korn
dave.korn.cygwin@googlemail.com
Thu Mar 12 17:54:00 GMT 2009
[Bcc's sent to interested third parties]
Dave Korn wrote:
> And the immediate reason for this is the way that TSystem.o is built:
>
> ------------------------build.log------------------------
> g++-4 -O2 -pipe -Wall -Woverloaded-virtual -D_DLL -Iinclude
> -I/usr/X11R6/include -o core/base/src/TSystem.o -c
> core/base/src/TSystem.cxx
> ------------------------build.log------------------------
>
> Why is a -D for _DLL present? That is a reserved definition in the
> implementation's namespace, and in particular it used when compiling
> libstdc++ itself, where it alters the effect of the library headers to
> declare all the library APIs as dllexport - they are dllimport by default,
> which is what user applications want to see.
>
> I manually re-ran the compile command without "-D_DLL" and got a good
> object file:
> So I'll now try rebuilding and retesting without _DLL defined anywhere and
> see if it solves the problem.
Indeed it did. With the attached patch, build and test both ran to
completion without any errors. As far as I can see (thanks, Peter R.) the
_DLL definition conveys information from compiler to linker to tell it which
multilib variant to link against. We have the -shared-libgcc/-static-libgcc
option in the gcc driver and the related specs to serve the same purpose on GNU.
One disclaimer: this could have side-effects on MinGW, and should be
verified there to make sure, if it's a supported platform. (Hopefully it'll
be equally correct there, though).
cheers,
DaveK
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: root-cygwin-D_DLL_patch.diff
URL: <http://cygwin.com/pipermail/cygwin/attachments/20090312/9002718e/attachment.ksh>
-------------- next part --------------
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list