Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Apr 2010 09:45:01 +0200 (CEST)
From:      Martin Matuska <mm@FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        gerald@FreeBSD.org
Subject:   ports/146055: [PATCH] lang/gcc45: add optional support for LTO
Message-ID:  <20100426074501.78D0A39E0D@mail2.vx.sk>
Resent-Message-ID: <201004260750.o3Q7o2Ww027179@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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@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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100426074501.78D0A39E0D>