pkgsrc/lang/gcc3/Makefile

139 lines
3.8 KiB
Makefile
Raw Normal View History

2003-08-09 12:59:08 +02:00
# $NetBSD: Makefile,v 1.44 2003/08/09 10:59:11 seb Exp $
#
Updated gcc3 to 3.3. Tested on NetBSD-current and Solaris 9. Caveats * The preprocessor no longer accepts multi-line string literals. They were deprecated in 3.0, 3.1, and 3.2. * The preprocessor no longer supports the -A- switch when appearing alone. -A- followed by an assertion is still supported. * Support for all the systems obsoleted in GCC 3.1 has been removed from GCC 3.3. * Checking for null format arguments has been decoupled from the rest of the format checking mechanism. Programs which use the format attribute may regain this functionality by using the new nonnull function attribute. Note that all functions for which GCC has a built-in format attribute, an appropriate built-in nonnull attribute is also applied. * The DWARF (version 1) debugging format has been deprecated and will be removed in a future version of GCC. Version 2 of the DWARF debugging format will continue to be supported for the foreseeable future. * The C and Objective-C compilers no longer accept the "Naming Types" extension (typedef foo = bar); it was already unavailable in C++. Code which uses it will need to be changed to use the "typeof" extension instead: typedef typeof(bar) foo. (We have removed this extension without a period of deprecation because it has caused the compiler to crash since version 3.0 and no one noticed until very recently. Thus we conclude it is not in widespread use.) * The -traditional C compiler option has been removed. It was deprecated in 3.1 and 3.2. (Traditional preprocessing remains available.) The <varargs.h> header, used for writing variadic functions in traditional C, still exists but will produce an error message if used. New Targets and Target Specific Improvements [trimmed for length and relevance to NetBSD] * The SPARC, HP-PA, SH4, and x86/pentium ports have been converted to use the DFA processor pipeline description. * The following NetBSD configurations for the SuperH processor family have been added: o SH3, big-endian, sh-*-netbsdelf* o SH3, little-endian, shle-*-netbsdelf* o SH5, SHmedia, big-endian, 32-bit default, sh5-*-netbsd* o SH5, SHmedia, little-endian, 32-bit default, sh5le-*-netbsd* o SH5, SHmedia, big-endian, 64-bit default, sh64-*-netbsd* o SH5, SHmedia, little-endian, 64-bit default, sh64le-*-netbsd* * The following changes have been made to the IA-32/x86-64 port: o SSE2 and 3dNOW! intrinsics are now supported. o Support for thread local storage has been added to the IA-32 and x86-64 ports. o The x86-64 port has been significantly improved. The full list of changes can be found at: http://gcc.gnu.org/gcc-3.3/changes.html
2003-05-25 18:29:20 +02:00
DISTNAME= gcc-3.3
PKGREVISION= 5
2003-05-25 11:26:40 +02:00
PKGNAME= ${DISTNAME:C|gcc|gcc3|}
CATEGORIES= lang
MASTER_SITES= ${MASTER_SITE_GNU:=gcc/gcc-3.3/}
EXTRACT_SUFX= .tar.bz2
2003-07-17 23:41:05 +02:00
MAINTAINER= tech-pkg@NetBSD.org
HOMEPAGE= http://www.gnu.org/software/gcc/gcc.html
COMMENT= GNU Compiler Collection, version 3
CONFLICTS+= gcc-3* pgcc-[0-9]*
NOT_FOR_PLATFORM= Darwin-*-*
USE_BUILDLINK2= YES
USE_PKGINSTALL= YES
USE_GMAKE= YES
HAS_CONFIGURE= YES
CONFIGURE_ARGS+= --prefix=${GCC_PREFIX}
UNLIMIT_RESOURCES= datasize
FILES_SUBST+= DISTNAME=${DISTNAME} GCC_PREFIX=${GCC_PREFIX}
MESSAGE_SUBST+= DISTNAME=${DISTNAME}
PLIST_SUBST+= DISTNAME=${DISTNAME}
Updated gcc3 to 3.3. Tested on NetBSD-current and Solaris 9. Caveats * The preprocessor no longer accepts multi-line string literals. They were deprecated in 3.0, 3.1, and 3.2. * The preprocessor no longer supports the -A- switch when appearing alone. -A- followed by an assertion is still supported. * Support for all the systems obsoleted in GCC 3.1 has been removed from GCC 3.3. * Checking for null format arguments has been decoupled from the rest of the format checking mechanism. Programs which use the format attribute may regain this functionality by using the new nonnull function attribute. Note that all functions for which GCC has a built-in format attribute, an appropriate built-in nonnull attribute is also applied. * The DWARF (version 1) debugging format has been deprecated and will be removed in a future version of GCC. Version 2 of the DWARF debugging format will continue to be supported for the foreseeable future. * The C and Objective-C compilers no longer accept the "Naming Types" extension (typedef foo = bar); it was already unavailable in C++. Code which uses it will need to be changed to use the "typeof" extension instead: typedef typeof(bar) foo. (We have removed this extension without a period of deprecation because it has caused the compiler to crash since version 3.0 and no one noticed until very recently. Thus we conclude it is not in widespread use.) * The -traditional C compiler option has been removed. It was deprecated in 3.1 and 3.2. (Traditional preprocessing remains available.) The <varargs.h> header, used for writing variadic functions in traditional C, still exists but will produce an error message if used. New Targets and Target Specific Improvements [trimmed for length and relevance to NetBSD] * The SPARC, HP-PA, SH4, and x86/pentium ports have been converted to use the DFA processor pipeline description. * The following NetBSD configurations for the SuperH processor family have been added: o SH3, big-endian, sh-*-netbsdelf* o SH3, little-endian, shle-*-netbsdelf* o SH5, SHmedia, big-endian, 32-bit default, sh5-*-netbsd* o SH5, SHmedia, little-endian, 32-bit default, sh5le-*-netbsd* o SH5, SHmedia, big-endian, 64-bit default, sh64-*-netbsd* o SH5, SHmedia, little-endian, 64-bit default, sh64le-*-netbsd* * The following changes have been made to the IA-32/x86-64 port: o SSE2 and 3dNOW! intrinsics are now supported. o Support for thread local storage has been added to the IA-32 and x86-64 ports. o The x86-64 port has been significantly improved. The full list of changes can be found at: http://gcc.gnu.org/gcc-3.3/changes.html
2003-05-25 18:29:20 +02:00
TEXINFO_REQD= 4.2
2003-07-03 20:19:18 +02:00
.include "../../mk/bsd.prefs.mk"
2003-07-28 23:49:15 +02:00
BUILD_DEFS+= PKG_GCC3_JAVA
INFO_DIR= ${GCC_PREFIX:S|^${PREFIX}/||}/info
INFO_FILES= cpp.info g77.info gcc.info gccint.info cppinternals.info
2003-07-03 18:16:30 +02:00
.if defined(PKG_GCC3_JAVA)
INFO_FILES+= fastjar.info gcj.info
.endif
.if ${OPSYS} == "NetBSD" && exists(/usr/include/pthread.h)
CONFIGURE_ARGS+= --host=${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
CONFIGURE_ARGS+= --host=${MACHINE_GNU_PLATFORM}
.endif
# java takes hours to build, so make it optional
.if !defined(PKG_GCC3_JAVA)
CONFIGURE_ARGS+= --enable-languages="c,c++,f77,objc,ada"
.endif
.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
2003-04-13 12:51:19 +02:00
.if ${OPSYS} == "NetBSD" || ${OPSYS} == "Linux"
CONFIGURE_ARGS+= --enable-shared
.else
2003-04-13 12:51:19 +02:00
. if ${OPSYS} == "SunOS"
CONFIGURE_ARGS+= --enable-shared
. else
CONFIGURE_ARGS+= --disable-shared
. endif
2003-01-11 05:31:53 +01:00
. if ${CC:M*gcc*} == ""
ALL_TARGET= bootstrap
. endif
.endif
GCC_PREFIX= ${PREFIX}/${DISTNAME}
GCC_VERSION= ${PKGVERSION:C|nb.*||}
GCC_ARCHDIR= ${GCC_PREFIX}/lib/gcc-lib/${MACHINE_GNU_PLATFORM}/${GCC_VERSION}
PLIST_SRC= ${WRKDIR}/PLIST_DYNAMIC
pre-configure:
${MKDIR} ${BUILD_DIRS}
cd ${WRKSRC} && contrib/gcc_update --touch
post-build:
@${SED} ${FILES_SUBST_SED} ${FILESDIR}/gcc3.mk > ${WRKDIR}/gcc3.mk
post-install:
.if ${OPSYS} == "SunOS"
-cd ${GCC_ARCHDIR}/include && ${RM} -f fixed && ${RMDIR} v7 v9
.endif
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/${DISTNAME}
${INSTALL_DATA} ${WRKDIR}/gcc3.mk ${PREFIX}/share/examples/${DISTNAME}/mk.conf
${LN} -f ${GCC_PREFIX}/bin/gcc ${GCC_PREFIX}/bin/cc
# ${LN} -f ${GCC_PREFIX}/bin/g77 ${GCC_PREFIX}/bin/f77
${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}
.include "../../mk/bsd.pkg.mk"
# Make bootstrap with compiler != gcc possible.
CONFIGURE_ENV+= LDFLAGS="${_STRIPFLAG_CC}"
MAKE_ENV+= GCC_PREFIX="${GCC_PREFIX}"
# On NetBSD, the gcc-2.95.3 for:
#
# alpha
#
# have an optimization bug when compiling with -O2 that is tickled by:
#
# java/parse.o
#
# note that we don't override CFLAGS and CPPFLAGS because we want the
# crosscompiled compiler to be build with optimization. This only
# disables optimization for the stage 1 build.
#
.if ${OPSYS} == "NetBSD"
2003-04-13 12:51:19 +02:00
. if ${MACHINE_ARCH} == "alpha"
CONFIG_CFLAGS= ${CFLAGS:C/-O[0-9]*//g}
CONFIG_CPPFLAGS= ${CPPFLAGS:C/-O[0-9]*//g}
CONFIGURE_ENV+= CFLAGS="${CONFIG_CFLAGS}" CPPFLAGS="${CONFIG_CPPFLAGS}"
. endif
.endif