1999-09-17 07:42:05 -04:00
|
|
|
# $OpenBSD: Makefile,v 1.24 1999/09/17 11:42:05 espie Exp $
|
1998-09-26 04:53:03 -04:00
|
|
|
|
1999-01-09 11:53:22 -05:00
|
|
|
# This is a configuration file for egcs, stable release.
|
1998-09-26 04:53:03 -04:00
|
|
|
|
1999-02-26 11:18:43 -05:00
|
|
|
# it only works right with a recent bsd.port.mk.
|
1999-03-01 23:41:00 -05:00
|
|
|
NEED_VERSION=1.73
|
1999-02-26 11:18:43 -05:00
|
|
|
|
|
|
|
# we could remove this dependency by patching configure, but this is not
|
|
|
|
# reasonable...
|
|
|
|
BUILD_DEPENDS= autoconf:${PORTSDIR}/devel/autoconf
|
|
|
|
|
1998-12-03 19:24:31 -05:00
|
|
|
CATEGORIES= lang
|
|
|
|
MAINTAINER= Marc.Espie@openbsd.org
|
1999-09-17 07:42:05 -04:00
|
|
|
COMES_WITH= 2.6
|
1998-12-03 19:24:31 -05:00
|
|
|
|
1999-08-22 11:50:38 -04:00
|
|
|
# Testers for the new configurations:
|
|
|
|
# Jason L.Wright & Marco S.Hyman for sparc,
|
|
|
|
# Michael Shalayeff for hppa,
|
|
|
|
# Wim Van Deputte for alpha,
|
|
|
|
# Steve Murphee for m88k,
|
|
|
|
# Per Fogelstrom and Todd Millert for mips,
|
|
|
|
# Dale Rahn for rs6000.
|
1998-12-03 19:24:31 -05:00
|
|
|
|
|
|
|
# user configuration section
|
1998-09-26 04:53:03 -04:00
|
|
|
|
1999-08-22 11:50:38 -04:00
|
|
|
# see files/tests for precise testing procedure
|
|
|
|
|
|
|
|
|
|
|
|
# cygnus packaging scheme is now working, though it is weird.
|
|
|
|
# namely, testsuite holds all the tests. g++-tests no longer exists,
|
|
|
|
# and g77-tests only holds duplicates from the main testsuite archive.
|
1999-04-02 17:49:19 -05:00
|
|
|
#MAKE_TESTS=yes
|
1998-12-03 19:24:31 -05:00
|
|
|
MAKE_GXX=yes
|
|
|
|
MAKE_FORTRAN=yes
|
1999-08-22 11:50:38 -04:00
|
|
|
MAKE_CHILL=yes
|
1998-12-03 19:24:31 -05:00
|
|
|
MAKE_OBJC=yes
|
1999-08-22 11:50:38 -04:00
|
|
|
MAKE_JAVA=yes
|
1998-12-03 19:24:31 -05:00
|
|
|
|
|
|
|
.if defined(MAKE_TESTS)
|
|
|
|
BUILD_DEPENDS+= runtest:${PORTSDIR}/devel/dejagnu
|
|
|
|
.endif
|
|
|
|
|
1999-02-26 11:18:43 -05:00
|
|
|
# if you want/need to use the mammoth archive.
|
1999-08-22 11:50:38 -04:00
|
|
|
ONE_ARCHIVE=yes
|
1998-12-03 19:24:31 -05:00
|
|
|
|
1999-02-26 11:18:43 -05:00
|
|
|
#### fetch section
|
1999-08-22 11:50:38 -04:00
|
|
|
VERSION= 2.95.1
|
1999-02-26 11:18:43 -05:00
|
|
|
|
1999-03-21 02:51:08 -05:00
|
|
|
DIRECTORY=egcs/releases/%SUBDIR%/
|
1999-02-26 11:18:43 -05:00
|
|
|
|
|
|
|
# getting the right archives where they should be
|
1999-08-22 11:50:38 -04:00
|
|
|
MASTER_SITE_SUBDIR=gcc-2.95.1
|
1999-09-06 11:38:26 -04:00
|
|
|
DISTNAME= gcc-${VERSION}
|
1999-08-22 11:50:38 -04:00
|
|
|
USE_BZIP2=yes
|
1999-02-26 11:18:43 -05:00
|
|
|
|
1998-12-03 19:24:31 -05:00
|
|
|
DIST_SUBDIR=egcs
|
1999-02-26 11:18:43 -05:00
|
|
|
|
1998-12-18 19:57:57 -05:00
|
|
|
.if defined(ONE_ARCHIVE)
|
1999-08-22 11:50:38 -04:00
|
|
|
DISTFILES= gcc-${VERSION}${EXTRACT_SUFX}
|
1998-12-18 19:57:57 -05:00
|
|
|
.else
|
|
|
|
|
1999-08-22 11:50:38 -04:00
|
|
|
DISTFILES= gcc-core-${VERSION}${EXTRACT_SUFX}
|
1998-12-03 19:24:31 -05:00
|
|
|
.if defined(MAKE_GXX)
|
1999-08-22 11:50:38 -04:00
|
|
|
DISTFILES+= gcc-g++-${VERSION}${EXTRACT_SUFX}
|
1998-12-03 19:24:31 -05:00
|
|
|
.endif
|
1999-08-22 11:50:38 -04:00
|
|
|
#.if defined(MAKE_TESTS)
|
|
|
|
#DISTFILES+=gcc-tests-${VERSION}${EXTRACT_SUFX}
|
|
|
|
#.endif
|
1998-12-03 19:24:31 -05:00
|
|
|
.if defined(MAKE_FORTRAN)
|
1999-08-22 11:50:38 -04:00
|
|
|
DISTFILES+=gcc-g77-${VERSION}${EXTRACT_SUFX}
|
|
|
|
.endif
|
|
|
|
.if defined(MAKE_JAVA)
|
|
|
|
DISTFILES+=gcc-java-${VERSION}${EXTRACT_SUFX}
|
1998-12-03 19:24:31 -05:00
|
|
|
.endif
|
|
|
|
.if defined(MAKE_OBJC)
|
1999-08-22 11:50:38 -04:00
|
|
|
DISTFILES+=gcc-objc-${VERSION}${EXTRACT_SUFX}
|
|
|
|
.endif
|
|
|
|
.if defined(MAKE_CHILL)
|
|
|
|
DISTFILES+=gcc-chill-${VERSION}${EXTRACT_SUFX}
|
1998-12-03 19:24:31 -05:00
|
|
|
.endif
|
1998-12-18 19:57:57 -05:00
|
|
|
.endif
|
1998-12-03 19:24:31 -05:00
|
|
|
|
1998-09-26 04:53:03 -04:00
|
|
|
MASTER_SITES= ftp://egcs.cygnus.com/pub/${DIRECTORY}
|
|
|
|
MASTER_SITES+= ftp://ftp.lip6.fr/pub/${DIRECTORY}
|
1998-12-10 07:24:21 -05:00
|
|
|
MASTER_SITES+= ftp://mirror.aarnet.edu.au/pub/${DIRECTORY}
|
1998-10-11 10:08:23 -04:00
|
|
|
MASTER_SITES+= ftp://go.cygnus.com/pub/ftp.cygnus.com/${DIRECTORY}
|
|
|
|
MASTER_SITES+= ftp://ftp.goof.com/pub/pcg/${DIRECTORY}
|
|
|
|
MASTER_SITES+= ftp://cambridge.cygnus.com/pub/${DIRECTORY}
|
|
|
|
MASTER_SITES+= ftp://ftp.ninemoons.com/pub/mirrors/${DIRECTORY}
|
|
|
|
MASTER_SITES+= ftp://sunsite.doc.ic.ac.uk/Mirrors/egcs.cygnus.com/pub/${DIRECTORY}
|
|
|
|
MASTER_SITES+= ftp://gd.tuwien.ac.at/gnu/${DIRECTORY}
|
|
|
|
MASTER_SITES+= ftp://ftp.ilog.fr/pub/Mirrors/${DIRECTORY}
|
|
|
|
MASTER_SITES+= ftp://ftp.irisa.fr/pub/mirrors/${DIRECTORY}
|
|
|
|
MASTER_SITES+= ftp://ftp.gts.cz/pub/MIRRORS/ftp.cygnus.com/pub/${DIRECTORY}
|
|
|
|
MASTER_SITES+= ftp://sunsite.auc.dk/pub/${DIRECTORY}
|
|
|
|
MASTER_SITES+= ftp://ftp.fu-berlin.de/unix/languages/${DIRECTORY}
|
|
|
|
MASTER_SITES+= ftp://ftp.gwdg.de/pub/cygnus/${DIRECTORY}
|
|
|
|
MASTER_SITES+= ftp://ftp.mpi-sb.mpg.de/pub/gnu/mirror/egcs.cygnus.com/${DIRECTORY}
|
|
|
|
MASTER_SITES+= ftp://ftp.uni-trier.de/pub/languages/c/implementation/${DIRECTORY}
|
|
|
|
MASTER_SITES+= ftp://ftp.sunet.se/pub/gnu/${DIRECTORY}
|
|
|
|
MASTER_SITES+= ftp://ftp.unicamp.br/pub/gnu/=EXTRA=/cygnus/${DIRECTORY}
|
|
|
|
MASTER_SITES+= ftp://ftp.lbi.ro/mirrors/ftp.cygnus.com/pub/${DIRECTORY}
|
|
|
|
MASTER_SITES+= ftp://ftp.ntua.gr/pub/gnu/${DIRECTORY}
|
|
|
|
MASTER_SITES+= ftp://ftp.nluug.nl/pub/languages/${DIRECTORY}
|
|
|
|
MASTER_SITES+= ftp://ftp.dti.ad.jp/pub/lang/${DIRECTORY}
|
|
|
|
MASTER_SITES+= ftp://ftp.win.or.jp/pub/lang/${DIRECTORY}
|
|
|
|
MASTER_SITES+= ftp://ftp.telewaynet.ad.jp/pub/lang/${DIRECTORY}
|
|
|
|
MASTER_SITES+= ftp://ftp.lab.kdd.co.jp/lang/${DIRECTORY}
|
|
|
|
MASTER_SITES+= ftp://ftp.funet.fi/mirrors/ftp.cygnus.com/pub/${DIRECTORY}
|
1998-12-18 19:57:57 -05:00
|
|
|
MASTER_SITES+= ftp://ftp.crc.ca/pub/packages/egcs/%SUBDIR%/
|
1998-10-11 10:08:23 -04:00
|
|
|
MASTER_SITES+= ftp://ftp.nc.orc.ru/pub/${DIRECTORY}
|
|
|
|
MASTER_SITES+= ftp://ftp.u-aizu.ac.jp/pub/lang/C/pcg/${DIRECTORY}
|
|
|
|
MASTER_SITES+= ftp://ftp.maisel.int-evry.fr/pub/linux/pentium/${DIRECTORY}
|
1998-12-18 19:57:57 -05:00
|
|
|
MASTER_SITES+= ftp://ftp.yggdrasil.com/mirrors/site/egcs.cygnus.com/pub/${DIRECTORY}
|
|
|
|
MASTER_SITES+= ftp://unix.hensa.ac.uk/mirrors/egcs.cygnus.com/pub/${DIRECTORY}
|
|
|
|
|
|
|
|
# couldn't contact those, maybe they work ?
|
|
|
|
MASTER_SITES+= ftp://sunsite.mff.cuni.cz/pub/GNU/${DIRECTORY}
|
|
|
|
MASTER_SITES+= ftp://sunsite.icm.edu.pl/pub/programming/${DIRECTORY}
|
|
|
|
MASTER_SITES+= ftp://ftp.task.gda.pl/mirror/egcs.cygnus.com/pub/${DIRECTORY}
|
|
|
|
MASTER_SITES+= ftp://ftp.lca.uevora.pt/pub/${DIRECTORY}
|
|
|
|
MASTER_SITES+= ftp://cair-archive.kaist.ac.kr/pub/gnu/${DIRECTORY}
|
|
|
|
MASTER_SITES+= ftp://linux.ihep.su/pub/cygnus/${DIRECTORY}
|
|
|
|
MASTER_SITES+= ftp://linux.cis.nctu.edu.tw/pub/packages/pcg/${DIRECTORY}
|
1998-09-26 04:53:03 -04:00
|
|
|
|
1998-12-18 19:57:57 -05:00
|
|
|
PATCH_SITES= ${MASTER_SITES}
|
1999-02-26 11:18:43 -05:00
|
|
|
|
1999-08-22 11:50:38 -04:00
|
|
|
# Misc bug sections
|
|
|
|
pre-fetch:
|
|
|
|
.if (${MACHINE_ARCH} == "i386")
|
|
|
|
@(cd /tmp && /usr/bin/as -k ${FILESDIR}/gas-bug/test-i386-gas.s) || \
|
|
|
|
(${ECHO} "Your gas has a bug, see ${FILESDIR}/gas-bug for details"; ${FALSE})
|
|
|
|
.endif
|
|
|
|
|
1998-12-03 19:24:31 -05:00
|
|
|
####
|
|
|
|
# Patch section
|
1998-09-26 04:53:03 -04:00
|
|
|
|
1998-12-03 19:24:31 -05:00
|
|
|
PATCH_LIST=patch-core-*
|
|
|
|
.if defined(MAKE_GXX)
|
|
|
|
PATCH_LIST+=patch-g++-*
|
|
|
|
.endif
|
|
|
|
.if defined(MAKE_OBJC)
|
|
|
|
PATCH_LIST+=patch-objc-*
|
|
|
|
.endif
|
|
|
|
.if defined(MAKE_CHILL)
|
|
|
|
PATCH_LIST+=patch-chill-*
|
|
|
|
.endif
|
|
|
|
.if defined(MAKE_FORTRAN)
|
|
|
|
PATCH_LIST+=patch-g77-*
|
|
|
|
.endif
|
|
|
|
.if defined(MAKE_JAVA)
|
|
|
|
PATCH_LIST+=patch-java-*
|
|
|
|
.endif
|
1998-09-26 04:53:03 -04:00
|
|
|
|
1998-12-03 19:24:31 -05:00
|
|
|
# get openbsd configuration files where they should be
|
|
|
|
post-patch:
|
1999-08-22 11:50:38 -04:00
|
|
|
# avoid packaging include copies along...
|
|
|
|
find ${WRKSRC} -name \*.orig|xargs ${RM}
|
1998-12-03 19:24:31 -05:00
|
|
|
${CP} -R ${FILESDIR}/config/* ${WRKSRC}
|
|
|
|
${RM} -rf ${WRKSRC}/texinfo
|
1999-08-22 11:50:38 -04:00
|
|
|
# rebuild configure files after patching, then move source around !!!
|
|
|
|
# XXX: don't try to autoconf the main configure file, it's not autoconf.
|
|
|
|
cd ${WRKSRC}/gcc && PATH=${PORTPATH} autoreconf
|
|
|
|
cd ${WRKSRC}/libiberty && PATH=${PORTPATH} autoreconf
|
1998-09-26 04:53:03 -04:00
|
|
|
|
1998-12-03 19:24:31 -05:00
|
|
|
####
|
|
|
|
# configure section
|
|
|
|
#
|
|
|
|
|
|
|
|
GNU_CONFIGURE= yes
|
1998-09-26 04:53:03 -04:00
|
|
|
|
1999-08-22 11:50:38 -04:00
|
|
|
LANGS=c
|
|
|
|
.if defined(MAKE_GXX)
|
|
|
|
LANGS+=c++
|
|
|
|
.endif
|
|
|
|
.if defined(MAKE_FORTRAN)
|
|
|
|
LANGS+=f77
|
|
|
|
.endif
|
|
|
|
.if defined(MAKE_CHILL)
|
|
|
|
LANGS+=CHILL
|
|
|
|
.endif
|
|
|
|
.if defined(MAKE_OBJC)
|
|
|
|
LANGS+=objc
|
|
|
|
.endif
|
|
|
|
.if defined(MAKE_JAVA)
|
|
|
|
LANGS+=java
|
|
|
|
.endif
|
|
|
|
|
|
|
|
CONFIGURE_ENV=LANGUAGES='${LANGS}'
|
|
|
|
|
1998-10-02 14:51:24 -04:00
|
|
|
CONFIGURE_ARGS= --prefix=${PREFIX} \
|
1998-10-13 10:52:34 -04:00
|
|
|
--verbose --with-gnu-ld --with-gnu-as \
|
1999-08-22 11:50:38 -04:00
|
|
|
--program-transform-name=s,^,e, \
|
|
|
|
--disable-subdir-texinfo \
|
|
|
|
--disable-nls
|
|
|
|
|
|
|
|
# This is needed, as internal cpp is no longer compatible with the
|
|
|
|
# visible beast
|
|
|
|
CONFIGURE_ARGS+=--enable-cpp
|
1998-12-03 19:24:31 -05:00
|
|
|
|
1999-03-01 23:41:00 -05:00
|
|
|
CONFIGURE_ARGS+=${CONFIGURE_SHARED}
|
1998-09-26 04:53:03 -04:00
|
|
|
|
1999-03-25 16:51:27 -05:00
|
|
|
# Not really stable yet
|
|
|
|
# CONFIGURE_ARGS+= --enable-threads=yes
|
1999-08-22 11:50:38 -04:00
|
|
|
SEPARATE_BUILD=concurrent
|
1998-09-26 04:53:03 -04:00
|
|
|
|
1998-12-03 19:24:31 -05:00
|
|
|
####
|
|
|
|
# build section
|
|
|
|
# should work without gmake. If it turns out to be needed, this must be
|
1999-02-26 11:18:43 -05:00
|
|
|
# reported to MAINTAINER.
|
1998-12-03 19:24:31 -05:00
|
|
|
#USE_GMAKE= yes
|
|
|
|
|
1999-08-22 11:50:38 -04:00
|
|
|
# desactivate the fixincludes mechanism by supplying a script which does
|
|
|
|
# nothing
|
|
|
|
pre-build:
|
|
|
|
echo "#!/bin/sh" >${WRKBUILD}/gcc/fixinc.sh
|
|
|
|
|
1999-02-26 11:18:43 -05:00
|
|
|
# you shouldn't skip bootstrap unless you know what you're doing
|
|
|
|
# use bootstrap-lean if you're pressed for space
|
1998-12-03 19:24:31 -05:00
|
|
|
ALL_TARGET=bootstrap
|
1999-02-26 11:18:43 -05:00
|
|
|
# ALL_TARGET=bootstrap-lean
|
1998-12-03 19:24:31 -05:00
|
|
|
# XXX we need to override do-build to get the warnings from within make
|
|
|
|
do-build:
|
1999-02-26 11:18:43 -05:00
|
|
|
@(cd ${WRKBUILD}; \
|
|
|
|
${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} ${MAKEFILE} ${ALL_TARGET} 2>warnings) || \
|
1999-03-25 16:51:27 -05:00
|
|
|
(echo "*** Make bootstrap failed."; \
|
|
|
|
echo "*** Look at ${WRKBUILD}/warnings for errors"; ${FALSE})
|
1998-12-03 19:24:31 -05:00
|
|
|
|
|
|
|
####
|
1999-03-25 16:51:27 -05:00
|
|
|
# Install & tests section
|
|
|
|
|
1999-08-22 11:50:38 -04:00
|
|
|
# Tests no longer need to be performed at the end of install, this
|
|
|
|
# was a bug in libstdc++/openbsd.ml
|
1999-03-25 16:51:27 -05:00
|
|
|
.if defined(MAKE_TESTS)
|
1999-08-22 11:50:38 -04:00
|
|
|
TEST_RESULT=${WRKBUILD}/test.result
|
|
|
|
|
|
|
|
post-build:
|
|
|
|
@(cd ${WRKBUILD}; ulimit -c 0; \
|
|
|
|
${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} ${MAKEFILE} check && \
|
|
|
|
${WRKSRC}/contrib/test_summary >${TEST_RESULT})
|
|
|
|
@${ECHO} "Please send the tests results to the egcs project"
|
|
|
|
@${ECHO} "By invoking make send-results"
|
|
|
|
|
|
|
|
send-results:
|
|
|
|
[ -f ${TEST_RESULT} ] && sh ${TEST_RESULT}
|
1999-03-25 16:51:27 -05:00
|
|
|
.endif
|
1998-12-03 19:24:31 -05:00
|
|
|
|
1999-02-26 11:18:43 -05:00
|
|
|
PLIST=${WRKBUILD}/PLIST
|
1998-12-03 19:24:31 -05:00
|
|
|
|
|
|
|
M4FLAGS=-Uinclude -DDISTNAME=${DISTNAME}
|
|
|
|
.if defined(MAKE_GXX)
|
|
|
|
M4FLAGS+= -DGXX
|
1998-10-02 14:51:24 -04:00
|
|
|
.endif
|
1998-12-03 19:24:31 -05:00
|
|
|
.if defined(MAKE_FORTRAN)
|
|
|
|
M4FLAGS+= -DFORTRAN
|
|
|
|
.endif
|
|
|
|
.if defined(MAKE_CHILL)
|
|
|
|
M4FLAGS+= -DCHILL
|
|
|
|
.endif
|
|
|
|
.if defined(MAKE_OBJC)
|
|
|
|
M4FLAGS+= -DOBJC
|
|
|
|
.endif
|
|
|
|
.if defined(MAKE_JAVA)
|
|
|
|
M4FLAGS+= -DJAVA
|
|
|
|
.endif
|
|
|
|
|
1999-08-22 11:50:38 -04:00
|
|
|
GCC_NAME=${WRKBUILD}/gcc/xgcc
|
1998-10-02 14:51:24 -04:00
|
|
|
pre-install:
|
1999-08-22 11:50:38 -04:00
|
|
|
${M4} ${M4FLAGS} -DARCH=`${GCC_NAME} -dumpmachine` \
|
|
|
|
-DVERSION=`${GCC_NAME} -dumpversion` \
|
1998-12-03 19:24:31 -05:00
|
|
|
<${FILESDIR}/PLIST.template >${PLIST}
|
|
|
|
|
1998-09-26 04:53:03 -04:00
|
|
|
.include <bsd.port.mk>
|
1999-03-01 23:41:00 -05:00
|
|
|
|
|
|
|
.if !defined(NO_SHARED_LIBS)
|
|
|
|
M4FLAGS+= -DDYNAMIC
|
|
|
|
.endif
|