ports/146055: [PATCH] lang/gcc45: add optional support for LTO

Martin Matuska mm at FreeBSD.org
Mon Apr 26 07:50:02 UTC 2010


>Number:         146055
>Category:       ports
>Synopsis:       [PATCH] lang/gcc45: add optional support for LTO
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Apr 26 07:50:01 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Martin Matuska
>Release:        FreeBSD 8.0-STABLE amd64
>Organization:
>Environment:
System: FreeBSD neo.vx.sk 8.0-STABLE FreeBSD 8.0-STABLE #1 r206844M: Mon Apr 19 18:29:50 CEST
>Description:
- Add support for link time optimization (needs devel/libelf)
- Disable link time optimization if not wanted (and devel/libelf installed)
- Maintainer's decision to make this on or off by default

Port maintainer (gerald at FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.99
>How-To-Repeat:
>Fix:

--- gcc-4.5.1.20100422_1.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/lang/gcc45/Makefile,v
retrieving revision 1.434
diff -u -r1.434 Makefile
--- Makefile	24 Apr 2010 20:30:12 -0000	1.434
+++ Makefile	26 Apr 2010 07:41:15 -0000
@@ -8,6 +8,7 @@
 
 PORTNAME=	gcc
 PORTVERSION=	4.5.1.20100422
+PORTREVISION=	1
 CATEGORIES=	lang java
 MASTER_SITES=	${MASTER_SITE_GCC}
 MASTER_SITE_SUBDIR=	snapshots/${VERSIONSTRING}
@@ -43,8 +44,18 @@
 PATCH_WRKSRC=	${SRCDIR}
 CONFIGURE_SCRIPT=	../${SRCDIR:S/${WRKDIR}\///}/configure
 
+OPTIONS=	LTO	"Enable link-time optimizations"	off
+
 .include <bsd.port.pre.mk>
 
+.if defined(WITH_LTO)
+LIB_DEPENDS+=	elf.0:${PORTSDIR}/devel/libelf
+CONFIGURE_ARGS+=	--with-libelf=${LOCALBASE} \
+			--enable-lto=yes
+.else
+CONFIGURE_ARGS+=	--enable-lto=no
+.endif
+
 .if ${ARCH} != i386 && ${ARCH} != amd64
 WITHOUT_JAVA=	yes
 .endif
--- gcc-4.5.1.20100422_1.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list