Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Mar 2016 19:32:23 +0000 (UTC)
From:      Ed Schouten <ed@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r411615 - in head: devel/binutils devel/cloudabi-binutils-aarch64 devel/cloudabi-binutils-x86_64 lang/cloudabi-clang
Message-ID:  <201603211932.u2LJWNYE095892@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ed (src committer)
Date: Mon Mar 21 19:32:23 2016
New Revision: 411615
URL: https://svnweb.freebsd.org/changeset/ports/411615

Log:
  Extend the Binutils ports to allow deletion of specific tools.
  
  For CloudABI I slowly want to switch away from certain tools provided by
  Binutils. For example, it would be really nice if we could switch from
  GNU ld to LLD some time in the future. LLD is not ready yet. Some bug
  fixes didn't manage to land into 3.8 and it doesn't support aarch64
  properly. There are already some tools that we can use, such as nm,
  objdump, size, ar and ranlib.
  
  Introduce a BUREMOVE variable that can be set in Binutils slave ports to
  remove specific utilities that are installed by default. There doesn't
  seem to be any other elegant way to solve this. Set a bunch of utilities
  by default and then extend cloudabi-clang to set up symlinks to the LLVM
  versions of the tools.
  
  Reviewed by:	bapt
  Differential Revision:	https://reviews.freebsd.org/D5684

Modified:
  head/devel/binutils/Makefile
  head/devel/cloudabi-binutils-aarch64/Makefile
  head/devel/cloudabi-binutils-aarch64/pkg-plist
  head/devel/cloudabi-binutils-x86_64/Makefile
  head/devel/cloudabi-binutils-x86_64/pkg-plist
  head/lang/cloudabi-clang/Makefile

Modified: head/devel/binutils/Makefile
==============================================================================
--- head/devel/binutils/Makefile	Mon Mar 21 19:06:18 2016	(r411614)
+++ head/devel/binutils/Makefile	Mon Mar 21 19:32:23 2016	(r411615)
@@ -4,7 +4,7 @@
 PORTNAME=	binutils
 PORTVERSION=	2.25.1
 PORTEPOCH=	1
-PORTREVISION?=	0
+PORTREVISION?=	1
 CATEGORIES=	devel
 MASTER_SITES=	SOURCEWARE/binutils/releases
 
@@ -82,5 +82,10 @@ post-install:
 .endif
 	${LN} -fs ../../bin/${BUTARGET}-size ${STAGEDIR}${PREFIX}/${BUTARGET}/bin/size
 .endif
+.for tool in ${BUREMOVE}
+	@${RM} -f ${STAGEDIR}${PREFIX}/bin/${BUTARGET}-${tool} \
+	    ${STAGEDIR}${PREFIX}/man/man1/${BUTARGET}-${tool}.1 \
+	    ${STAGEDIR}${PREFIX}/${BUTARGET}/bin/${tool}
+.endfor
 
 .include <bsd.port.post.mk>

Modified: head/devel/cloudabi-binutils-aarch64/Makefile
==============================================================================
--- head/devel/cloudabi-binutils-aarch64/Makefile	Mon Mar 21 19:06:18 2016	(r411614)
+++ head/devel/cloudabi-binutils-aarch64/Makefile	Mon Mar 21 19:32:23 2016	(r411615)
@@ -12,5 +12,6 @@ PATCHDIR=	${.CURDIR}/files
 PLIST=		${.CURDIR}/pkg-plist
 
 BUTARGET=	aarch64-unknown-cloudabi
+BUREMOVE=	ar dlltool nlmconv nm objdump ranlib size windmc windres
 
 .include "${MASTERDIR}/Makefile"

Modified: head/devel/cloudabi-binutils-aarch64/pkg-plist
==============================================================================
--- head/devel/cloudabi-binutils-aarch64/pkg-plist	Mon Mar 21 19:06:18 2016	(r411614)
+++ head/devel/cloudabi-binutils-aarch64/pkg-plist	Mon Mar 21 19:32:23 2016	(r411615)
@@ -1,38 +1,24 @@
 bin/aarch64-unknown-cloudabi-addr2line
-bin/aarch64-unknown-cloudabi-ar
 bin/aarch64-unknown-cloudabi-as
 bin/aarch64-unknown-cloudabi-c++filt
 bin/aarch64-unknown-cloudabi-elfedit
 bin/aarch64-unknown-cloudabi-gprof
 bin/aarch64-unknown-cloudabi-ld
 bin/aarch64-unknown-cloudabi-ld.bfd
-bin/aarch64-unknown-cloudabi-nm
 bin/aarch64-unknown-cloudabi-objcopy
-bin/aarch64-unknown-cloudabi-objdump
-bin/aarch64-unknown-cloudabi-ranlib
 bin/aarch64-unknown-cloudabi-readelf
-bin/aarch64-unknown-cloudabi-size
 bin/aarch64-unknown-cloudabi-strings
 bin/aarch64-unknown-cloudabi-strip
 man/man1/aarch64-unknown-cloudabi-addr2line.1.gz
