aboutsummaryrefslogtreecommitdiffstats
path: root/lang/gcc45
diff options
context:
space:
mode:
authorgerald <gerald@FreeBSD.org>2010-05-03 14:54:10 +0800
committergerald <gerald@FreeBSD.org>2010-05-03 14:54:10 +0800
commit9f5bcd91a54857e2a4926daea9168527a33028da (patch)
tree969673665ede0a34ffbffb0cdebe9345fc02ee6d /lang/gcc45
parent883e13c0ad0389197ba977b18d3331246fa674fb (diff)
downloadfreebsd-ports-gnome-9f5bcd91a54857e2a4926daea9168527a33028da.tar.gz
freebsd-ports-gnome-9f5bcd91a54857e2a4926daea9168527a33028da.tar.zst
freebsd-ports-gnome-9f5bcd91a54857e2a4926daea9168527a33028da.zip
Add a new option LTO that enables the new link-time optimization framework
and first optimizations that GCC 4.5 brings. This adds libelf as a new dependency (if used) and is off by default; we may be enabling it at a later point, though. Bumping PORTREVISION since someone who has installed libelf, previously to this change would get LTO enabled automatically and then run into problems if libelf is removed -- which is possible, since this port does not lay down a dependency on that case. PR: 146055 Submitted by: mm
Diffstat (limited to 'lang/gcc45')
-rw-r--r--lang/gcc45/Makefile11
1 files changed, 11 insertions, 0 deletions
diff --git a/lang/gcc45/Makefile b/lang/gcc45/Makefile
index 452cc7208adf..087a6d934ecb 100644
--- a/lang/gcc45/Makefile
+++ b/lang/gcc45/Makefile
@@ -8,6 +8,7 @@
PORTNAME= gcc
PORTVERSION= 4.5.1.20100429
+PORTREVISION= 1
CATEGORIES= lang java
MASTER_SITES= ${MASTER_SITE_GCC}
MASTER_SITE_SUBDIR= snapshots/${VERSIONSTRING}
@@ -43,8 +44,18 @@ MAKE_JOBS_SAFE= yes
PATCH_WRKSRC= ${SRCDIR}
CONFIGURE_SCRIPT= ../${SRCDIR:S/${WRKDIR}\///}/configure
+OPTIONS= LTO "Enable link-time optimizations (LTO)" off
+
.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