From 8a7138991ecab818801b924ea16d11973cf68395 Mon Sep 17 00:00:00 2001 From: gerald Date: Sat, 4 Sep 2010 23:57:26 +0000 Subject: Similar to lang/gcc45, add a new option LTO that enables GCC's new link-time optimization framework and optimizations. GCC 4.6 has been seeing a lot of work since GCC 4.5, but we are still keeping this disable by default for now Using LTO adds libelf as a new dependency and in either case the environment does not have an influence any more. Bumping PORTREVISION since someone who had libelf on his system previously to this change would get LTO enabled automatically and then run into problems if libelf was removed. --- lang/gcc47/Makefile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'lang/gcc47') diff --git a/lang/gcc47/Makefile b/lang/gcc47/Makefile index 7b994be45d01..5835679bf893 100644 --- a/lang/gcc47/Makefile +++ b/lang/gcc47/Makefile @@ -8,6 +8,7 @@ PORTNAME= gcc PORTVERSION= 4.6.0.20100828 +PORTREVISION= 1 CATEGORIES= lang java MASTER_SITES= ${MASTER_SITE_GCC} MASTER_SITE_SUBDIR= snapshots/${VERSIONSTRING} @@ -43,10 +44,19 @@ MAKE_JOBS_SAFE= yes PATCH_WRKSRC= ${SRCDIR} CONFIGURE_SCRIPT= ../${SRCDIR:S/${WRKDIR}\///}/configure -OPTIONS= JAVA "Enable the Java frontend (i386 and amd64 only)" on +OPTIONS= LTO "Enable link-time optimizations (LTO)" off \ + JAVA "Enable the Java frontend (i386 and amd64 only)" on .include +.if defined(WITH_LTO) +LIB_DEPENDS+= elf.0:${PORTSDIR}/devel/libelf +CONFIGURE_ARGS+= --enable-lto=yes \ + --with-libelf=${LOCALBASE} +.else +CONFIGURE_ARGS+= --enable-lto=no +.endif + .if ${ARCH} != i386 && ${ARCH} != amd64 WITHOUT_JAVA= yes .endif -- cgit