From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Feb 22 23:50:07 2012 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE754106564A for ; Wed, 22 Feb 2012 23:50:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 97C9F8FC0C for ; Wed, 22 Feb 2012 23:50:07 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q1MNo7fS040190 for ; Wed, 22 Feb 2012 23:50:07 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q1MNo79t040189; Wed, 22 Feb 2012 23:50:07 GMT (envelope-from gnats) Resent-Date: Wed, 22 Feb 2012 23:50:07 GMT Resent-Message-Id: <201202222350.q1MNo79t040189@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Brooks Davis Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 381631065672 for ; Wed, 22 Feb 2012 23:42:54 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (lor.one-eyed-alien.net [69.66.77.232]) by mx1.freebsd.org (Postfix) with ESMTP id 8E27B8FC14 for ; Wed, 22 Feb 2012 23:42:52 +0000 (UTC) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.4/8.14.4) with ESMTP id q1MND0xB074699 for ; Wed, 22 Feb 2012 17:13:00 -0600 (CST) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.4/8.14.4/Submit) id q1MND0H0074698; Wed, 22 Feb 2012 17:13:00 -0600 (CST) (envelope-from brooks) Message-Id: <201202222313.q1MND0H0074698@lor.one-eyed-alien.net> Date: Wed, 22 Feb 2012 17:13:00 -0600 (CST) From: Brooks Davis To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/165406: [PATCH] devel/binutils: enable gold and sysroot support X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Brooks Davis List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Feb 2012 23:50:07 -0000 >Number: 165406 >Category: ports >Synopsis: [PATCH] devel/binutils: enable gold and sysroot support >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Feb 22 23:50:07 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Brooks Davis >Release: FreeBSD 8.2-RELEASE amd64 >Organization: >Environment: System: FreeBSD lor.one-eyed-alien.net 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Thu Feb 17 02:41:51 UTC 2011 root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 >Description: Enable building of the gold linker on FreeBSD versions where gcc has been patched to not crash when building it. This is needed to do experiments on LTO using LLVM's gold plugin. Enable --sysroot support by configuring with "--with-sysroot=/". This is useful for some patches I'm working on to simplify builds using an external toolchain. >How-To-Repeat: >Fix: Index: Makefile =================================================================== RCS file: /home/pcvs/ports/devel/binutils/Makefile,v retrieving revision 1.17 diff -u -r1.17 Makefile --- Makefile 2 Dec 2011 14:17:05 -0000 1.17 +++ Makefile 22 Feb 2012 23:05:19 -0000 @@ -7,6 +7,7 @@ PORTNAME= binutils PORTVERSION= 2.22 +PORTREVISION= 1 CATEGORIES= devel MASTER_SITES= ${MASTER_SITE_SOURCEWARE} MASTER_SITE_SUBDIR= binutils/releases @@ -14,9 +15,14 @@ MAINTAINER= mm@FreeBSD.org COMMENT= GNU binary tools -USE_BZIP2= yes -USE_GMAKE= yes -GNU_CONFIGURE= yes +LICENSE= GPLv3 LGPL3 +LICENSE_COMB= multi + +# the blank line above and this comment should not exit, but portaudit +# does not know that LICENSE_FILE_* variables should be in the LICENSE +# section and fails. +LICENSE_FILE_GPLv3= ${WRKSRC}/COPYING3 +LICENSE_FILE_LGPL3= ${WRKSRC}/COPYING3.LIB BUILD_DEPENDS= ${LOCALBASE}/lib/libgmp.so:${PORTSDIR}/math/gmp \ ${LOCALBASE}/lib/libmpfr.so:${PORTSDIR}/math/mpfr @@ -25,14 +31,15 @@ OPTIONS= NLS "Enable National Language Support" off -LICENSE= GPLv3 LGPL3 -LICENSE_COMB= multi -LICENSE_FILE_GPLv3= ${WRKSRC}/COPYING3 -LICENSE_FILE_LGPL3= ${WRKSRC}/COPYING3.LIB +USE_BISON= build +USE_BZIP2= yes +USE_GMAKE= yes +GNU_CONFIGURE= yes CFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib CONFIGURE_ARGS+= --with-system-zlib \ + --with-sysroot=/ \ --disable-werror \ --with-gmp=${LOCALBASE} \ --with-mpfr=${LOCALBASE} @@ -75,11 +82,21 @@ PLIST_SUB+= NLS="@comment " .endif +# Actual earliest version may differ slightly +.if ${OSVERSION} >= 900044 +CONFIGURE_ARGS+= --enable-gold --enable-plugins +PLIST_FILES+= bin/ld.gold \ + include/plugin-api.h +.endif + .if ${ARCH} == "amd64" ARCH= x86_64 .endif post-install: +.if ${OSVERSION} >= 900044 + ${INSTALL_DATA} ${WRKSRC}/include/plugin-api.h ${PREFIX}/include/ +.endif @${FIND} -ds ${PREFIX}/${CONFIGURE_TARGET} ! -type d | \ ${SED} -e 's,^${PREFIX}/,,' >> ${TMPPLIST} @${FIND} -ds ${PREFIX}/${CONFIGURE_TARGET} -type d | \ Index: files/patch-bfd_Makefile.in =================================================================== RCS file: files/patch-bfd_Makefile.in diff -N files/patch-bfd_Makefile.in --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-bfd_Makefile.in 22 Feb 2012 23:05:19 -0000 @@ -0,0 +1,13 @@ + +$FreeBSD$ + +--- bfd/Makefile.in.orig ++++ bfd/Makefile.in +@@ -336,7 +336,6 @@ + @INSTALL_LIBBFD_FALSE@noinst_LTLIBRARIES = libbfd.la + AM_CFLAGS = $(WARN_CFLAGS) + AM_CPPFLAGS = -DBINDIR='"$(bindir)"' +-@PLUGINS_TRUE@LIBDL = -ldl + + # bfd.h goes here, for now + BFD_H = bfd.h Index: files/patch-gold_Makefile.in =================================================================== RCS file: files/patch-gold_Makefile.in diff -N files/patch-gold_Makefile.in --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-gold_Makefile.in 22 Feb 2012 23:05:19 -0000 @@ -0,0 +1,13 @@ + +$FreeBSD$ + +--- gold/Makefile.in.orig ++++ gold/Makefile.in +@@ -368,7 +368,6 @@ + @INCINTL@ + + LIBIBERTY = ../libiberty/libiberty.a +-@PLUGINS_TRUE@LIBDL = -ldl + @THREADS_TRUE@THREADSLIB = -lpthread + AM_YFLAGS = -d + >Release-Note: >Audit-Trail: >Unformatted: