Subject: Re: pkg/20448
To: None <tech-pkg@netbsd.org>
From: Stoned Elipot <seb@starfleet.univ-paris7.fr>
List: tech-pkg
Date: 03/08/2003 18:13:25
On Sat, Mar 08, 2003 at 12:07:14PM -0500, Jan Schaumann wrote:
> It is, mostly, AFAICT.  But the problem is that some packages have
> Makefiles that _explicitly_ set "-Wl,-R/path".  Under these
> circumstances, buildlink2 can't help us, I think.
> 
> We would want to be able to simply patch the Makefile to use
> ${LD_RPATH_NAME} and pass that variable ot MAKE_ENV.

Those "linking" commands are in the end executed by the
buildlink2 wrappers (cc, ld) so they can on-the-fly convert -{R,rpath} to
whatever the opsys needs.

Right now the buildlink2 framework adds
'-Wl,${_OPSYS_RPATH_NAME}${LOCALBASE}/lib' if USE_RPATH is yes
or can strip off any -{R,rpath} if it is not (see no-rpath
command in mk/buildlink2/gen-transform.sh).

It's only a matter of adding a "canonicalize-rpath" command to gen-transform.sh
and trigger it when appropriate via defs.*.mk setting and bsd.buildlink2.mk