-man/man1/aarch64-unknown-cloudabi-ar.1.gz
 man/man1/aarch64-unknown-cloudabi-as.1.gz
 man/man1/aarch64-unknown-cloudabi-c++filt.1.gz
-man/man1/aarch64-unknown-cloudabi-dlltool.1.gz
 man/man1/aarch64-unknown-cloudabi-elfedit.1.gz
 man/man1/aarch64-unknown-cloudabi-gprof.1.gz
 man/man1/aarch64-unknown-cloudabi-ld.1.gz
-man/man1/aarch64-unknown-cloudabi-nlmconv.1.gz
-man/man1/aarch64-unknown-cloudabi-nm.1.gz
 man/man1/aarch64-unknown-cloudabi-objcopy.1.gz
-man/man1/aarch64-unknown-cloudabi-objdump.1.gz
-man/man1/aarch64-unknown-cloudabi-ranlib.1.gz
 man/man1/aarch64-unknown-cloudabi-readelf.1.gz
-man/man1/aarch64-unknown-cloudabi-size.1.gz
 man/man1/aarch64-unknown-cloudabi-strings.1.gz
 man/man1/aarch64-unknown-cloudabi-strip.1.gz
-man/man1/aarch64-unknown-cloudabi-windmc.1.gz
-man/man1/aarch64-unknown-cloudabi-windres.1.gz
 aarch64-unknown-cloudabi/lib/ldscripts/aarch64cloudabi.x
 aarch64-unknown-cloudabi/lib/ldscripts/aarch64cloudabi.xbn
 aarch64-unknown-cloudabi/lib/ldscripts/aarch64cloudabi.xc
@@ -59,13 +45,8 @@ aarch64-unknown-cloudabi/lib/ldscripts/a
 aarch64-unknown-cloudabi/lib/ldscripts/aarch64cloudabib.xsw
 aarch64-unknown-cloudabi/lib/ldscripts/aarch64cloudabib.xu
 aarch64-unknown-cloudabi/lib/ldscripts/aarch64cloudabib.xw
-aarch64-unknown-cloudabi/bin/ar
 aarch64-unknown-cloudabi/bin/as
 aarch64-unknown-cloudabi/bin/ld
 aarch64-unknown-cloudabi/bin/ld.bfd
-aarch64-unknown-cloudabi/bin/nm
 aarch64-unknown-cloudabi/bin/objcopy
-aarch64-unknown-cloudabi/bin/objdump
-aarch64-unknown-cloudabi/bin/ranlib
-aarch64-unknown-cloudabi/bin/size
 aarch64-unknown-cloudabi/bin/strip

Modified: head/devel/cloudabi-binutils-x86_64/Makefile
==============================================================================
--- head/devel/cloudabi-binutils-x86_64/Makefile	Mon Mar 21 19:06:18 2016	(r411614)
+++ head/devel/cloudabi-binutils-x86_64/Makefile	Mon Mar 21 19:32:23 2016	(r411615)
@@ -12,5 +12,6 @@ PATCHDIR=	${.CURDIR}/files
 PLIST=		${.CURDIR}/pkg-plist
 
 BUTARGET=	x86_64-unknown-cloudabi
+BUREMOVE=	ar dlltool nlmconv nm objdump ranlib size windmc windres
 
 .include "${MASTERDIR}/Makefile"

Modified: head/devel/cloudabi-binutils-x86_64/pkg-plist
==============================================================================
--- head/devel/cloudabi-binutils-x86_64/pkg-plist	Mon Mar 21 19:06:18 2016	(r411614)
+++ head/devel/cloudabi-binutils-x86_64/pkg-plist	Mon Mar 21 19:32:23 2016	(r411615)
@@ -1,38 +1,24 @@
 bin/x86_64-unknown-cloudabi-addr2line
-bin/x86_64-unknown-cloudabi-ar
 bin/x86_64-unknown-cloudabi-as
 bin/x86_64-unknown-cloudabi-c++filt
 bin/x86_64-unknown-cloudabi-elfedit
 bin/x86_64-unknown-cloudabi-gprof
 bin/x86_64-unknown-cloudabi-ld
 bin/x86_64-unknown-cloudabi-ld.bfd
-bin/x86_64-unknown-cloudabi-nm
 bin/x86_64-unknown-cloudabi-objcopy
-bin/x86_64-unknown-cloudabi-objdump
-bin/x86_64-unknown-cloudabi-ranlib
 bin/x86_64-unknown-cloudabi-readelf
-bin/x86_64-unknown-cloudabi-size
 bin/x86_64-unknown-cloudabi-strings
 bin/x86_64-unknown-cloudabi-strip
 man/man1/x86_64-unknown-cloudabi-addr2line.1.gz
-man/man1/x86_64-unknown-cloudabi-ar.1.gz
 man/man1/x86_64-unknown-cloudabi-as.1.gz
 man/man1/x86_64-unknown-cloudabi-c++filt.1.gz
-man/man1/x86_64-unknown-cloudabi-dlltool.1.gz
 man/man1/x86_64-unknown-cloudabi-elfedit.1.gz
 man/man1/x86_64-unknown-cloudabi-gprof.1.gz
 man/man1/x86_64-unknown-cloudabi-ld.1.gz
