Date: Thu, 2 Jan 2020 19:20:06 +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: r521870 - in head/base: binutils binutils/files gcc6 gcc6/files Message-ID: <202001021920.002JK6Mh094516@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb (src,doc committer) Date: Thu Jan 2 19:20:06 2020 New Revision: 521870 URL: https://svnweb.freebsd.org/changeset/ports/521870 Log: Various fixes to base/binutils and base/gcc6. - Add --with-sysroot=/ to CONFIGURE_ARGS. base/binutils needs this so that ld honors --sysroot in linker scripts. base/gcc6 needs this so that the C++ include paths honor --sysroot. - Remove a hack from GCC's configure to force C++98 mode when building GCC with GCC. libc++ assumes C++11, so this hack was breaking the build of base/gcc6 natively when the system compiler was GCC. - Add toolchain makefiles installed to /usr/share/toolchains. These are suitable to be used by CROSS_TOOLCHAIN when doing a native arch build. These makefiles enable appropriate knobs so that the in-tree components that are replaced by each package are not built or installed. The freebsd-gcc toolchain makefile includes the binutils toolchain makefile if it is present. Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D22984 Added: head/base/binutils/files/ head/base/binutils/files/freebsd-binutils.mk (contents, props changed) head/base/gcc6/files/freebsd-gcc.mk (contents, props changed) Modified: head/base/binutils/Makefile head/base/binutils/pkg-plist head/base/gcc6/Makefile head/base/gcc6/files/patch-configure head/base/gcc6/pkg-plist Modified: head/base/binutils/Makefile ============================================================================== --- head/base/binutils/Makefile Thu Jan 2 19:17:26 2020 (r521869) +++ head/base/binutils/Makefile Thu Jan 2 19:20:06 2020 (r521870) @@ -3,6 +3,7 @@ PORTNAME= binutils PORTVERSION= 2.33.1 PORTEPOCH= 0 +PORTREVISION= 1 CATEGORIES= base MASTER_SITES= SOURCEWARE/binutils/releases PKGNAMEPREFIX= ${OPSYS:tl}- @@ -35,6 +36,7 @@ CONFIGURE_ARGS+= --disable-host-shared \ --disable-shared \ --disable-nls \ --with-system-zlib \ + --with-sysroot="/" \ --enable-relro=no \ --enable-x86-relax-relocations=no \ --target=${BUTARGET} @@ -117,5 +119,7 @@ post-install: ${STAGEDIR}${MANPREFIX}/man/man1/${tool}.1 \ ${STAGEDIR}${PREFIX}/${BUTARGET}/bin/${tool} .endfor + @${MKDIR} ${STAGEDIR}${PREFIX}/share/toolchains + ${INSTALL_DATA} ${.CURDIR}/files/freebsd-binutils.mk ${STAGEDIR}${PREFIX}/share/toolchains/ .include <bsd.port.post.mk> Added: head/base/binutils/files/freebsd-binutils.mk ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/base/binutils/files/freebsd-binutils.mk Thu Jan 2 19:20:06 2020 (r521870) @@ -0,0 +1,4 @@ +CROSS_BINUTILS_PREFIX=/usr/bin/ +export WITH_PORT_BASE_BINUTILS=yes +export WITHOUT_BINUTILS=yes +export WITHOUT_LLD_IS_LD=yes Modified: head/base/binutils/pkg-plist ============================================================================== --- head/base/binutils/pkg-plist Thu Jan 2 19:17:26 2020 (r521869) +++ head/base/binutils/pkg-plist Thu Jan 2 19:20:06 2020 (r521870) @@ -561,3 +561,4 @@ bin/objdump share/man/man1/as.1.gz share/man/man1/ld.1.gz share/man/man1/objdump.1.gz +share/toolchains/freebsd-binutils.mk Modified: head/base/gcc6/Makefile ============================================================================== --- head/base/gcc6/Makefile Thu Jan 2 19:17:26 2020 (r521869) +++ head/base/gcc6/Makefile Thu Jan 2 19:20:06 2020 (r521870) @@ -2,6 +2,7 @@ PORTNAME= gcc PORTVERSION= 6.5.0 +PORTREVISION= 1 CATEGORIES= base MASTER_SITES= GCC/releases/gcc-${DISTVERSION} \ http://www.mpfr.org/mpfr-3.1.6/:mpfr \ @@ -32,6 +33,7 @@ CONFIGURE_ENV+= ${_tool}_FOR_TARGET="${${_tool}}" USES= gmake libtool tar:xz makeinfo PLIST_SUB= OPSYS=${OPSYS:tl} \ + SUFFIX=${SUFFIX} \ GCC_TARGET=${GCC_TARGET} \ GCC_VERSION=${PORTVERSION} @@ -47,6 +49,7 @@ CONFIGURE_ARGS+= \ --disable-nls \ --without-headers \ --with-gxx-include-dir=/usr/include/c++/v1/ \ + --with-sysroot="/" \ --with-build-sysroot=${CROSS_SYSROOT} \ -with-pkgversion="GNU Collection for FreeBSD" @@ -119,5 +122,7 @@ post-install: .if ${ARCH} == "amd64" || ${ARCH} == "i386" ${RM} ${STAGEDIR}/usr/lib/gcc/${GCC_TARGET}/${PORTVERSION}/include/float.h .endif + @${MKDIR} ${STAGEDIR}${PREFIX}/share/toolchains + ${INSTALL_DATA} ${FILESDIR}/freebsd-gcc.mk ${STAGEDIR}${PREFIX}/share/toolchains/freebsd-gcc${SUFFIX}.mk .include <bsd.port.post.mk> Added: head/base/gcc6/files/freebsd-gcc.mk ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/base/gcc6/files/freebsd-gcc.mk Thu Jan 2 19:20:06 2020 (r521870) @@ -0,0 +1,8 @@ +XCC=/usr/bin/cc +XCXX=/usr/bin/c++ +XCPP=/usr/bin/cpp +X_COMPILER_TYPE=gcc +export WITH_PORT_BASE_GCC=yes +export WITHOUT_GCC=yes +export WITHOUT_CLANG_IS_CC=yes +.sinclude "freebsd-binutils.mk" Modified: head/base/gcc6/files/patch-configure ============================================================================== --- head/base/gcc6/files/patch-configure Thu Jan 2 19:17:26 2020 (r521869) +++ head/base/gcc6/files/patch-configure Thu Jan 2 19:20:06 2020 (r521870) @@ -1,6 +1,6 @@ ---- configure.orig 2015-05-03 17:29:57 UTC -+++ configure -@@ -3675,10 +3675,6 @@ case "${target}" in +--- configure.orig 2017-01-09 13:01:26.582656000 -0800 ++++ configure 2019-03-26 14:29:44.995174000 -0700 +@@ -3717,10 +3717,6 @@ case "${target}" in *-*-dragonfly*) ;; *-*-freebsd*) @@ -11,3 +11,16 @@ ;; *-*-kaos*) # Remove unsupported stuff on all kaOS configurations. +@@ -5450,12 +5446,6 @@ $as_echo "$as_me: WARNING: trying to bootstrap a cross + as_fn_error "invalid option for --enable-bootstrap" "$LINENO" 5 + ;; + esac +- +-# When bootstrapping with GCC, build stage 1 in C++98 mode to ensure that a +-# C++98 compiler can still start the bootstrap. +-if test "$enable_bootstrap:$GXX" = "yes:yes"; then +- CXX="$CXX -std=gnu++98" +-fi + + # Used for setting $lt_cv_objdir + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 Modified: head/base/gcc6/pkg-plist ============================================================================== --- head/base/gcc6/pkg-plist Thu Jan 2 19:17:26 2020 (r521869) +++ head/base/gcc6/pkg-plist Thu Jan 2 19:20:06 2020 (r521870) @@ -27,3 +27,4 @@ share/man/man1/gcov-tool.1.gz share/man/man7/fsf-funding.7.gz share/man/man7/gfdl.7.gz share/man/man7/gpl.7.gz +share/toolchains/freebsd-gcc%%SUFFIX%%.mk
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202001021920.002JK6Mh094516>