diff options
author | jlam <jlam@pkgsrc.org> | 2004-08-27 06:29:06 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2004-08-27 06:29:06 +0000 |
commit | ca7093842870728d22dde1258798b1704c53ca18 (patch) | |
tree | 0ff3b0eccc04d1b065efd866b0590608098961d5 /mk/bsd.pkg.mk | |
parent | 49f0d0312d389247bf08d1e7c28970e1dfb7508f (diff) | |
download | pkgsrc-ca7093842870728d22dde1258798b1704c53ca18.tar.gz |
Replace RPATH_FLAG with LINKER_RPATH_FLAG and COMPILER_RPATH_FLAG,
which are the full option names used to set rpath directives for the
linker and the compiler, respectively. In places were we are invoking
the linker, use "${LINKER_RPATH_FLAG} <path>", where the space is
inserted in case the flag is a word, e.g. -rpath. The default values
of *_RPATH_FLAG are set by the compiler/*.mk files, depending on the
compiler that you use. They may be overridden on a ${OPSYS}-specific
basis by setting _OPSYS_LINKER_RPATH_FLAG and _OPSYS_COMPILER_RPATH_FLAG,
respectively. Garbage-collect _OPSYS_RPATH_NAME and _COMPILER_LD_FLAG.
Diffstat (limited to 'mk/bsd.pkg.mk')
-rw-r--r-- | mk/bsd.pkg.mk | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index 55818a28a47..6d66cddf783 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.1493 2004/08/25 04:09:10 schmonz Exp $ +# $NetBSD: bsd.pkg.mk,v 1.1494 2004/08/27 06:29:08 jlam Exp $ # # This file is in the public domain. # @@ -440,24 +440,26 @@ SHCOMMENT?= ${ECHO_MSG} >/dev/null '***' DISTINFO_FILE?= ${.CURDIR}/distinfo .if defined(USE_X11) -X11_LDFLAGS+= -Wl,${RPATH_FLAG}${X11BASE}/lib${ABI} +X11_LDFLAGS+= ${COMPILER_RPATH_FLAG}${X11BASE}/lib${ABI} X11_LDFLAGS+= -L${X11BASE}/lib${ABI} .endif .if !empty(USE_BUILDLINK3:M[nN][oO]) -LDFLAGS+= -Wl,${RPATH_FLAG}${LOCALBASE}/lib +LDFLAGS+= ${COMPILER_RPATH_FLAG}${LOCALBASE}/lib LDFLAGS+= -L${LOCALBASE}/lib . if defined(USE_X11) LDFLAGS+= ${X11_LDFLAGS} . endif .endif MAKE_ENV+= LDFLAGS="${LDFLAGS}" -MAKE_ENV+= RPATH_FLAG="${RPATH_FLAG}" +MAKE_ENV+= LINKER_RPATH_FLAG="${LINKER_RPATH_FLAG}" +MAKE_ENV+= COMPILER_RPATH_FLAG="${COMPILER_RPATH_FLAG}" MAKE_ENV+= WHOLE_ARCHIVE_FLAG="${WHOLE_ARCHIVE_FLAG}" MAKE_ENV+= NO_WHOLE_ARCHIVE_FLAG="${NO_WHOLE_ARCHIVE_FLAG}" MAKE_ENV+= LINK_ALL_LIBGCC_HACK="${LINK_ALL_LIBGCC_HACK}" CONFIGURE_ENV+= LDFLAGS="${LDFLAGS:M*}" M4="${M4}" YACC="${YACC}" -CONFIGURE_ENV+= RPATH_FLAG="${RPATH_FLAG}" +CONFIGURE_ENV+= LINKER_RPATH_FLAG="${LINKER_RPATH_FLAG}" +CONFIGURE_ENV+= COMPILER_RPATH_FLAG="${COMPILER_RPATH_FLAG}" MAKE_FLAGS?= MAKEFILE?= Makefile @@ -2289,7 +2291,7 @@ do-config-star-override: .endif PKGCONFIG_OVERRIDE_SED= \ - -e 's|^\(Libs:.*[ ]\)-L\([ ]*[^ ]*\)\(.*\)$$|\1${_COMPILER_LD_FLAG}${RPATH_FLAG}\2 -L\2\3|' + -e 's|^\(Libs:.*[ ]\)-L\([ ]*[^ ]*\)\(.*\)$$|\1${COMPILER_RPATH_FLAG}\2 -L\2\3|' .if defined(PKGCONFIG_OVERRIDE) && !empty(PKGCONFIG_OVERRIDE) _CONFIGURE_PREREQ+= subst-pkgconfig |