summaryrefslogtreecommitdiff
path: root/mk/compiler/gcc.mk
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2004-08-27 06:29:06 +0000
committerjlam <jlam@pkgsrc.org>2004-08-27 06:29:06 +0000
commit2347df5518184e316028bf90a0d032ee71028b63 (patch)
tree0ff3b0eccc04d1b065efd866b0590608098961d5 /mk/compiler/gcc.mk
parente5a1b353192b781a2b5c36eca0f963c97d681caa (diff)
downloadpkgsrc-2347df5518184e316028bf90a0d032ee71028b63.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/gcc.mk')
-rw-r--r--mk/compiler/gcc.mk13
1 files changed, 8 insertions, 5 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