Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Nov 2019 08:47:24 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r517034 - head/base/binutils
Message-ID:  <201911080847.xA88lOb2098594@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bapt
Date: Fri Nov  8 08:47:24 2019
New Revision: 517034
URL: https://svnweb.freebsd.org/changeset/ports/517034

Log:
  Update binutils to 2.33.1
  
  While here, make the port autonomuous (not a slave port of devel/binutils
  anymore)
  The only dependency this port is keeping with devel/binutils is sharing the
  patch directory to avoid duplication.

Added:
  head/base/binutils/distinfo   (contents, props changed)
  head/base/binutils/pkg-descr
     - copied, changed from r516782, head/devel/binutils/pkg-descr
Modified:
  head/base/binutils/Makefile

Modified: head/base/binutils/Makefile
==============================================================================
--- head/base/binutils/Makefile	Fri Nov  8 08:13:41 2019	(r517033)
+++ head/base/binutils/Makefile	Fri Nov  8 08:47:24 2019	(r517034)
@@ -1,20 +1,47 @@
 # $FreeBSD$
 
+PORTNAME=	binutils
+PORTVERSION=	2.33.1
 PORTEPOCH=	0
 CATEGORIES=	base
+MASTER_SITES=	SOURCEWARE/binutils/releases
 PKGNAMEPREFIX=	${OPSYS:tl}-
 VALID_CATEGORIES=	base
 
 COMMENT=	GNU binary tools for base
 
-MASTERDIR=	${.CURDIR}/../../devel/binutils
-PLIST=		${.CURDIR}/pkg-plist
+LICENSE=	GPLv3 LGPL3
+LICENSE_COMB=	multi
 
+LICENSE_FILE_GPLv3=	${WRKSRC}/COPYING3
+LICENSE_FILE_LGPL3=	${WRKSRC}/COPYING3.LIB
+
 TARGETARCH=	${ARCH:S/amd64/x86_64/}
 BUTARGET=	${TARGETARCH}-unknown-${OPSYS:tl}${OSREL}
 
