2001-12-29 19:33:39 +01:00
|
|
|
# $NetBSD: Makefile,v 1.30 2001/12/29 18:33:39 fredb Exp $
|
2000-03-25 00:41:20 +01:00
|
|
|
|
|
|
|
DISTNAME= gcc-2.95.2
|
2001-12-29 18:41:45 +01:00
|
|
|
PKGREVISION= 1
|
2000-03-25 00:41:20 +01:00
|
|
|
CATEGORIES= lang
|
|
|
|
MASTER_SITES= ${MASTER_SITE_GNU:=gcc/}
|
|
|
|
|
|
|
|
MAINTAINER= packages@netbsd.org
|
|
|
|
HOMEPAGE= http://www.gnu.org/software/gcc/gcc.html
|
2001-02-17 10:06:56 +01:00
|
|
|
COMMENT= GNU Compiler Collection
|
2000-03-25 00:41:20 +01:00
|
|
|
|
2001-09-28 01:17:41 +02:00
|
|
|
BUILD_DEPENDS+= bison-[0-9]*:../../devel/bison
|
2000-03-25 00:41:20 +01:00
|
|
|
|
2001-03-01 00:49:18 +01:00
|
|
|
# The platforms listed below are the only tested platforms so far.
|
|
|
|
# If you get gcc working on other platforms, then please add them.
|
2001-01-11 07:53:10 +01:00
|
|
|
ONLY_FOR_PLATFORM= NetBSD-*-arm32 NetBSD-*-i386 NetBSD-*-m68k \
|
2001-03-01 00:49:18 +01:00
|
|
|
NetBSD-*-sparc SunOS-*-*
|
2000-03-25 00:41:20 +01:00
|
|
|
|
2000-09-16 01:58:47 +02:00
|
|
|
.include "../../mk/bsd.prefs.mk"
|
2000-03-25 00:41:20 +01:00
|
|
|
|
2000-09-16 01:58:47 +02:00
|
|
|
.if (${OPSYS} == "NetBSD") && (${OBJECT_FMT} == "ELF")
|
|
|
|
MACHINE_GCC_PLATFORM= ${MACHINE_GNU_PLATFORM}elf
|
|
|
|
.else
|
|
|
|
MACHINE_GCC_PLATFORM= ${MACHINE_GNU_PLATFORM}
|
|
|
|
.endif
|
|
|
|
|
|
|
|
USE_GMAKE= YES
|
|
|
|
HAS_CONFIGURE= YES
|
|
|
|
CONFIGURE_ARGS= --host=${MACHINE_GCC_PLATFORM} \
|
2001-05-04 12:15:44 +02:00
|
|
|
--prefix=${GCC_PREFIX} \
|
|
|
|
--enable-shared
|
2000-03-27 10:54:53 +02:00
|
|
|
CONFIGURE_SCRIPT= ${SRCDIR}/configure
|
2001-06-11 19:21:56 +02:00
|
|
|
INFO_FILES= chill.info cpp.info g77.info gcc.info
|
2000-03-25 00:41:20 +01:00
|
|
|
|
2001-12-29 19:33:39 +01:00
|
|
|
GCC_VERSION= ${PKGNAME:C/.*-//:C/nb[1-9]*//}
|
2001-01-29 12:34:21 +01:00
|
|
|
MESSAGE_SUBST+= MAKE=${MAKE}
|
2000-09-16 01:58:47 +02:00
|
|
|
PLIST_SUBST+= GCC_VERSION=${GCC_VERSION} \
|
|
|
|
MACHINE_GCC_PLATFORM=${MACHINE_GCC_PLATFORM}
|
2001-03-01 00:51:12 +01:00
|
|
|
SRCDIR= ${WRKDIR}/${DISTNAME}
|
2000-03-27 10:54:53 +02:00
|
|
|
WRKSRC= ${WRKDIR}/objdir
|
|
|
|
|
2001-01-11 07:53:10 +01:00
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
|
|
|
|
.if (${OPSYS} != SunOS)
|
2001-06-11 19:21:56 +02:00
|
|
|
CONFIGURE_ARGS+= --with-gnu-as --with-gnu-ld --infodir=${PREFIX}/info
|
|
|
|
|
2001-01-11 07:53:10 +01:00
|
|
|
GCC_PREFIX= ${LOCALBASE}/${PKGNAME}
|
2001-04-30 21:02:27 +02:00
|
|
|
.if ${MACHINE_PLATFORM:MNetBSD-*-sparc}
|
|
|
|
PLIST_SRC= ${PKGDIR}/PLIST.NetBSD-sparc
|
|
|
|
PLIST_SRC+= ${PKGDIR}/PLIST
|
|
|
|
.endif
|
2001-01-11 07:53:10 +01:00
|
|
|
.else
|
|
|
|
.if (${CC} != gcc)
|
|
|
|
ALL_TARGET= bootstrap
|
|
|
|
.endif
|
|
|
|
GCC_PREFIX= ${LOCALBASE}
|
|
|
|
PLIST_SRC= ${PKGDIR}/PLIST.SunOS
|
2001-01-29 12:34:21 +01:00
|
|
|
MESSAGE= ${PKGDIR}/MESSAGE.SunOS
|
2001-02-21 19:12:20 +01:00
|
|
|
CONFLICTS+= gcc-[0-9]* pgcc-[0-9]*
|
2001-01-11 07:53:10 +01:00
|
|
|
.endif
|
|
|
|
|
2000-03-25 00:41:20 +01:00
|
|
|
post-extract:
|
|
|
|
${MKDIR} ${WRKSRC}
|
2001-05-04 12:15:44 +02:00
|
|
|
${CP} ${FILESDIR}/netbsd*.ml ${WRKSRC}/../${DISTNAME}/libstdc++/config
|
2000-03-25 00:41:20 +01:00
|
|
|
|
2000-09-26 00:19:19 +02:00
|
|
|
post-patch:
|
|
|
|
${ECHO} "bogus" >${WRKSRC}/../${DISTNAME}/gcc/cstamp-h.in
|
|
|
|
|
2001-01-11 07:53:10 +01:00
|
|
|
.if (${OPSYS} != SunOS)
|
2000-09-16 01:58:47 +02:00
|
|
|
post-build:
|
2001-02-08 18:27:01 +01:00
|
|
|
for FILE in ${FILESDIR}/gcc.mk; do \
|
2000-09-16 02:19:45 +02:00
|
|
|
${SED} -e 's#@@MAKE@@#${MAKE}#g' \
|
|
|
|
-e 's#@@PKGNAME@@#${PKGNAME}#g' \
|
|
|
|
-e 's#@@PREFIX@@#${PREFIX}#g' \
|
2001-01-11 07:53:10 +01:00
|
|
|
<$$FILE >${WRKDIR}/`basename $$FILE`; \
|
2000-09-16 02:19:45 +02:00
|
|
|
done
|
2001-01-11 07:53:10 +01:00
|
|
|
.endif
|
2000-09-16 01:58:47 +02:00
|
|
|
|
2001-12-29 18:41:45 +01:00
|
|
|
pre-install:
|
|
|
|
${SETENV} PKG_PREFIX="${PREFIX}" ${SH} ${INSTALL_FILE} any PRE-INSTALL
|
|
|
|
|
2001-01-13 01:34:55 +01:00
|
|
|
.if (${OPSYS} != SunOS)
|
2000-09-16 01:58:47 +02:00
|
|
|
post-install:
|
2001-06-11 17:10:38 +02:00
|
|
|
${RM} -f ${GCC_PREFIX}/lib/gcc-lib/${MACHINE_GCC_PLATFORM}/${GCC_VERSION}/include/curses.h ${PREFIX}/${PKGNAME}/bin/cc
|
2001-01-13 01:34:55 +01:00
|
|
|
${LN} -s gcc ${PREFIX}/${PKGNAME}/bin/cc
|
2001-06-11 18:12:41 +02:00
|
|
|
${RM} -f ${GCC_PREFIX}/lib/gcc-lib/${MACHINE_GCC_PLATFORM}/${GCC_VERSION}/include/curses.h
|
2000-09-16 01:58:47 +02:00
|
|
|
${INSTALL_DATA} ${WRKDIR}/gcc.mk ${PREFIX}/etc/${PKGNAME}.mk
|
2001-01-11 07:53:10 +01:00
|
|
|
.endif
|
2000-09-16 01:58:47 +02:00
|
|
|
|
2000-03-25 00:41:20 +01:00
|
|
|
.include "../../mk/bsd.pkg.mk"
|
2001-01-11 07:53:10 +01:00
|
|
|
|
|
|
|
# Make bootstrap with compiler != gcc possible.
|
|
|
|
LDFLAGS= ${STRIPFLAG}
|