Subject: CVS commit: src/share/mk
To: None <source-changes@NetBSD.org>
From: Luke Mewburn <lukem@netbsd.org>
List: source-changes
Date: 09/30/2003 07:24:23
Module Name:	src
Committed By:	lukem
Date:		Tue Sep 30 07:24:23 UTC 2003

Modified Files:
	src/share/mk: bsd.lib.mk

Log Message:
Set _LIBLDOPTS to set -Wl,-rpath-link -R -L appropriately based
on the setting of ${SHLIBDIR} and ${SHLIBINSTALLDIR} (_not_ ${_LIBSODIR}).

Fixes cruel and unusual ^W^W^W obscure native-build and not-so-obscure
cross-builds problems I was having with shared libraries with a
non-base LIBDIR (e.g, /usr/X11R6/lib) that use LDADD to pull in other
libraries from /usr/lib (such as libm) which are really in /lib and the
symlink from ${DESTDIR}/usr/lib/libm.so to /lib/libm.so.N.M was confusing
the linker.  Stuffing -rpath-link ${DESTDIR}/lib in solves the problem.

This should mean that shared libraries that depend upon other shared
libraries in other directories should DTRT in a DESTDIR (cross-)build...

Inspired by _PROGLDOPTS in <bsd.prog.mk>


To generate a diff of this commit:
cvs rdiff -r1.234 -r1.235 src/share/mk/bsd.lib.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.