-CONFIGURE_ARGS+=	--disable-host-shared
+USES=		bison:alias cpe gmake libtool tar:bzip2 compiler:env
+CPE_VENDOR=	gnu
+GNU_CONFIGURE=	yes
+INFO_PATH=	${PKGNAMEPREFIX:S/-$//}/share/info
+
+BUTARGET?=	${PKGNAMEPREFIX}unknown-${OPSYS:tl}${OSREL}
+PLIST_SUB=	BUTARGET=${BUTARGET}
+
+TEST_TARGET=	check
+
+PATCHDIR=	${.CURDIR}/../../devel/binutils/files
+
+CONFIGURE_ARGS+=	--disable-host-shared \
+			--disable-shared \
+			--disable-nls \
+			--with-system-zlib \
+			--enable-relro=no \
+			--enable-x86-relax-relocations=no \
+			--target=${BUTARGET}
 PREFIX=	/usr
+MAKE_ENV+=	ac_cv_func_sbrk=0
+MAKE_ARGS+=	LIBDL=""
+
 BUREMOVE=	addr2line \
 		ar \
 		c++filt \
@@ -31,11 +58,19 @@ BUREMOVE=	addr2line \
 		windmc \
 		windres
 
-.include "${MASTERDIR}/Makefile"
-
 PLIST_SUB+=	OBJCOPY="@comment "
 BUREMOVE+=	objcopy
 
+OPTIONS_DEFINE=	RELRO STATIC 
+RELRO_DESC=	enable -z relro in ELF linker by default
+
+RELRO_CONFIGURE_ON=	--enable-relro
+RELRO_CONFIGURE_OFF=	--enable-relro=no
+
+STATIC_LDFLAGS+=	-all-static
+
+.include <bsd.port.pre.mk>
+
 .if ${ARCH} == "amd64" || ${ARCH} == "i386"
 PLIST_SUB+=	I386=""
 .else
@@ -61,3 +96,39 @@ PLIST_SUB+=	SPARC=""
 .else
 PLIST_SUB+=	SPARC="@comment "
 .endif
+
+.if ${ARCH} == "amd64"
+CONFIGURE_TARGET=	x86_64-portbld-freebsd${OSREL}
+.elif ${ARCH} == "powerpcspe"
+CONFIGURE_TARGET=	powerpc-portbld-freebsd${OSREL}
+.else
+CONFIGURE_TARGET=	${ARCH}-portbld-freebsd${OSREL}
+.endif
+
+post-patch:
+	${REINPLACE_CMD} -e "s/-ldl//g" ${WRKSRC}/gold/testsuite/Makefile.in
+
+post-install:
+	${RM} -r ${STAGEDIR}${PREFIX}/${PKGNAMEPREFIX:S/-$//}
+	${RM} ${STAGEDIR}${PREFIX}/${BUTARGET}/lib/ldscripts/i386bsd.*
+	@if [ -d ${STAGEDIR}${PREFIX}/${INFO_PATH:H} ] ; then rm -rf ${STAGEDIR}${PREFIX}/${INFO_PATH:H}; fi
+	${LN} -fs /usr/bin/${BUTARGET}-as ${STAGEDIR}/usr/bin/as
+	${LN} -fs /usr/bin/${BUTARGET}-ld ${STAGEDIR}/usr/bin/ld
+	${LN} -fs /usr/bin/${BUTARGET}-ld.bfd ${STAGEDIR}/usr/bin/ld.bfd
+	${LN} -fs /usr/bin/${BUTARGET}-objcopy ${STAGEDIR}/usr/bin/objcopy
+	${LN} -fs /usr/bin/${BUTARGET}-objdump ${STAGEDIR}/usr/bin/objdump
+	${LN} -fs ${BUTARGET}-as.1.gz ${STAGEDIR}/${MANDIR}1/as.1.gz
+	${LN} -fs ${BUTARGET}-ld.1.gz ${STAGEDIR}/${MANDIR}1/ld.1.gz
+	${LN} -fs ${BUTARGET}-objcopy.1.gz ${STAGEDIR}/${MANDIR}1/objcopy.1.gz
+	${LN} -fs ${BUTARGET}-objdump.1.gz ${STAGEDIR}/${MANDIR}1/objdump.1.gz
+	@${RM} -r ${STAGEDIR}${PREFIX}/include
+	@${RM} -r ${STAGEDIR}${PREFIX}/lib
+.for tool in ${BUREMOVE}
+	@${RM} ${STAGEDIR}${PREFIX}/bin/${BUTARGET}-${tool} \
+	    ${STAGEDIR}${PREFIX}/bin/${tool} \
+	    ${STAGEDIR}${MANPREFIX}/man/man1/${BUTARGET}-${tool}.1 \
+	    ${STAGEDIR}${MANPREFIX}/man/man1/${tool}.1 \
+	    ${STAGEDIR}${PREFIX}/${BUTARGET}/bin/${tool}
+.endfor
+
+.include <bsd.port.post.mk>

Added: head/base/binutils/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/base/binutils/distinfo	Fri Nov  8 08:47:24 2019	(r517034)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1572956692
+SHA256 (binutils-2.33.1.tar.bz2) = 0cb4843da15a65a953907c96bad658283f3c4419d6bcc56bf2789db16306adb2
+SIZE (binutils-2.33.1.tar.bz2) = 32160315

Copied and modified: head/base/binutils/pkg-descr (from r516782, head/devel/binutils/pkg-descr)
==============================================================================
--- head/devel/binutils/pkg-descr	Tue Nov  5 09:05:59 2019	(r516782, copy source)
+++ head/base/binutils/pkg-descr	Fri Nov  8 08:47:24 2019	(r517034)
@@ -12,4 +12,4 @@ features from the latest versions of GCC.
 
 For cross-compilation, see the devel/cross-binutils port.
 
-WWW: http://sources.redhat.com/binutils/
+WWW: https://www.gnu.org/software/binutils/



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