This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


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

Re: egcs/Solaris status


Mirar wrote:
> 
> > 1) The Solaris linker does not seem to work with egcs. Well, it works with
> >    small examples, but consistently fails to link some of our larger
> >    programs. I remember reading somewhere that this is a bug in the Solaris
> >    linker. Additional info on this? Is there a patch to correct the bug?
> >    Is there some way to work around this Solaris bug within egcs? Current
> >    workaround:
> >    - Use the GNU linker.
> 
> As I said earlier, egcs/gcc generates illegal assembler lines for the
> relocation tables. But noone seems to care, anyway...


First, thanks for the first sensible reply to my message.

This would explain some other problems I have with EGCS/Solaris. In fact
things are getting worse, as GCC 2.95.1 does not work on SPARC anymore:

1) GCC does not bootstrap with Sun's fully patched C compiler 5.0.
   This may be a problem with Sun's compiler, but I doubt it.
   In fact 'make bootstrap' will usually fail whatever the compiler used
   to bootstrap. See my messsage to this list:
   	GCC 2.95.1 'make bootstrap' oddities on Solaris

2) Libraries built with GCC and GNU as/ld cannot be used with code built
   with GCC and Sun as/ld. You get warnings or even missing symbols.

3) I get segfault/aritmetic exception in Qt (http://www.troll.no/),even
   without -O. The problem is not with Qt:
   - The very same source compiled with egcs-1.1.2 or Sun CC does not
     crash.
   - I believe Qt is Purified.
   - The error is here:
   	QCollection::Item QGDict::look_ascii( const char *key,
   		QCollection::Item d, int op )
   	{
   	    QAsciiBucket *n;
   	    int	index = hashKeyAscii(key) % vlen;
     The value of the 'vlen' is 0, which it can't be because 'this' is
     a valid (allocated and not yet deleted) QGDict pointer and QGDict
     never sets 'vlen' to 0.
     For those willing to reproduce this bug, build Qt-2.0.1 and run
     examples/application/application. Just choose menu item 'File|Quit'
     and click on button 'Leave Anyway' in the confirmation dialog.

4) GCC is not compatible with dbx, for reasons that have been discussed
   in this list before - Sun was not willing to disclose its debug format
   in the past.


So it seems there are a few errors in the assembler generated by GCC:

1) EGCS/GCC generate illegal assembler lines for the relocation tables.
   The result is that shared objects generated with EGCS/GCC are not
   100% compatible with Solaris shared objects.

2) Wrong assembler is generated by GCC 2.95.1 which sometimes results
   in segfaults.

I'd like to fix these bugs, but I am not proficient in compilers.
Does anyone have more details on these bugs? How to track bugs in
the assembler code?

Mirar, do you have more details on the relocation table bug so that I
can file in a bug report and send it to gcc-bugs@gcc.gnu.org?

I believe that fixing bugs 1 and 2 would resolve problems 1, 2 and 3,
which are serious enough to prevent from using GCC 2.95.1 on SPARC/
Solaris. I understand that problem 4 is very low on the priority list.

For the time being, on Solaris/SPARC:
- Do not use GCC 2.95(.1).
- Use EGCS 1.1.2 with optimisation level less or equal to -O2.

--
Dimitri Papadopoulos

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