Subject: Re: gcc3 "millicode" problems with sh3 (toolchain/22452)
To: None <tech-toolchain@netbsd.org, port-sh3@netbsd.org>
From: Valeriy E. Ushakov <uwe@ptc.spbu.ru>
List: port-sh3
Date: 09/03/2003 22:23:56
On Wed, Sep 03, 2003 at 10:22:55 -0700, cgd@broadcom.com wrote:

> > # gcc2
> > $ /usr/nb/tools/bin/shle--netbsdelf-gcc -dumpspecs | grep -e -lgcc
> > %{!symbolic:%{!shared:-lgcc}%{shared:-lgcc_pic}}
> > 
> > # gcc3
> > $ /usr/nb3/tools/bin/shle--netbsdelf-gcc -dumpspecs | grep -e -lgcc
> > %{!shared:%{!symbolic: -lgcc}}
> 
> I'm not sure that it would be right to do it, either.
> 
> I believe in the new gcc world (not necessarily the new netbsd gcc
> world; i've not been paying attention to netbsd's gcc integration
> work), the right thing is to link with the GCC shared library.
> 
> That has the effect of getting you one copy of the exception handling
> functions and data structures, which is important (and works much
> better than having independent copies of them 8-).

That's what worries me too, but I don't know libgcc internals at all
(the part that's responsible for the exception handling, &c).

FWIW, Kaz Kojima (linux/sh gcc person) told me that's what linux do,
that's all I know.


> I'm not sure that linking libgcc into shlibs directly will do the
> right thing w.r.t. this issue.

Ok, then we do need a separate "millicode" library to be linked into
shlibs (apparently hppa needs something like that as well).


SY, Uwe
-- 
uwe@ptc.spbu.ru                         |       Zu Grunde kommen
http://www.ptc.spbu.ru/~uwe/            |       Ist zu Grunde gehen