Subject: Re: pkgsrc and native gcc
To: Gilles Dauphin <Gilles.Dauphin@enst.fr>
From: Raymond Meyer <raymond.meyer@rambler.ru>
List: pkgsrc-users
Date: 08/17/2006 13:55:10
On Thu, 17 Aug 2006 09:27:41 +0200 (CEST)
Gilles Dauphin <Gilles.Dauphin@enst.fr> wrote:

> > I tried setting the following variables in my mk.conf file:
> > 
> > _NATIVE_GCC_BASE=/opt/gcc4
> > LDFLAGS+=-L${_NATIVE_GCC_BASE}/lib -R${_NATIVE_GCC_BASE}/lib
> > CFLAGS=-L${_NATIVE_GCC_BASE}/lib -Wl,-R${_NATIVE_GCC_BASE}/lib
> > CXXFLAGS=-L${_NATIVE_GCC_BASE}/lib -Wl,-R${_NATIVE_GCC_BASE}/lib
> > 
> > however it doesn't seem to help, i.e. running 'ldd' on executable shows that
> > gcc libraries are not found.
> > 
> > Does anyone know how to ensure that the path to gcc libraries is recorded in
> > the output object file?
> 
> I send you my mk.conf, hope this help, look at 
> BUILDLINK_PASSTHRU_RPATHDIRS and in the mk/wrapper ...

Thanks, I'm a bit confused about what BUILDLINK_PASSTHRU_RPATHDIRS does,
however I think I found a neat solution to my problem. All I have to do is set
LD_OPTIONS env. variable, see ld(1), which does the trick on Solaris.