Subject: unprotected use of RPATH_FLAG
To: None <tech-pkg@NetBSD.org>
From: Klaus Heinz <k.heinz.maer.vier@onlinehome.de>
List: tech-pkg
Date: 03/27/2004 02:25:49
Hi,
shouldn't the use of RPATH_FLAG be protected by a test for _USE_RPATH?
mk/buildlink?/bsd.buildlink?.mk does this, although through a comparison
against "yes" instead of !empty(_USE_RPATH:M[yY][eE][sS]).
bsd.pkg.mk uses RPATH_FLAG without this protection:
.if defined(USE_X11)
X11_LDFLAGS+= -Wl,${RPATH_FLAG}${X11BASE}/lib
...
.if !empty(USE_BUILDLINK2:M[nN][oO]) && !empty(USE_BUILDLINK3:M[nN][oO])
LDFLAGS+= -Wl,${RPATH_FLAG}${LOCALBASE}/lib
...
PKGCONFIG_OVERRIDE_SED= \
-e 's|^\(Libs:.*[ ]\)-L\([ ]*[^ ]*\)\(.*\)$$|\1${_COMPILER_LD_FLAG}${RPATH_FLAG}\2 -L\2\3|'
...
xaw.buildlink2.mk does the same:
LIBXAW?= -L${X11BASE}/lib${ABI} -Wl,${RPATH_FLAG}${X11BASE}/lib${ABI} -lXaw
The stumbled over this while trying to use pkgsrc on a platform where
_USE_RPATH=no and _OPSYS_RPATH_NAME/RPATH_FLAG is empty.
ciao
Klaus