pkgsrc/lang/gcc47/Makefile
sbd 2572492e6f Import gcc-4.7.0 and lang/gcc47
GCC 4.7.0 is a major release, containing substantial new
functionality not available in GCC 4.6.x or previous GCC releases.

GCC 4.7 features support for software transactional memory on
selected architectures.  The C++ compiler supports a bigger
subset of the new ISO C++11 standard such as support for atomics
and the C++11 memory model, non-static data member initializers,
user-defined literals, alias-declarations, delegating constructors,
explicit override and extended friend syntax.  The C compiler adds support
for more features from the new ISO C11 standard.  GCC now supports
version 3.1 of the OpenMP specification for C, C++ and Fortran.

The link-time optimization (LTO) framework has seen improvements
with regards to scalability, stability and resource needs.  Inlining
and interprocedural constant propagation have been improved.

GCC 4.7 now supports various new GNU extensions to the DWARF debugging
information format, like entry value and call site information, a typed
DWARF stack and a more compact macro representation.

Extending the widest support for hardware architectures in the
industry, GCC 4.7 gains support for Adapteva's Epiphany processor,
National Semiconductor's CR16, and TI's C6X as well as Tilera's
TILE-Gx and TILEPro families of processors.  The x86
family support has been extended by the Intel Haswell and AMD Piledriver
architectures.  ARM has gained support for the Cortex-A7 family.

See

  http://gcc.gnu.org/gcc-4.7/changes.html

for more information about changes in GCC 4.7.
2012-04-16 04:27:18 +00:00

119 lines
3.6 KiB
Makefile

# $NetBSD: Makefile,v 1.1.1.1 2012/04/16 04:27:18 sbd Exp $
GCC_PKGNAME= gcc47
.include "version.mk"
DISTNAME= gcc-${GCC_DIST_VERSION}
PKGNAME= ${GCC_PKGNAME}-${GCC_DIST_VERSION}
CATEGORIES= lang
MASTER_SITES= ${MASTER_SITE_GNU:=gcc/gcc-${GCC_DIST_VERSION}/}
EXTRACT_SUFX= .tar.bz2
MAINTAINER= sbd@NetBSD.org
HOMEPAGE= http://gcc.gnu.org/
COMMENT= The GNU Compiler Collection (GCC) - 4.7 Release Series
LICENSE= gnu-gpl-v2 AND gnu-gpl-v3 AND gnu-lgpl-v2 AND gnu-lgpl-v3
DISTFILES= ${DEFAULT_DISTFILES}
EXTRACT_ONLY= ${DEFAULT_DISTFILES}
NOT_FOR_PLATFORM= Interix-*-* DragonFly-*-*
USE_TOOLS+= gmake makeinfo sed:run
PKG_DESTDIR_SUPPORT= user-destdir
GNU_CONFIGURE= yes
## Build outside ${WRKSRC}
OBJDIR= ../build
CONFIGURE_DIRS= ${OBJDIR}
CONFIGURE_SCRIPT= ../${DISTNAME}/configure
GCC_SUBPREFIX= ${GCC_PKGNAME}
GCC_PREFIX= ${PREFIX}/${GCC_SUBPREFIX}
GNU_CONFIGURE_PREFIX= ${GCC_PREFIX}
INFO_FILES= yes
UNLIMIT_RESOURCES+= datasize
UNLIMIT_RESOURCES+= stacksize
.include "../../mk/bsd.prefs.mk"
LANGS= c
## The Library rpath to use in end programs.
LDFLAGS_FOR_TARGET= ${LDFLAGS:M${COMPILER_RPATH_FLAG}*:N*/usr/lib*}
## The "-static-libstdc++ -static-libgcc" flags are normally added to the
## boot-ldflags by configure but because we are supply the boot-ldflags
## we mash supply them.
BOOT_LDFLAGS= -static-libstdc++ -static-libgcc ${LDFLAGS_FOR_TARGET}
## For target librarys and libjava programs.
CONFIGURE_ENV+= LDFLAGS_FOR_TARGET=${LDFLAGS_FOR_TARGET:Q}
CONFIGURE_ARGS+= --enable-languages=${LANGS:Q}
CONFIGURE_ARGS+= --enable-shared
CONFIGURE_ARGS+= --enable-long-long
CONFIGURE_ARGS+= --with-local-prefix=${GCC_PREFIX:Q}
CONFIGURE_ARGS+= --enable-libssp
CONFIGURE_ARGS+= --enable-threads=posix
CONFIGURE_ARGS+= --with-boot-ldflags=${BOOT_LDFLAGS:Q}
.if ${OPSYS} == "NetBSD"
CONFIGURE_ARGS+= --with-gnu-ld --with-ld=/usr/bin/ld
CONFIGURE_ARGS+= --with-gnu-as --with-as=/usr/bin/as
MAKE_ENV+= ac_cv_func_clock_gettime=yes
.endif
.include "options.mk"
# ${WRKSRC}/fixincludes/ looks for sed and compiles the path to sed into
# a binary so we need to make sure we give it the installed sed and not
# the tool wrapped one.
MAKE_ENV+= ac_cv_path_SED=${TOOLS_SED}
MAKE_ENV+= lt_cv_path_SED=${TOOLS_SED}
# Determine whether to use binutils
.if ${OPSYS} == "SunOS"
CONFIGURE_ENV+= OBJDUMP=/usr/sfw/bin/gobjdump
CONFIGURE_ARGS+= --without-gnu-ld --with-ld=/usr/ccs/bin/ld
. if !exists(/usr/sfw/bin/gas)
CONFIGURE_ARGS+= --without-gnu-as --with-as=/usr/ccs/bin/as
. else
CONFIGURE_ARGS+= --with-gnu-as --with-as=/usr/sfw/bin/gas
. endif
.endif
pre-configure:
${RUN} cd ${WRKSRC} && ${MKDIR} ${OBJDIR}
TEST_TARGET= -k check || ${TRUE}
pre-test:
${RUN} \
if runtest --version >/dev/null 2>/dev/null ; then \
: ; \
else \
${ECHO} "ERROR: Please install devel/dejagnu in order to run the test suite." ; \
exit 1 ; \
fi
post-test:
${RUN} cd ${WRKSRC} && cd ${OBJDIR} && \
${SHELL} ${WRKSRC}/contrib/test_summary >${WRKDIR}/test_summary.log
@${INFO_MSG} "Test summary are available in ${WRKDIR}/test_summary.log"
post-install:
${TEST} -f ${DESTDIR}${GCC_PREFIX}/bin/cc || \
( cd ${DESTDIR}${GCC_PREFIX}/bin ; ${LN} -f gcc cc )
.if !empty(PKG_OPTIONS:Mgcc-java)
${RM} -f ${DESTDIR}${JAVA_HOME}/bin/javadoc
${RM} -f ${DESTDIR}${JAVA_HOME}/jre/lib/${JAVA_ARCH}/libjawt.so
.endif
.if !empty(MACHINE_PLATFORM:MSunOS-*-*86*) && ${OS_VERSION} != "5.11"
${SH} files/values.c ${DESTDIR}${GCC_PREFIX}/bin/gcc -m32 || ${TRUE}
${SH} files/values.c ${DESTDIR}${GCC_PREFIX}/bin/gcc -m64 || ${TRUE}
.endif
GENERATE_PLIST+= \
cd ${DESTDIR}${PREFIX} && \
${FIND} ${GCC_SUBPREFIX} \( -type f -o -type l \) -print | ${SORT} ;
.include "../../mk/bsd.pkg.mk"