aboutsummaryrefslogtreecommitdiff
path: root/devel/binutils
diff options
context:
space:
mode:
authorMartin Matuska <mm@FreeBSD.org>2012-02-23 12:43:57 +0000
committerMartin Matuska <mm@FreeBSD.org>2012-02-23 12:43:57 +0000
commit022de42f804f8afe303dd63e71f07372ea49b974 (patch)
treeb6c55540afb06aec63cee918e6b7ebcb63d994b0 /devel/binutils
parent268105e966204b59afe1c0d199487a2a1df0144e (diff)
downloadports-022de42f804f8afe303dd63e71f07372ea49b974.tar.gz
ports-022de42f804f8afe303dd63e71f07372ea49b974.zip
Notes
Diffstat (limited to 'devel/binutils')
-rw-r--r--devel/binutils/Makefile25
-rw-r--r--devel/binutils/files/patch-bfd_Makefile.in13
-rw-r--r--devel/binutils/files/patch-gold_Makefile.in12
-rw-r--r--devel/binutils/pkg-plist2
4 files changed, 47 insertions, 5 deletions
diff --git a/devel/binutils/Makefile b/devel/binutils/Makefile
index 3dfd7b185437..9c40d01c387a 100644
--- a/devel/binutils/Makefile
+++ b/devel/binutils/Makefile
@@ -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,8 @@ MASTER_SITE_SUBDIR= binutils/releases
MAINTAINER= mm@FreeBSD.org
COMMENT= GNU binary tools
-USE_BZIP2= yes
-USE_GMAKE= yes
-GNU_CONFIGURE= yes
+LICENSE= GPLv3 LGPL3
+LICENSE_COMB= multi
BUILD_DEPENDS= ${LOCALBASE}/lib/libgmp.so:${PORTSDIR}/math/gmp \
${LOCALBASE}/lib/libmpfr.so:${PORTSDIR}/math/mpfr
@@ -25,14 +25,18 @@ CONFLICTS= libbfd-[0-9]*
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}
@@ -67,6 +71,14 @@ INFO= as \
.include <bsd.port.pre.mk>
+# Actual earliest version may differ slightly
+.if ${OSVERSION} >= 900044
+CONFIGURE_ARGS+= --enable-gold --enable-plugins
+PLIST_SUB+= GOLD=""
+.else
+PLIST_SUB+= GOLD="@comment "
+.endif
+
.if defined(WITH_NLS)
USE_GETTEXT= yes
PLIST_SUB+= NLS=""
@@ -80,6 +92,9 @@ 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 | \
diff --git a/devel/binutils/files/patch-bfd_Makefile.in b/devel/binutils/files/patch-bfd_Makefile.in
new file mode 100644
index 000000000000..6ec8b591b518
--- /dev/null
+++ b/devel/binutils/files/patch-bfd_Makefile.in
@@ -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
diff --git a/devel/binutils/files/patch-gold_Makefile.in b/devel/binutils/files/patch-gold_Makefile.in
new file mode 100644
index 000000000000..366df77a2396
--- /dev/null
+++ b/devel/binutils/files/patch-gold_Makefile.in
@@ -0,0 +1,12 @@
+
+$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
diff --git a/devel/binutils/pkg-plist b/devel/binutils/pkg-plist
index cdc1ee4553f8..b679b43886b8 100644
--- a/devel/binutils/pkg-plist
+++ b/devel/binutils/pkg-plist
@@ -6,6 +6,7 @@ bin/elfedit
bin/gprof
bin/ld
bin/ld.bfd
+%%GOLD%%bin/ld.gold
bin/nm
bin/objcopy
bin/objdump
@@ -18,6 +19,7 @@ include/ansidecl.h
include/bfd.h
include/bfdlink.h
include/dis-asm.h
+%%GOLD%%include/plugin-api.h
include/symcat.h
lib/libbfd.a
lib/libbfd.la