aboutsummaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorGerald Pfeifer <gerald@FreeBSD.org>2010-05-03 06:54:10 +0000
committerGerald Pfeifer <gerald@FreeBSD.org>2010-05-03 06:54:10 +0000
commitc0fd37448dddb65ea36b45f439dff1247a86f3f1 (patch)
tree03432cbabd02bd21c59e25dfac5d2d04ff245953 /lang
parent04e5f714fd810ef083eba6a98394a3c76c7b3c88 (diff)
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
Notes
Notes: svn path=/head/; revision=253600
Diffstat (limited to 'lang')
-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