Index: head/devel/binutils/Makefile =================================================================== --- head/devel/binutils/Makefile (revision 413170) +++ head/devel/binutils/Makefile (revision 413171) @@ -1,93 +1,96 @@ # Created by: Martin Matuska # $FreeBSD$ PORTNAME= binutils PORTVERSION= 2.25.1 PORTEPOCH= 1 -PORTREVISION?= 1 +PORTREVISION?= 2 CATEGORIES= devel MASTER_SITES= SOURCEWARE/binutils/releases MAINTAINER?= bapt@FreeBSD.org COMMENT?= GNU binary tools LICENSE= GPLv3 LGPL3 LICENSE_COMB= multi BUILD_DEPENDS= ${LOCALBASE}/lib/libgmp.so:math/gmp \ ${LOCALBASE}/lib/libmpfr.so:math/mpfr CONFLICTS= libbfd-[0-9]* OPTIONS_DEFINE= NLS LICENSE_FILE_GPLv3= ${WRKSRC}/COPYING3 LICENSE_FILE_LGPL3= ${WRKSRC}/COPYING3.LIB USES= bison gmake libtool tar:bzip2 compiler:env GNU_CONFIGURE= yes .if defined(PKGNAMEPREFIX) BUTARGET?= ${PKGNAMEPREFIX}${OPSYS:tl} OPTIONS_EXCLUDE= NLS INFO_PATH= ${PKGNAMEPREFIX:S/-$//}/info CONFIGURE_ARGS+= --disable-shared \ --target=${BUTARGET} .else CFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib CONFIGURE_ARGS+= --with-system-zlib \ --with-gmp=${LOCALBASE} \ --with-mpfr=${LOCALBASE} INFO= as \ binutils \ gprof \ bfd \ ld .endif CONFIGURE_ARGS+= --disable-werror \ --with-sysroot=/ MAKE_ENV+= ac_cv_func_sbrk=0 OPTIONS_SUB= yes NLS_USES= gettext NLS_CONFIGURE_ENABLE= nls .include # Actual earliest version may differ slightly .if ${ARCH} != ia64 && ${ARCH} != mips && ${ARCH} != mips64 && !defined(PKGNAMEPREFIX) && (${COMPILER_TYPE} == clang && ${COMPILER_VERSION} >= 34 || ${COMPILER_TYPE} == gcc) CONFIGURE_ARGS+= --enable-gold --enable-plugins PLIST_SUB+= GOLD="" .else PLIST_SUB+= GOLD="@comment " .endif .if ${ARCH} == "amd64" CONFIGURE_TARGET= x86_64-portbld-freebsd${OSREL} .else CONFIGURE_TARGET= ${ARCH}-portbld-freebsd${OSREL} .endif post-install: .if !defined(PKGNAMEPREFIX) ${INSTALL_DATA} ${WRKSRC}/include/plugin-api.h ${STAGEDIR}${PREFIX}/include/ @${FIND} -ds ${STAGEDIR}${PREFIX}/${CONFIGURE_TARGET} ! -type d | \ ${SED} -e 's,^${STAGEDIR}${PREFIX}/,,' >> ${TMPPLIST} ${RM} ${STAGEDIR}${PREFIX}/include/ansidecl.h ${REINPLACE_CMD} '/#include "ansidecl.h"/d' ${STAGEDIR}${PREFIX}/include/bfd.h .else .if ${PKGNAMEPREFIX:S/-$//} != ${BUTARGET} ${RM} -rf ${STAGEDIR}${PREFIX}/${PKGNAMEPREFIX:S/-$//} .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 +.if ${BUREMOVE:Mld} + @${RM} -rf ${STAGEDIR}${PREFIX}/${BUTARGET}/lib/ldscripts +.endif .include Index: head/devel/cloudabi-binutils-aarch64/Makefile =================================================================== --- head/devel/cloudabi-binutils-aarch64/Makefile (revision 413170) +++ head/devel/cloudabi-binutils-aarch64/Makefile (revision 413171) @@ -1,17 +1,18 @@ # Created by: Ed Schouten # $FreeBSD$ PKGNAMEPREFIX= cloudabi- PKGNAMESUFFIX= -aarch64 MAINTAINER= ed@FreeBSD.org COMMENT= GNU Binutils for CloudABI cross-development MASTERDIR= ${.CURDIR}/../binutils PATCHDIR= ${.CURDIR}/files PLIST= ${.CURDIR}/pkg-plist BUTARGET= aarch64-unknown-cloudabi -BUREMOVE= ar dlltool nlmconv nm objdump ranlib size windmc windres +BUREMOVE= ar dlltool ld ld.bfd nlmconv nm objdump ranlib size windmc \ + windres .include "${MASTERDIR}/Makefile" Index: head/devel/cloudabi-binutils-aarch64/pkg-plist =================================================================== --- head/devel/cloudabi-binutils-aarch64/pkg-plist (revision 413170) +++ head/devel/cloudabi-binutils-aarch64/pkg-plist (revision 413171) @@ -1,52 +1,21 @@ bin/aarch64-unknown-cloudabi-addr2line 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-objcopy bin/aarch64-unknown-cloudabi-readelf bin/aarch64-unknown-cloudabi-strings bin/aarch64-unknown-cloudabi-strip man/man1/aarch64-unknown-cloudabi-addr2line.1.gz man/man1/aarch64-unknown-cloudabi-as.1.gz man/man1/aarch64-unknown-cloudabi-c++filt.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-objcopy.1.gz man/man1/aarch64-unknown-cloudabi-readelf.1.gz man/man1/aarch64-unknown-cloudabi-strings.1.gz man/man1/aarch64-unknown-cloudabi-strip.1.gz -aarch64-unknown-cloudabi/lib/ldscripts/aarch64cloudabi.x -aarch64-unknown-cloudabi/lib/ldscripts/aarch64cloudabi.xbn -aarch64-unknown-cloudabi/lib/ldscripts/aarch64cloudabi.xc -aarch64-unknown-cloudabi/lib/ldscripts/aarch64cloudabi.xd -aarch64-unknown-cloudabi/lib/ldscripts/aarch64cloudabi.xdc -aarch64-unknown-cloudabi/lib/ldscripts/aarch64cloudabi.xdw -aarch64-unknown-cloudabi/lib/ldscripts/aarch64cloudabi.xn -aarch64-unknown-cloudabi/lib/ldscripts/aarch64cloudabi.xr -aarch64-unknown-cloudabi/lib/ldscripts/aarch64cloudabi.xs -aarch64-unknown-cloudabi/lib/ldscripts/aarch64cloudabi.xsc -aarch64-unknown-cloudabi/lib/ldscripts/aarch64cloudabi.xsw -aarch64-unknown-cloudabi/lib/ldscripts/aarch64cloudabi.xu -aarch64-unknown-cloudabi/lib/ldscripts/aarch64cloudabi.xw -aarch64-unknown-cloudabi/lib/ldscripts/aarch64cloudabib.x -aarch64-unknown-cloudabi/lib/ldscripts/aarch64cloudabib.xbn -aarch64-unknown-cloudabi/lib/ldscripts/aarch64cloudabib.xc -aarch64-unknown-cloudabi/lib/ldscripts/aarch64cloudabib.xd -aarch64-unknown-cloudabi/lib/ldscripts/aarch64cloudabib.xdc -aarch64-unknown-cloudabi/lib/ldscripts/aarch64cloudabib.xdw -aarch64-unknown-cloudabi/lib/ldscripts/aarch64cloudabib.xn -aarch64-unknown-cloudabi/lib/ldscripts/aarch64cloudabib.xr -aarch64-unknown-cloudabi/lib/ldscripts/aarch64cloudabib.xs -aarch64-unknown-cloudabi/lib/ldscripts/aarch64cloudabib.xsc -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/as -aarch64-unknown-cloudabi/bin/ld -aarch64-unknown-cloudabi/bin/ld.bfd aarch64-unknown-cloudabi/bin/objcopy aarch64-unknown-cloudabi/bin/strip Index: head/devel/cloudabi-binutils-x86_64/Makefile =================================================================== --- head/devel/cloudabi-binutils-x86_64/Makefile (revision 413170) +++ head/devel/cloudabi-binutils-x86_64/Makefile (revision 413171) @@ -1,17 +1,18 @@ # Created by: Ed Schouten # $FreeBSD$ PKGNAMEPREFIX= cloudabi- PKGNAMESUFFIX= -x86_64 MAINTAINER= ed@FreeBSD.org COMMENT= GNU Binutils for CloudABI cross-development MASTERDIR= ${.CURDIR}/../binutils PATCHDIR= ${.CURDIR}/files PLIST= ${.CURDIR}/pkg-plist BUTARGET= x86_64-unknown-cloudabi -BUREMOVE= ar dlltool nlmconv nm objdump ranlib size windmc windres +BUREMOVE= ar dlltool ld ld.bfd nlmconv nm objdump ranlib size windmc \ + windres .include "${MASTERDIR}/Makefile" Index: head/devel/cloudabi-binutils-x86_64/pkg-plist =================================================================== --- head/devel/cloudabi-binutils-x86_64/pkg-plist (revision 413170) +++ head/devel/cloudabi-binutils-x86_64/pkg-plist (revision 413171) @@ -1,39 +1,21 @@ bin/x86_64-unknown-cloudabi-addr2line 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-objcopy bin/x86_64-unknown-cloudabi-readelf 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-as.1.gz man/man1/x86_64-unknown-cloudabi-c++filt.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-objcopy.1.gz man/man1/x86_64-unknown-cloudabi-readelf.1.gz man/man1/x86_64-unknown-cloudabi-strings.1.gz man/man1/x86_64-unknown-cloudabi-strip.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 -x86_64-unknown-cloudabi/lib/ldscripts/elf_x86_64_cloudabi.xd -x86_64-unknown-cloudabi/lib/ldscripts/elf_x86_64_cloudabi.xdc -x86_64-unknown-cloudabi/lib/ldscripts/elf_x86_64_cloudabi.xdw -x86_64-unknown-cloudabi/lib/ldscripts/elf_x86_64_cloudabi.xn -x86_64-unknown-cloudabi/lib/ldscripts/elf_x86_64_cloudabi.xr -x86_64-unknown-cloudabi/lib/ldscripts/elf_x86_64_cloudabi.xs -x86_64-unknown-cloudabi/lib/ldscripts/elf_x86_64_cloudabi.xsc -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/as -x86_64-unknown-cloudabi/bin/ld -x86_64-unknown-cloudabi/bin/ld.bfd x86_64-unknown-cloudabi/bin/objcopy x86_64-unknown-cloudabi/bin/strip Index: head/devel/cloudabi-toolchain/Makefile =================================================================== --- head/devel/cloudabi-toolchain/Makefile (revision 413170) +++ head/devel/cloudabi-toolchain/Makefile (revision 413171) @@ -1,60 +1,80 @@ # Created by: Ed Schouten # $FreeBSD$ PORTNAME= cloudabi-toolchain -PORTVERSION= 1.3 +PORTVERSION= 1.4 CATEGORIES= devel MASTER_SITES= # None DISTFILES= # None MAINTAINER= ed@FreeBSD.org COMMENT= C and C++ toolchain for CloudABI LICENSE= MIT RUN_DEPENDS= clang${LLVM_SUFFIX}:devel/llvm${LLVM_SUFFIX} \ - pkgconf:devel/pkgconf \ - aarch64-unknown-cloudabi-ld:devel/cloudabi-binutils-aarch64 \ - x86_64-unknown-cloudabi-ld:devel/cloudabi-binutils-x86_64 + lld${LLVM_SUFFIX}:devel/llvm${LLVM_SUFFIX} \ + pkgconf:devel/pkgconf -LLVM_SUFFIX= 38 +LLVM_SUFFIX= -devel CLOUDABI_ARCHS= aarch64-unknown-cloudabi x86_64-unknown-cloudabi LLVM_TOOLS= ar nm objdump ranlib size SHELL_TOOLS= man pkg-config +.include + +.if ${OSVERSION} >= 1100100 +# Depend on ELF tools provided by the base system. They work well with +# CloudABI executables. +BASE_TOOLS= addr2line c++filt objcopy readelf strings strip +CONFLICTS= cloudabi-binutils-* +.else +# The tools in the base system are too old to properly support CloudABI +# and aarch64. Depend on versions provided by GNU Binutils instead. +RUN_DEPENDS+= aarch64-unknown-cloudabi-readelf:devel/cloudabi-binutils-aarch64 \ + x86_64-unknown-cloudabi-readelf:devel/cloudabi-binutils-x86_64 +.endif + .for arch in ${CLOUDABI_ARCHS} -. for tool in ${LLVM_TOOLS} ${SHELL_TOOLS} +. for tool in ${BASE_TOOLS} ${LLVM_TOOLS} ${SHELL_TOOLS} PLIST_FILES+= bin/${arch}-${tool} . endfor -PLIST_FILES+= bin/${arch}-cc bin/${arch}-c++ llvm${LLVM_SUFFIX}/${arch} +PLIST_FILES+= bin/${arch}-cc bin/${arch}-c++ bin/${arch}-ld \ + llvm${LLVM_SUFFIX}/${arch} .endfor do-build: .for arch in ${CLOUDABI_ARCHS} . for tool in ${SHELL_TOOLS} @${SED} -e 's:%%PREFIX%%:${PREFIX}:g' -e 's:%%ARCH%%:${arch}:g' \ ${FILESDIR}/${tool}.in > ${WRKDIR}/${arch}-${tool} . endfor .endfor do-install: @${MKDIR} ${STAGEDIR}${PREFIX}/llvm${LLVM_SUFFIX} .for arch in ${CLOUDABI_ARCHS} +. for tool in ${BASE_TOOLS} + @${LN} -s /usr/bin/${tool} \ + ${STAGEDIR}${PREFIX}/bin/${arch}-${tool} +. endfor . for tool in ${LLVM_TOOLS} @${LN} -s ../llvm${LLVM_SUFFIX}/bin/llvm-${tool} \ ${STAGEDIR}${PREFIX}/bin/${arch}-${tool} . endfor . for tool in ${SHELL_TOOLS} - @${INSTALL_SCRIPT} ${WRKDIR}/${arch}-${tool} \ + ${INSTALL_SCRIPT} ${WRKDIR}/${arch}-${tool} \ ${STAGEDIR}${PREFIX}/bin/${arch}-${tool} . endfor @${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/lld \ + ${STAGEDIR}${PREFIX}/bin/${arch}-ld @${LN} -s ../${arch} ${STAGEDIR}${PREFIX}/llvm${LLVM_SUFFIX}/${arch} .endfor -.include +.include