pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk tidy up handling of LDFLAGS wrt USE_GCC_SHLIB a lit...
details: https://anonhg.NetBSD.org/pkgsrc/rev/c518bc0a02f3
branches: trunk
changeset: 461201:c518bc0a02f3
user: grant <grant%pkgsrc.org@localhost>
date: Fri Sep 12 15:54:40 2003 +0000
description:
tidy up handling of LDFLAGS wrt USE_GCC_SHLIB a little.
diffstat:
lang/gcc/buildlink2.mk | 8 +-------
lang/gcc3/buildlink2.mk | 8 +-------
mk/compiler.mk | 17 ++++++++++++-----
3 files changed, 14 insertions(+), 19 deletions(-)
diffs (106 lines):
diff -r be1e8c5553a3 -r c518bc0a02f3 lang/gcc/buildlink2.mk
--- a/lang/gcc/buildlink2.mk Fri Sep 12 15:28:54 2003 +0000
+++ b/lang/gcc/buildlink2.mk Fri Sep 12 15:54:40 2003 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink2.mk,v 1.14 2003/09/12 13:03:40 grant Exp $
+# $NetBSD: buildlink2.mk,v 1.15 2003/09/12 15:54:43 grant Exp $
# Do not directly include this file in package Makefiles. It is
# automatically included when required based on USE_GCC2.
@@ -19,16 +19,10 @@
.endif
BUILDLINK_PREFIX.gcc= ${LOCALBASE}
-
_GCC_PREFIX= ${BUILDLINK_PREFIX.gcc}/${_GCC_SUBPREFIX}
-BUILDLINK_LDFLAGS.gcc= -L${_GCC_ARCHDIR} -Wl,${RPATH_FLAG}${_GCC_ARCHDIR} -L${_GCC_PREFIX}lib -Wl,${RPATH_FLAG}${_GCC_PREFIX}lib
-
BUILDLINK_PACKAGES+= gcc
-.if defined(USE_GCC_SHLIB)
-LDFLAGS+= ${BUILDLINK_LDFLAGS.gcc}
-.endif
BUILDLINK_WRAPPER_ENV+= \
COMPILER_PATH="${BUILDLINK_DIR}/bin"; export COMPILER_PATH
diff -r be1e8c5553a3 -r c518bc0a02f3 lang/gcc3/buildlink2.mk
--- a/lang/gcc3/buildlink2.mk Fri Sep 12 15:28:54 2003 +0000
+++ b/lang/gcc3/buildlink2.mk Fri Sep 12 15:54:40 2003 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink2.mk,v 1.8 2003/09/12 15:28:54 tron Exp $
+# $NetBSD: buildlink2.mk,v 1.9 2003/09/12 15:54:44 grant Exp $
# Do not directly include this file in package Makefiles. It is
# automatically included when required based on USE_GCC3.
@@ -19,7 +19,6 @@
.endif
BUILDLINK_PREFIX.gcc= ${LOCALBASE}
-
_GCC_PREFIX= ${BUILDLINK_PREFIX.gcc}/${_GCC_SUBPREFIX}
_GCC_LIBGCCDIR!= \
if [ -x ${_GCC_PREFIX}bin/gcc ]; then \
@@ -30,13 +29,8 @@
_GCC_ARCHSUBDIR= \
${_GCC_LIBGCCDIR:S|^${BUILDLINK_PREFIX.gcc}/${_GCC_SUBPREFIX}||}
-BUILDLINK_LDFLAGS.gcc= -L${_GCC_ARCHDIR} -Wl,${RPATH_FLAG}${_GCC_ARCHDIR} -L${_GCC_PREFIX}lib -Wl,${RPATH_FLAG}${_GCC_PREFIX}lib
-
BUILDLINK_PACKAGES+= gcc
-.if defined(USE_GCC_SHLIB)
-LDFLAGS+= ${BUILDLINK_LDFLAGS.gcc}
-.endif
BUILDLINK_WRAPPER_ENV+= \
COMPILER_PATH="${BUILDLINK_DIR}/bin"; export COMPILER_PATH
diff -r be1e8c5553a3 -r c518bc0a02f3 mk/compiler.mk
--- a/mk/compiler.mk Fri Sep 12 15:28:54 2003 +0000
+++ b/mk/compiler.mk Fri Sep 12 15:54:40 2003 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: compiler.mk,v 1.2 2003/09/12 13:35:29 salo Exp $
+# $NetBSD: compiler.mk,v 1.3 2003/09/12 15:54:40 grant Exp $
# This Makefile fragment implements handling for supported
# C/C++/fortran compilers.
@@ -49,11 +49,11 @@
# dependency.
. if defined(USE_GCC_SHLIB)
DEPENDS+= gcc>=${GCC_REQD}:../../lang/gcc
-LDFLAGS+= -L${_GCC_ARCHDIR} -Wl,${RPATH_FLAG}${_GCC_ARCHDIR} -L${_GCC_PREFIX}lib -Wl,${RPATH_FLAG}${_GCC_PREFIX}lib
. else
BUILD_DEPENDS+= gcc>=${GCC_REQD}:../../lang/gcc
. endif
-. endif
+. endif # buildlink2
+
PATH:= ${_GCC_PREFIX}bin:${PATH}
CC= ${_GCC_PREFIX}bin/gcc
CPP= ${_GCC_PREFIX}bin/cpp
@@ -81,11 +81,11 @@
# dependency.
. if defined(USE_GCC_SHLIB)
DEPENDS+= gcc3>=${GCC_REQD}:../../lang/gcc3
-LDFLAGS+= -L${_GCC_ARCHDIR} -Wl,${RPATH_FLAG}${_GCC_ARCHDIR} -L${_GCC_PREFIX}lib -Wl,${RPATH_FLAG}${_GCC_PREFIX}lib
. else
BUILD_DEPENDS+= gcc3>=${GCC_REQD}:../../lang/gcc3
. endif
-. endif
+. endif # buildlink2
+
PATH:= ${_GCC_PREFIX}bin:${PATH}
CC= ${_GCC_PREFIX}bin/gcc
CPP= ${_GCC_PREFIX}bin/cpp
@@ -94,4 +94,11 @@
PKG_FC= ${F77}
.endif # USE_GCC3
+# Ensure that the correct rpath is passed to the linker if we need to
+# link against gcc shared libs.
+.if (defined(USE_GCC2) || defined(USE_GCC3)) && defined(USE_GCC_SHLIB)
+_GCC_LDFLAGS= -L${_GCC_ARCHDIR} -Wl,${RPATH_FLAG}${_GCC_ARCHDIR} -L${_GCC_PREFIX}lib -Wl,${RPATH_FLAG}${_GCC_PREFIX}lib
+LDFLAGS+= ${_GCC_LDFLAGS}
+.endif
+
.endif # COMPILER_MK
Home |
Main Index |
Thread Index |
Old Index