Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Dec 2019 23:22:23 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r518973 - head/base/binutils
Message-ID:  <201912032322.xB3NMNn1028360@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb (src,doc committer)
Date: Tue Dec  3 23:22:23 2019
New Revision: 518973
URL: https://svnweb.freebsd.org/changeset/ports/518973

Log:
  Simplify a few things and fix cross-building.
  
  - Remove objcopy unconditionally.
  - Don't bother creating links with the BUTARGET prefix.
  - Use HOSTARCH when setting CONFIGURE_TARGET.
  
  Reviewed by:	bapt
  Differential Revision:	https://reviews.freebsd.org/D22607

Modified:
  head/base/binutils/Makefile
  head/base/binutils/pkg-plist

Modified: head/base/binutils/Makefile
==============================================================================
--- head/base/binutils/Makefile	Tue Dec  3 22:55:24 2019	(r518972)
+++ head/base/binutils/Makefile	Tue Dec  3 23:22:23 2019	(r518973)
@@ -48,6 +48,7 @@ BUREMOVE=	addr2line \
 		dlltool \
 		elfedit \
 		gprof \
+		objcopy \
 		nlmconv \
 		nm \
 		ranlib \
@@ -58,9 +59,6 @@ BUREMOVE=	addr2line \
 		windmc \
 		windres
 
-PLIST_SUB+=	OBJCOPY="@comment "
-BUREMOVE+=	objcopy
-
 OPTIONS_DEFINE=	RELRO STATIC 
 RELRO_DESC=	enable -z relro in ELF linker by default
 
@@ -97,12 +95,12 @@ PLIST_SUB+=	SPARC=""
 PLIST_SUB+=	SPARC="@comment "
 .endif
 
-.if ${ARCH} == "amd64"
-CONFIGURE_TARGET=	x86_64-portbld-freebsd${OSREL}
-.elif ${ARCH} == "powerpcspe"
-CONFIGURE_TARGET=	powerpc-portbld-freebsd${OSREL}
+.if ${HOSTARCH} == "amd64"
+CONFIGURE_TARGET=	x86_64-unknown-freebsd${OSREL}
+.elif ${HOSTARCH} == "powerpcspe"
+CONFIGURE_TARGET=	powerpc-unknown-freebsd${OSREL}
 .else
-CONFIGURE_TARGET=	${ARCH}-portbld-freebsd${OSREL}
+CONFIGURE_TARGET=	${HOSTARCH}-unknown-freebsd${OSREL}
 .endif
 
 post-patch:
@@ -112,21 +110,10 @@ 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 \
+	@${RM} ${STAGEDIR}${PREFIX}/bin/${tool} \
 	    ${STAGEDIR}${MANPREFIX}/man/man1/${tool}.1 \
 	    ${STAGEDIR}${PREFIX}/${BUTARGET}/bin/${tool}
 .endfor

Modified: head/base/binutils/pkg-plist
==============================================================================
--- head/base/binutils/pkg-plist	Tue Dec  3 22:55:24 2019	(r518972)
+++ head/base/binutils/pkg-plist	Tue Dec  3 23:22:23 2019	(r518973)
@@ -1,17 +1,10 @@
 bin/as
 bin/ld
 bin/ld.bfd
-%%OBJCOPY%%bin/objcopy
 bin/objdump
-bin/%%BUTARGET%%-as
-bin/%%BUTARGET%%-ld
-bin/%%BUTARGET%%-ld.bfd
-%%OBJCOPY%%bin/%%BUTARGET%%-objcopy
-bin/%%BUTARGET%%-objdump
 %%BUTARGET%%/bin/as
 %%BUTARGET%%/bin/ld
 %%BUTARGET%%/bin/ld.bfd
-%%OBJCOPY%%%%BUTARGET%%/bin/objcopy
 %%BUTARGET%%/bin/objdump
 %%I386%%%%BUTARGET%%/lib/ldscripts/elf_i386.x
 %%I386%%%%BUTARGET%%/lib/ldscripts/elf_i386.xbn
@@ -567,9 +560,4 @@ bin/%%BUTARGET%%-objdump
 %%SPARC%%%%BUTARGET%%/lib/ldscripts/elf64_sparc_fbsd.xu
 share/man/man1/as.1.gz
 share/man/man1/ld.1.gz
-%%OBJCOPY%%share/man/man1/objcopy.1.gz
 share/man/man1/objdump.1.gz
-share/man/man1/%%BUTARGET%%-as.1.gz
-share/man/man1/%%BUTARGET%%-ld.1.gz
-%%OBJCOPY%%share/man/man1/%%BUTARGET%%-objcopy.1.gz
-share/man/man1/%%BUTARGET%%-objdump.1.gz



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