-man/man1/x86_64-unknown-cloudabi-nlmconv.1.gz
-man/man1/x86_64-unknown-cloudabi-nm.1.gz
 man/man1/x86_64-unknown-cloudabi-objcopy.1.gz
-man/man1/x86_64-unknown-cloudabi-objdump.1.gz
-man/man1/x86_64-unknown-cloudabi-ranlib.1.gz
 man/man1/x86_64-unknown-cloudabi-readelf.1.gz
-man/man1/x86_64-unknown-cloudabi-size.1.gz
 man/man1/x86_64-unknown-cloudabi-strings.1.gz
 man/man1/x86_64-unknown-cloudabi-strip.1.gz
-man/man1/x86_64-unknown-cloudabi-windmc.1.gz
-man/man1/x86_64-unknown-cloudabi-windres.1.gz
 x86_64-unknown-cloudabi/lib/ldscripts/elf_x86_64_cloudabi.x
 x86_64-unknown-cloudabi/lib/ldscripts/elf_x86_64_cloudabi.xbn
 x86_64-unknown-cloudabi/lib/ldscripts/elf_x86_64_cloudabi.xc
@@ -46,13 +32,8 @@ x86_64-unknown-cloudabi/lib/ldscripts/el
 x86_64-unknown-cloudabi/lib/ldscripts/elf_x86_64_cloudabi.xsw
 x86_64-unknown-cloudabi/lib/ldscripts/elf_x86_64_cloudabi.xu
 x86_64-unknown-cloudabi/lib/ldscripts/elf_x86_64_cloudabi.xw
-x86_64-unknown-cloudabi/bin/ar
 x86_64-unknown-cloudabi/bin/as
 x86_64-unknown-cloudabi/bin/ld
 x86_64-unknown-cloudabi/bin/ld.bfd
-x86_64-unknown-cloudabi/bin/nm
 x86_64-unknown-cloudabi/bin/objcopy
-x86_64-unknown-cloudabi/bin/objdump
-x86_64-unknown-cloudabi/bin/ranlib
-x86_64-unknown-cloudabi/bin/size
 x86_64-unknown-cloudabi/bin/strip

Modified: head/lang/cloudabi-clang/Makefile
==============================================================================
--- head/lang/cloudabi-clang/Makefile	Mon Mar 21 19:06:18 2016	(r411614)
+++ head/lang/cloudabi-clang/Makefile	Mon Mar 21 19:32:23 2016	(r411615)
@@ -3,6 +3,7 @@
 
 PORTNAME=	cloudabi-clang
 PORTVERSION=	3.8
+PORTREVISION=	1
 CATEGORIES=	lang
 MASTER_SITES=	# None
 DISTFILES=	# None
@@ -23,16 +24,28 @@ NO_BUILD=	yes
 CLOUDABI_ARCHS=	aarch64-unknown-cloudabi x86_64-unknown-cloudabi
 
 .for arch in ${CLOUDABI_ARCHS}
-PLIST_FILES+=	bin/${arch}-cc bin/${arch}-c++ llvm${LLVM_SUFFIX}/${arch}
+PLIST_FILES+=	bin/${arch}-ar bin/${arch}-cc bin/${arch}-c++ bin/${arch}-nm \
+		bin/${arch}-objdump bin/${arch}-ranlib bin/${arch}-size \
+		llvm${LLVM_SUFFIX}/${arch}
 .endfor
 
 do-install:
 	@${MKDIR} ${STAGEDIR}${PREFIX}/llvm${LLVM_SUFFIX}
 .for arch in ${CLOUDABI_ARCHS}
+	@${LN} -s ../llvm${LLVM_SUFFIX}/bin/llvm-ar \
+		${STAGEDIR}${PREFIX}/bin/${arch}-ar
 	@${LN} -s ../llvm${LLVM_SUFFIX}/bin/clang \
 		${STAGEDIR}${PREFIX}/bin/${arch}-cc
 	@${LN} -s ../llvm${LLVM_SUFFIX}/bin/clang++ \
 		${STAGEDIR}${PREFIX}/bin/${arch}-c++
+	@${LN} -s ../llvm${LLVM_SUFFIX}/bin/llvm-nm \
+		${STAGEDIR}${PREFIX}/bin/${arch}-nm
+	@${LN} -s ../llvm${LLVM_SUFFIX}/bin/llvm-objdump \
+		${STAGEDIR}${PREFIX}/bin/${arch}-objdump
+	@${LN} -s ../llvm${LLVM_SUFFIX}/bin/llvm-ranlib \
+		${STAGEDIR}${PREFIX}/bin/${arch}-ranlib
+	@${LN} -s ../llvm${LLVM_SUFFIX}/bin/llvm-size \
+		${STAGEDIR}${PREFIX}/bin/${arch}-size
 	@${LN} -s ../${arch} ${STAGEDIR}${PREFIX}/llvm${LLVM_SUFFIX}/${arch}
 .endfor
 



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