This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bug in gcc and/or binutils?


Peter Ekberg wrote:

Hi!

I have been looking at a failure in the testsuite in
libtool-cvs which I have reduced to the following
script. I have included the approximate output from
any program execed by it in comments along with
comments as to what is going wrong.

$ gcc --version | head -1
gcc (GCC) 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125)
$ ld --version | head -1
GNU ld version 2.16.91 20050610

Etc etc yada yada updated the Cygwin installation the
other day...

This limitation is perhaps already known?

Not that I'm aware of. I try to avoid using .def files anyway. But I can confirm that I get the same results. I suspect some change in binutils, at least also dlltool fails to create a proper import library when this .def file is used, just change the script like this to see:

 run gcc -shared -o a.dll a.o
 run dlltool --as=as --dllname a.dll --def a.def --output-lib a.bad.lib

instead of:

run gcc -shared a.def a.o -o a.dll -Wl,--out-implib,a.bad.lib


However DATA handling was changed in gcc too.


To avoid these kind of problems you must define whether you're exporting DATA or not, then it will work:

------------a.def---------------
EXPORTS
    v7 @1 DATA
------------a.def---------------

The old impgen tool included with libtool fails to proper declare
whether some symbol is DATA or not.  So IMO it is a bug in libtool.

At first I thought it might be a problem with the D compiler frontend
included with gcc because .d may trigger some special logic in gcc,
however, trying the same with dlltool shows that this may not the reason
for this issue.

Thank you very much for this detailed analysis, I'll try to investigate
further, because some of the Gnome base packages use .def files too,
maybe this is the reason why I cannot get the Gnome desktop up and
running with the latest releases.  However, I see no apps crashing
(besides Mozilla).


Gerrit -- =^..^=

--
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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]