diff options
author | drochner <drochner@pkgsrc.org> | 2003-07-08 15:04:53 +0000 |
---|---|---|
committer | drochner <drochner@pkgsrc.org> | 2003-07-08 15:04:53 +0000 |
commit | 7497ad9c29a7801053f90a11bfbc1d26894b0699 (patch) | |
tree | 668ea98bbbf5ec4032fc47d9068a7c88425ea929 /lang/gcc3-c/Makefile.common | |
parent | 86fb2139bc3d90a215adc2b1c01548a07791876d (diff) | |
download | pkgsrc-7497ad9c29a7801053f90a11bfbc1d26894b0699.tar.gz |
some cleanup:
-USE_NEW_TEXINFO, saves some patches
-symlink libiberty.a into build tree instead of buildlink/lib,
saves some patches
-put common make rules into Makefile.common (for all) and
buildaddon.mk (for all but the base "c" pkg)
Diffstat (limited to 'lang/gcc3-c/Makefile.common')
-rw-r--r-- | lang/gcc3-c/Makefile.common | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/lang/gcc3-c/Makefile.common b/lang/gcc3-c/Makefile.common new file mode 100644 index 00000000000..9a73454627b --- /dev/null +++ b/lang/gcc3-c/Makefile.common @@ -0,0 +1,87 @@ +# $NetBSD: Makefile.common,v 1.1 2003/07/08 15:04:56 drochner Exp $ +# + +GCC_VERSION= 3.3 +DISTNAME= gcc-${GCC_VERSION} +CATEGORIES= lang +MASTER_SITES= ${MASTER_SITE_GNU:=gcc/gcc-${GCC_VERSION}/} +EXTRACT_SUFX= .tar.bz2 + +MAINTAINER= tech-pkg@netbsd.org +HOMEPAGE= http://www.gnu.org/software/gcc/gcc.html + +NOT_FOR_PLATFORM= Darwin-*-* + +USE_BUILDLINK2= YES +USE_PKGINSTALL= YES +USE_GMAKE= YES +HAS_CONFIGURE= YES + +.include "../../mk/bsd.prefs.mk" + +# Make location overridable, to allow ping-pong bootstraps. +GCC3_DEFAULT_SUBPREFIX= gcc3 +GCC3_INSTALLTO_SUBPREFIX?= ${GCC3_DEFAULT_SUBPREFIX} + +GCC_SUBPREFIX= ${GCC3_INSTALLTO_SUBPREFIX} +GCC_PREFIX= ${PREFIX}/${GCC_SUBPREFIX} +CONFIGURE_ARGS+= --prefix=${GCC_PREFIX} +PLIST_SUBST+= GCC_SUBPREFIX=${GCC_SUBPREFIX} +FILES_SUBST+= GCC_PREFIX=${GCC_PREFIX} +FILES_SUBST+= PKGNAME=${PKGNAME} +MESSAGE_SUBST+= GCC_PREFIX=${GCC_PREFIX} + +.if defined(INFO_FILES) +USE_NEW_TEXINFO= yes +INFO_DIR= ${GCC_SUBPREFIX}/info +.include "../../mk/texinfo.mk" +.endif + +# Support threads and building of crt*.o on post-1.6 -current. +# Use buildlink to avoid a GNU pth package. +.if ${OPSYS} == "NetBSD" && exists(/usr/include/pthread.h) +GCC_PLATFORM= ${MACHINE_GNU_ARCH}--netbsdelf2.0 +PTHREAD_OPTS+= require native +.include "../../mk/pthread.buildlink2.mk" +CPPFLAGS+= -I${BUILDLINK_DIR}/include +CFLAGS+= -I${BUILDLINK_DIR}/include +.else +GCC_PLATFORM= ${MACHINE_GNU_PLATFORM} +.endif +CONFIGURE_ARGS+= --host=${GCC_PLATFORM} +PLIST_SUBST+= GCC_PLATFORM=${GCC_PLATFORM} + +.if ${OPSYS} == "NetBSD" && !defined(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 defined(USE_BINUTILS) && ${USE_BINUTILS} == "YES" +DEPENDS= binutils>=2.13.2.1:../../devel/binutils +CONFIGURE_ARGS+= --with-as=${PREFIX}/${MACHINE_GNU_PLATFORM}/bin/as +#. include "../../devel/binutils/buildlink2.mk" +.endif + +.if ${OPSYS} == "NetBSD" || ${OPSYS} == "Linux" +CONFIGURE_ARGS+= --enable-shared +.else +. if ${OPSYS} == "SunOS" +CONFIGURE_ARGS+= --enable-shared +. else +CONFIGURE_ARGS+= --disable-shared +. endif +. if ${CC:M*gcc*} == "" +ALL_TARGET= bootstrap +. endif +.endif + +GCC_ARCHSUBDIR= ${GCC_SUBPREFIX}/lib/gcc-lib/${GCC_PLATFORM}/${GCC_VERSION} +GCC_ARCHDIR= ${PREFIX}/${GCC_ARCHSUBDIR} + +pre-configure: + ${MKDIR} ${BUILD_DIRS} + cd ${WRKSRC} && contrib/gcc_update --touch |