From 7c4a6df8e8e5e6cf26efb7ed99c30c0df83404b9 Mon Sep 17 00:00:00 2001 From: Gerald Pfeifer 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/gcc/Makefile | 12 +++++++++++- lang/gcc46/Makefile | 12 +++++++++++- lang/gcc47/Makefile | 12 +++++++++++- lang/gcc48/Makefile | 12 +++++++++++- 4 files changed, 44 insertions(+), 4 deletions(-) (limited to 'lang') diff --git a/lang/gcc/Makefile b/lang/gcc/Makefile index 7b994be45d01..5835679bf893 100644 --- a/lang/gcc/Makefile +++ b/lang/gcc/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 diff --git a/lang/gcc46/Makefile b/lang/gcc46/Makefile index 7b994be45d01..5835679bf893 100644 --- a/lang/gcc46/Makefile +++ b/lang/gcc46/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 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 diff --git a/lang/gcc48/Makefile b/lang/gcc48/Makefile index 7b994be45d01..5835679bf893 100644 --- a/lang/gcc48/Makefile +++ b/lang/gcc48/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 v1.2.3