diff options
author | jlam <jlam> | 2004-08-27 06:29:06 +0000 |
---|---|---|
committer | jlam <jlam> | 2004-08-27 06:29:06 +0000 |
commit | c67635060cd54b4f914d016d2d93bdcc9c66c834 (patch) | |
tree | 0ff3b0eccc04d1b065efd866b0590608098961d5 /mk/compiler | |
parent | 78b14f7e1233ae26114a6875e6741dc02d74759f (diff) | |
download | pkgsrc-c67635060cd54b4f914d016d2d93bdcc9c66c834.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/compiler')
-rw-r--r-- | mk/compiler/gcc.mk | 13 | ||||
-rw-r--r-- | mk/compiler/mipspro.mk | 9 | ||||
-rw-r--r-- | mk/compiler/sunpro.mk | 8 |
3 files changed, 20 insertions, 10 deletions
diff --git a/mk/compiler/gcc.mk b/mk/compiler/gcc.mk index fa359e4c9e9..f9a44bf31dd 100644 --- a/mk/compiler/gcc.mk +++ b/mk/compiler/gcc.mk @@ -1,4 +1,4 @@ -# $NetBSD: gcc.mk,v 1.69 2004/07/06 22:49:18 wiz Exp $ +# $NetBSD: gcc.mk,v 1.70 2004/08/27 06:29:09 jlam Exp $ .if !defined(COMPILER_GCC_MK) COMPILER_GCC_MK= defined @@ -244,6 +244,12 @@ _NEED_NEWER_GCC!= \ PKG_SKIP_REASON= "Unable to satisfy dependency: ${_GCC_DEPENDS}" .endif +# GNU ld option used to set the rpath +_LINKER_RPATH_FLAG= -R + +# GCC passes rpath directives to the linker using "-Wl,-R". +_COMPILER_RPATH_FLAG= -Wl,${_LINKER_RPATH_FLAG} + .if !empty(_USE_PKGSRC_GCC:M[yY][eE][sS]) # # Ensure that the correct rpath is passed to the linker if we need to @@ -287,7 +293,7 @@ _GCC_SUBPREFIX:= ${_GCC_ARCHDIR:H:H:H:H:T}/ _GCC_LIBDIRS= ${_GCC_ARCHDIR} ${_GCC_PREFIX}lib _GCC_LDFLAGS= # empty . for _dir_ in ${_GCC_LIBDIRS:N*not_found*} -_GCC_LDFLAGS+= -L${_dir_} ${_COMPILER_LD_FLAG}${RPATH_FLAG}${_dir_} +_GCC_LDFLAGS+= -L${_dir_} ${COMPILER_RPATH_FLAG}${_dir_} . endfor LDFLAGS+= ${_GCC_LDFLAGS} .endif @@ -329,9 +335,6 @@ FC= ${PKG_FC:T} F77= ${PKG_FC:T} .endif -# GCC passes flags to the linker using "-Wl,". -_COMPILER_LD_FLAG= -Wl, - # Pass the required flags to imake to tell it we're using gcc on Solaris. .if ${OPSYS} == "SunOS" IMAKEOPTS+= -DHasGcc2=YES -DHasGcc2ForCplusplus=YES diff --git a/mk/compiler/mipspro.mk b/mk/compiler/mipspro.mk index ace179cbd15..4e0a92f910a 100644 --- a/mk/compiler/mipspro.mk +++ b/mk/compiler/mipspro.mk @@ -1,4 +1,4 @@ -# $NetBSD: mipspro.mk,v 1.24 2004/06/10 20:34:08 jschauma Exp $ +# $NetBSD: mipspro.mk,v 1.25 2004/08/27 06:29:09 jlam Exp $ .if !defined(COMPILER_MIPSPRO_MK) COMPILER_MIPSPRO_MK= defined @@ -41,8 +41,11 @@ CC_VERSION_STRING?= ${CC_VERSION} CC_VERSION?= MIPSpro Compilers .endif -# MIPSPro passes flags to the linker using "-Wl,". -_COMPILER_LD_FLAG= -Wl, +# MIPSPro linker option used to set the rpath. +_LINKER_RPATH_FLAG= -rpath + +# MIPSPro passes rpath directives to the linker using "-Wl,-rpath,". +_COMPILER_RPATH_FLAG= -Wl,${_LINKER_RPATH_FLAG}, # Prepend the path to the compiler to the PATH. .if !empty(_LANGUAGES.mipspro) diff --git a/mk/compiler/sunpro.mk b/mk/compiler/sunpro.mk index e62ff6dcc83..ba67f68fab2 100644 --- a/mk/compiler/sunpro.mk +++ b/mk/compiler/sunpro.mk @@ -1,4 +1,4 @@ -# $NetBSD: sunpro.mk,v 1.20 2004/02/18 13:32:38 jlam Exp $ +# $NetBSD: sunpro.mk,v 1.21 2004/08/27 06:29:09 jlam Exp $ .if !defined(COMPILER_SUNPRO_MK) COMPILER_SUNPRO_MK= defined @@ -32,7 +32,11 @@ PKG_CXX= ${_SUNPRO_CXX} CXX= ${PKG_CXX:T} .endif -_COMPILER_LD_FLAG= # empty +# SunPro passes rpath directives to the linker using "-R". +_LINKER_RPATH_FLAG= -R + +# SunPro passes rpath directives to the linker using "-R". +_COMPILER_RPATH_FLAG= -R .if exists(${SUNWSPROBASE}/bin/cc) CC_VERSION_STRING!= ${SUNWSPROBASE}/bin/cc -V 2>&1 || ${TRUE} |