2002-10-20 22:40:11 +02:00
|
|
|
# $NetBSD: Makefile,v 1.48 2002/10/20 20:40:11 jlam Exp $
|
2000-03-25 00:41:20 +01:00
|
|
|
|
2002-01-03 22:39:54 +01:00
|
|
|
# Make sure that the version number in "Makefile.gcc" matches this.
|
2002-01-03 21:40:37 +01:00
|
|
|
DISTNAME= gcc-2.95.3
|
2000-03-25 00:41:20 +01:00
|
|
|
CATEGORIES= lang
|
|
|
|
MASTER_SITES= ${MASTER_SITE_GNU:=gcc/}
|
2002-03-28 11:11:50 +01:00
|
|
|
#
|
2002-09-27 14:28:15 +02:00
|
|
|
# Synced from patches against main source tree as of 2002-03-28
|
2002-03-28 11:11:50 +01:00
|
|
|
#
|
2000-03-25 00:41:20 +01:00
|
|
|
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
|
|
|
|
2002-08-12 03:53:34 +02:00
|
|
|
PATCH_SITES= ${MASTER_SITE_LOCAL}
|
2002-09-09 05:23:06 +02:00
|
|
|
PATCHFILES= gcc-2.95.3-diff-2002-08-29.gz
|
2002-08-12 03:53:34 +02:00
|
|
|
|
2001-09-28 01:17:41 +02:00
|
|
|
BUILD_DEPENDS+= bison-[0-9]*:../../devel/bison
|
2000-03-25 00:41:20 +01:00
|
|
|
|
2002-09-27 14:28:15 +02:00
|
|
|
USE_BUILDLINK2= YES
|
2000-09-16 01:58:47 +02:00
|
|
|
USE_GMAKE= YES
|
2002-09-27 14:28:15 +02:00
|
|
|
|
2000-09-16 01:58:47 +02:00
|
|
|
HAS_CONFIGURE= YES
|
2000-03-27 10:54:53 +02:00
|
|
|
CONFIGURE_SCRIPT= ${SRCDIR}/configure
|
2002-09-27 14:28:15 +02:00
|
|
|
CONFIGURE_ARGS= --host=${MACHINE_GNU_PLATFORM}
|
|
|
|
CONFIGURE_ARGS+= --prefix=${GCC_PREFIX}
|
|
|
|
CONFIGURE_ARGS+= --enable-shared
|
2000-03-25 00:41:20 +01:00
|
|
|
|
2002-01-09 17:33:32 +01:00
|
|
|
PLIST_SUBST+= GCC_VERSION=${PKGVERSION}
|
2001-03-01 00:51:12 +01:00
|
|
|
SRCDIR= ${WRKDIR}/${DISTNAME}
|
2000-03-27 10:54:53 +02:00
|
|
|
WRKSRC= ${WRKDIR}/objdir
|
|
|
|
|
2002-09-27 14:28:15 +02:00
|
|
|
INFO_FILES= chill.info cpp.info g77.info gcc.info
|
|
|
|
|
2001-01-11 07:53:10 +01:00
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
|
2002-09-27 14:28:15 +02:00
|
|
|
.if ${OPSYS} == "SunOS"
|
|
|
|
CONFLICTS+= gcc-[0-9]* pgcc-[0-9]*
|
|
|
|
. if ${CC} != "gcc"
|
2001-01-11 07:53:10 +01:00
|
|
|
ALL_TARGET= bootstrap
|
2002-09-27 14:28:15 +02:00
|
|
|
. endif
|
|
|
|
GCC_PREFIX= ${PREFIX}
|
2001-01-11 07:53:10 +01:00
|
|
|
PLIST_SRC= ${PKGDIR}/PLIST.SunOS
|
2002-09-27 14:28:15 +02:00
|
|
|
MESSAGE_SRC= ${PKGDIR}/MESSAGE.SunOS
|
|
|
|
.else
|
|
|
|
GCC_PREFIX= ${PREFIX}/${PKGNAME}
|
|
|
|
CONFIGURE_ARGS+= --with-gnu-as
|
|
|
|
CONFIGURE_ARGS+= --with-gnu-ld
|
|
|
|
CONFIGURE_ARGS+= --infodir=${PREFIX}/info
|
|
|
|
PLIST_SRC= ${WRKDIR}/PLIST_DYNAMIC
|
2001-01-11 07:53:10 +01:00
|
|
|
.endif
|
|
|
|
|
2002-09-27 14:28:15 +02:00
|
|
|
GCC_ARCHDIR= ${GCC_PREFIX}/lib/gcc-lib/${MACHINE_GNU_PLATFORM}/${PKGVERSION}
|
|
|
|
FILES_SUBST+= GCC_PREFIX=${GCC_PREFIX}
|
|
|
|
|
2000-03-25 00:41:20 +01:00
|
|
|
post-extract:
|
|
|
|
${MKDIR} ${WRKSRC}
|
2002-09-27 14:28:15 +02:00
|
|
|
${CP} ${FILESDIR}/xm-netbsd.h ${SRCDIR}/gcc/config
|
|
|
|
${CP} ${FILESDIR}/xm-target64.h ${SRCDIR}/gcc/config
|
|
|
|
for file in ${FILESDIR}/*_* ; do \
|
|
|
|
arch=`${BASENAME} $${file} | ${SED} -e "s/_.*//"`; \
|
|
|
|
dest=`${BASENAME} $${file} | ${SED} -e "s/$${arch}_//"`; \
|
|
|
|
${MKDIR} ${SRCDIR}/gcc/config/$${arch}; \
|
|
|
|
${CP} $${file} ${SRCDIR}/gcc/config/$${arch}/$${dest}; \
|
2002-03-28 11:11:50 +01:00
|
|
|
done
|
2002-09-27 14:28:15 +02:00
|
|
|
${RM} ${SRCDIR}/gcc/config/alpha/netbsd-elf.h
|
|
|
|
${RM} ${SRCDIR}/gcc/config/arm/t-netbsd
|
|
|
|
${RM} ${SRCDIR}/gcc/config/mips/x-netbsd
|
|
|
|
${RM} ${SRCDIR}/libf2c/libF77/dtime_.c
|
|
|
|
${RM} ${SRCDIR}/libf2c/libF77/etime_.c
|
2000-03-25 00:41:20 +01:00
|
|
|
|
2002-09-27 14:28:15 +02:00
|
|
|
pre-configure:
|
|
|
|
${ECHO} "bogus" > ${SRCDIR}/gcc/cstamp-h.in
|
2000-09-26 00:19:19 +02:00
|
|
|
|
2000-09-16 01:58:47 +02:00
|
|
|
post-build:
|
2002-09-27 14:28:15 +02:00
|
|
|
@${SED} ${FILES_SUBST_SED} ${FILESDIR}/gcc.mk > ${WRKDIR}/gcc.mk
|
2001-12-29 18:41:45 +01:00
|
|
|
|
2002-09-27 14:28:15 +02:00
|
|
|
.if (${OPSYS} == SunOS)
|
|
|
|
#
|
|
|
|
# remove empty file and directories that show up when one does:
|
|
|
|
# make install; make deinstall; make install
|
|
|
|
#
|
2000-09-16 01:58:47 +02:00
|
|
|
post-install:
|
2002-10-20 22:40:11 +02:00
|
|
|
${INSTALL_DATA} ${WRKDIR}/gcc.mk ${PREFIX}/etc/${PKGNAME}.mk
|
2002-09-27 14:28:15 +02:00
|
|
|
-cd ${GCC_ARCHDIR}/include && ${RM} -f fixed && ${RMDIR} v7 v9
|
2002-01-09 17:33:32 +01:00
|
|
|
.else
|
|
|
|
post-install:
|
2002-09-27 14:28:15 +02:00
|
|
|
${INSTALL_DATA} ${WRKDIR}/gcc.mk ${PREFIX}/etc/${PKGNAME}.mk
|
|
|
|
. if exists(/usr/include/g++/FlexLexer.h)
|
|
|
|
${LN} -fs /usr/include/g++/FlexLexer.h \
|
|
|
|
${GCC_PREFIX}/include/g++-3/FlexLexer.h
|
|
|
|
. endif
|
|
|
|
${RM} -f ${GCC_ARCHDIR}/include/curses.h ${GCC_PREFIX}/bin/cc
|
|
|
|
${LN} -s gcc ${GCC_PREFIX}/bin/cc
|
|
|
|
${CP} -f ${PKGDIR}/PLIST ${PLIST_SRC}
|
|
|
|
${FIND} ${GCC_PREFIX} \( -type f -o -type l \) -print \
|
|
|
|
| ${SORT} | ${SED} -e "s,${PREFIX}/,,g" \
|
|
|
|
>> ${PLIST_SRC}
|
|
|
|
${FIND} ${GCC_PREFIX} -type d -print \
|
|
|
|
| ${SORT} -r | ${SED} -e "s,${PREFIX}/,@dirrm ,g" \
|
|
|
|
>> ${PLIST_SRC}
|
2001-01-11 07:53:10 +01:00
|
|
|
.endif
|
2000-09-16 01:58:47 +02:00
|
|
|
|
2002-02-18 16:14:00 +01:00
|
|
|
.include "../../mk/texinfo.mk"
|
2002-09-27 14:28:15 +02:00
|
|
|
.include "../../mk/bsd.pkg.install.mk"
|
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.
|
2002-05-14 16:01:33 +02:00
|
|
|
LDFLAGS= ${_STRIPFLAG_CC}
|