summaryrefslogtreecommitdiff
path: root/lang/gcc46
diff options
context:
space:
mode:
authorhans <hans@pkgsrc.org>2012-04-13 11:02:47 +0000
committerhans <hans@pkgsrc.org>2012-04-13 11:02:47 +0000
commit64b09af781abb08eaf78679fc43a2a8d08eed745 (patch)
treec439f8c5a5d6126ebeb57ac9961efa656102d1f5 /lang/gcc46
parent6c7f614c27f6fe9889c02e097d181ad51c79d848 (diff)
downloadpkgsrc-64b09af781abb08eaf78679fc43a2a8d08eed745.tar.gz
Add option gcc-inplace-math to allow building devel/gmp, math/mpfr and
math/mpcomplex together with gcc, as described at http://gcc.gnu.org/install/prerequisites.html
Diffstat (limited to 'lang/gcc46')
-rw-r--r--lang/gcc46/Makefile11
-rw-r--r--lang/gcc46/options.mk23
2 files changed, 23 insertions, 11 deletions
diff --git a/lang/gcc46/Makefile b/lang/gcc46/Makefile
index 413a7b8e46e..00484d113d4 100644
--- a/lang/gcc46/Makefile
+++ b/lang/gcc46/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.17 2012/04/13 10:38:26 hans Exp $
+# $NetBSD: Makefile,v 1.18 2012/04/13 11:02:47 hans Exp $
DISTNAME= gcc-${GCC_VERSION}
PKGNAME= gcc46-${GCC_VERSION}
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= lang
MASTER_SITES= ${MASTER_SITE_GNU:=gcc/gcc-${GCC_VERSION}/}
EXTRACT_SUFX= .tar.bz2
@@ -74,8 +74,6 @@ CONFIGURE_ARGS+= --enable-long-long
CONFIGURE_ARGS+= --with-local-prefix=${GCC_PREFIX:Q}
CONFIGURE_ARGS+= --enable-libssp
CONFIGURE_ARGS+= --enable-threads=posix
-CONFIGURE_ARGS+= --with-gmp=${BUILDLINK_PREFIX.gmp}
-CONFIGURE_ARGS+= --with-mpfr=${BUILDLINK_PREFIX.mpfr}
.if ${OPSYS} == "NetBSD"
CONFIGURE_ARGS+= --with-gnu-ld --with-ld=/usr/bin/ld
CONFIGURE_ARGS+= --with-gnu-as --with-as=/usr/bin/as
@@ -107,8 +105,6 @@ CFLAGS+= -I${BUILDLINK_DIR}/include
#MAKE_ENV+= AR=/usr/bin/ar
#.endif # NetBSD
-LIBS.SunOS+= -lgmp
-
pre-configure:
.if ${OPSYS} == "DragonFly"
${CP} ${FILESDIR}/dragonfly.h ${WRKSRC}/gcc/config/dragonfly.h
@@ -148,7 +144,4 @@ GENERATE_PLIST+= \
cd ${DESTDIR}${PREFIX} && ${FIND} ${GCC_SUBPREFIX} \( -type f -o -type l \) -print \
| ${SORT} ;
-.include "../../devel/gmp/buildlink3.mk"
-.include "../../math/mpcomplex/buildlink3.mk"
-.include "../../math/mpfr/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/lang/gcc46/options.mk b/lang/gcc46/options.mk
index 4653a8ca0c0..a2df1656845 100644
--- a/lang/gcc46/options.mk
+++ b/lang/gcc46/options.mk
@@ -1,10 +1,12 @@
-# $NetBSD: options.mk,v 1.7 2012/04/13 10:38:26 hans Exp $
+# $NetBSD: options.mk,v 1.8 2012/04/13 11:02:47 hans Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.gcc46
-PKG_SUPPORTED_OPTIONS= nls gcc-c++ gcc-fortran gcc-java gcc-objc #gcc-ada
+PKG_SUPPORTED_OPTIONS= nls gcc-inplace-math gcc-c++ gcc-fortran gcc-java gcc-objc #gcc-ada
PKG_SUGGESTED_OPTIONS= gcc-c++ gcc-fortran gcc-objc
.if ${OPSYS} == "NetBSD"
PKG_SUGGESTED_OPTIONS+= nls
+.elif ${OPSYS} == "SunOS"
+PKG_SUGGESTED_OPTIONS+= gcc-inplace-math
.endif
PKG_OPTIONS_LEGACY_VARS+= BUILD_CXX:gcc-c++
@@ -15,6 +17,23 @@ PKG_OPTIONS_LEGACY_VARS+= BUILD_OBJC:gcc-objc
.include "../../mk/bsd.options.mk"
###
+### Build math libraries in place
+###
+.if !empty(PKG_OPTIONS:Mgcc-inplace-math)
+.include "../../devel/gmp/inplace.mk"
+.include "../../math/mpcomplex/inplace.mk"
+.include "../../math/mpfr/inplace.mk"
+.else
+CONFIGURE_ARGS+= --with-gmp=${BUILDLINK_PREFIX.gmp}
+CONFIGURE_ARGS+= --with-mpc=${BUILDLINK_PREFIX.mpcomplex}
+CONFIGURE_ARGS+= --with-mpfr=${BUILDLINK_PREFIX.mpfr}
+LIBS.SunOS+= -lgmp
+.include "../../devel/gmp/buildlink3.mk"
+.include "../../math/mpcomplex/buildlink3.mk"
+.include "../../math/mpfr/buildlink3.mk"
+.endif
+
+###
### Native Language Support
###
.if !empty(PKG_OPTIONS:Mnls)