summaryrefslogtreecommitdiff
path: root/lang/gcc3
diff options
context:
space:
mode:
authorfredb <fredb@pkgsrc.org>2003-06-10 23:46:39 +0000
committerfredb <fredb@pkgsrc.org>2003-06-10 23:46:39 +0000
commit4b3c069ea77ad235fd0bbc253ac25a3baeddd5cc (patch)
treed8b0d711497d6be854b0a098f34dec8a421c58fc /lang/gcc3
parent15fe13d6593e36df71a3530fbcc4d32c933ba1ee (diff)
downloadpkgsrc-4b3c069ea77ad235fd0bbc253ac25a3baeddd5cc.tar.gz
Pull in devel/binutils if '${AS} --version' reports to be less than 2.13.2.1,
and ensure that the built compiler uses it. This fixes a problem reported by abs compiling perl, among other things. Apparently, gcc-3.3 triggers a bug in gas: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10877 Bump ${PKGREVISION}.
Diffstat (limited to 'lang/gcc3')
-rw-r--r--lang/gcc3/Makefile19
1 files changed, 18 insertions, 1 deletions
diff --git a/lang/gcc3/Makefile b/lang/gcc3/Makefile
index fe637805819..d35581088c1 100644
--- a/lang/gcc3/Makefile
+++ b/lang/gcc3/Makefile
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.19 2003/06/05 16:01:41 grant Exp $
+# $NetBSD: Makefile,v 1.20 2003/06/10 23:46:39 fredb Exp $
#
DISTNAME= gcc-3.3
+PKGREVISION= 1
PKGNAME= ${DISTNAME:C|gcc|gcc3|}
CATEGORIES= lang
MASTER_SITES= ${MASTER_SITE_GNU:=gcc/gcc-3.3/}
@@ -35,6 +36,22 @@ INFO_FILES= cpp.info g77.info gcc.info gcj.info
.include "../../mk/bsd.prefs.mk"
+.ifndef USE_BINUTILS
+AS_VERSION!= ${AS} --version | ${AWK} '{ \
+ split($$3, v, /[.]/); \
+ printf "%02d%02d%02d%02d\n",v[1],v[2],v[3],v[4]; \
+ exit; \
+ }'
+USE_BINUTILS!= ${TEST} ${AS_VERSION} -lt 02130201 && echo YES || echo NO
+.endif
+
+.if ${USE_BINUTILS} == YES
+DEPENDS= binutils>=2.13.2.1:../../devel/binutils
+CONFIGURE_ARGS+= --with-as=${PREFIX}/${MACHINE_GNU_PLATFORM}/bin/as
+CONFIGURE_ARGS+= --with-ld=${PREFIX}/${MACHINE_GNU_PLATFORM}/bin/ld
+#. include "../../devel/binutils/buildlink2.mk"
+.endif
+
.if ${OPSYS} == "NetBSD" || ${OPSYS} == "Linux"
CONFIGURE_ARGS+= --enable-shared
.else