Subject: Re: libtool and sparc/1.4
To: Nick Hudson <nick@nthcliff.demon.co.uk>
From: None <mcmahill@mtl.mit.edu>
List: port-sparc
Date: 08/24/2000 14:48:56
On Thu, 24 Aug 2000, Nick Hudson wrote:

> It would seem that libtool-1.3.5nb4 breaks linking of shared
> libraries(see PR/10846, PR/10190) on sparc 1.4. As I put in place the
> bit that broke the builds then I felt as though I should address the
> problem. The problem (I believe) stems from the fact that
> /usr/lib/c++rt0.o is compiled -fpic whereas libtool compiles everything
> -fPIC. This isn't a problem in current because sparc toolchain is now
> ELF and -fpic no longer exists in bsd.lib.mk
> 
> I see the following possible solutions.
> 
> i)	pull up the bsd.lib.mk change to the netbsd-1-4 branch for 1.4.3 and
> 	require 1.4 users to update to 1.4.3 when it becomes available. This
> 	should fix all the problems.

this has some problems we've run into.  However, the change to
basesrc/lib/csu/c++/Makefile (which is actually what makes
/usr/lib/c++rt0.o be -fPIC vs pic), _should_ (I think) be ok.

> 
> ii) 	change libtool to avoid the inclusion of /usr/lib/c++rt0.o for
> 	sparc/a.out and mark the packages that require it as broken.
this is way too many.


> iii)	mark all USE_LIBTOOL packages as broken on sparc/a.out.
way too many.


I've simply replaced /usr/lib/c++rt0.o on my 1.4.x sparcs with a -fPIC
version which is available on
ftp://ftp.netbsd.org/pub/NetBSD/arch/sparc/c++/

That seems to fix everything except for pthreads which I just noted.

-Dan