diff options
author | gerald <gerald@FreeBSD.org> | 2010-09-05 07:57:26 +0800 |
---|---|---|
committer | gerald <gerald@FreeBSD.org> | 2010-09-05 07:57:26 +0800 |
commit | 8a7138991ecab818801b924ea16d11973cf68395 (patch) | |
tree | b1749e43465374f69b952d03d1050343ad072d3c /lang/gcc47 | |
parent | b6e2d59a266f7dc71ac3817ff157710f20f1f6ee (diff) | |
download | freebsd-ports-gnome-8a7138991ecab818801b924ea16d11973cf68395.tar.gz freebsd-ports-gnome-8a7138991ecab818801b924ea16d11973cf68395.tar.zst freebsd-ports-gnome-8a7138991ecab818801b924ea16d11973cf68395.zip |
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.
Diffstat (limited to 'lang/gcc47')
-rw-r--r-- | lang/gcc47/Makefile | 12 |
1 files changed, 11 insertions, 1 deletions
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 <bsd.port.pre.mk> +.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 |