This is the mail archive of the gcc-patches@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: 3.0 PATCH RFC: Major Solaris 2 configuration cleanup


> From: Alexandre Oliva <aoliva@redhat.com>
> Date: 29 May 2001 04:23:44 -0300

> On May 29, 2001, Paul Eggert <eggert@twinsun.com> wrote:
> 
> > I don't have a Solaris 2.6 host available right now to test with, but
> > looking through the output of GCC 2.95.3 I suspect that even in 2.95.3
> > the problem is obsolete.
> 
> Do you have any indication that this is no longer the case?

It's just my intuition, in looking at the assembly language output.
Unlike GCC 2.8.0, GCC 2.95.3 (gcc -gdwarf) generates code like this:

		.pushsection	".text"
	.L_text_b:
		.popsection

and where GCC 2.8.0 later has expressions involving the value ".text",
GCC 2.95.3 has ".L_text_b".  The annotations on Sun bug 4136253
suggest (but do not conclusively say) that it was the use of ".text"
that was the problem.

> I do have access to a Solaris 2.6 machine

Is it a vanilla 2.6 machine, or does it have the assembler and linker
patches installed?  "showrev -p" should tell you what patches you
currently have installed.  The current versions of those patches are
108908-02 and 107733-09.

Ideally, you would try it without those patches on a vanilla 2.6 host,
as well as on a host with those patches installed.  But that may be
too much work to arrange.  107733-09 is recommended by Sun and is
available from Sun via anonymous FTP, at
<ftp://sunsolve.sun.com/pub/patches/107733-09.tar.Z>, so I think it's
OK if GCC assumes that patch.  (I don't think 108908-02 matters for
this bug, but I could be wrong.)

> and, indeed, I can't reproduce the problem you had reported using
> GCC 2.95.  However, this doesn't mean much.  It may well be the case
> that whatever work-around is in place because of
> LINKER_DOES_NOT_WORK_WITH_DWARF2 is doing its job and avoiding the
> problem.

An explicit -gdwarf-2 overrides LINKER_DOES_NOT_WORK_WITH_DWARF2, so
to reproduce the problem, here's all that you should need to do:

        echo 'main() { return 0; }' >t.c
        gcc -gdwarf-2 t.c

Make sure your GCC uses Sun 'as' and Sun 'ld'.

If we can't reproduce the problem on Solaris 2.6 with
GCC 2.95.3 'gcc -gdwarf-2' + Sun 'as' + Sun 'ld', then
LINKER_DOES_NOT_WORK_WITH_DWARF2 is obsolete and should be removed
from the GCC source code and documentation.


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