Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tools/gcc - use --with-default-libstdcxx-abi=new for GCC, ot...



details:   https://anonhg.NetBSD.org/src/rev/bbcbbe0e13e7
branches:  trunk
changeset: 448391:bbcbbe0e13e7
user:      mrg <mrg%NetBSD.org@localhost>
date:      Fri Feb 01 09:27:23 2019 +0000

description:
- use --with-default-libstdcxx-abi=new for GCC, otherwise we get the
  old ABI with --disable-libstdcxx-dual-abi
- fix libbacktrace mknative
- find gthr-default.h for libstdc++ mknative
- fetch FILESYSTEM_SOURCES

diffstat:

 tools/gcc/Makefile     |  17 +++++++++++------
 tools/gcc/mknative-gcc |   9 ++++++---
 2 files changed, 17 insertions(+), 9 deletions(-)

diffs (97 lines):

diff -r 4498aeee0965 -r bbcbbe0e13e7 tools/gcc/Makefile
--- a/tools/gcc/Makefile        Fri Feb 01 09:06:07 2019 +0000
+++ b/tools/gcc/Makefile        Fri Feb 01 09:27:23 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.88 2019/01/19 12:58:37 mrg Exp $
+#      $NetBSD: Makefile,v 1.89 2019/02/01 09:27:23 mrg Exp $
 
 .include <bsd.hostinit.mk>
 
@@ -39,7 +39,8 @@
                        --disable-libstdcxx-dual-abi \
                        --enable-__cxa_atexit \
                        --enable-libstdcxx-time=rt \
-                       --enable-libstdcxx-threads
+                       --enable-libstdcxx-threads \
+                       --with-diagnostics-color=auto-if-env
 .if defined(GCC_CONFIG_ARCH.${MACHINE_ARCH})
 COMMON_CONFIGURE_ARGS+=        --with-arch=${GCC_CONFIG_ARCH.${MACHINE_ARCH}}
 .endif
@@ -47,7 +48,9 @@
 COMMON_CONFIGURE_ARGS+=        --with-tune=${GCC_CONFIG_TUNE.${MACHINE_ARCH}}
 .endif
 
-COMMON_CONFIGURE_ARGS+= --with-diagnostics-color=auto-if-env
+.if ${HAVE_GCC} >= 7
+COMMON_CONFIGURE_ARGS+=        --with-default-libstdcxx-abi=new
+.endif
 
 CONFIGURE_ARGS=        ${COMMON_CONFIGURE_ARGS}
 CONFIGURE_ARGS+= \
@@ -94,6 +97,7 @@
 
 MKNATIVE_CONFIG_TARGET_LIBS+= \
        configure-target-libstdc++-v3 \
+       configure-target-libbacktrace \
        configure-target-libobjc
 
 BINENV=                /usr/bin/env -i
@@ -105,7 +109,7 @@
                        CFLAGS_FOR_BUILD="-I${TOOLDIR}/include" \
                        CC=${CC:Q}' '${CCADDFLAGS:Q} \
                        CXX=${CXX:Q}' '${CCADDFLAGS:Q}' '${CXXADDFLAGS:Q} \
-                       CPP=${CPP:Q}' '-I${DESTDIR}/usr/include \
+                       CPP=${CPP:Q}' '-I${DESTDIR}/usr/include' '-I${DESTDIR}/usr/include/g++/bits \
                        CFLAGS= CPPFLAGS= CXXFLAGS= LDFLAGS= \
                        AS=${AS:Q} AWK=${TOOL_AWK:Q} LD=${LD:Q} \
                        MSGFMT=${TOOLDIR}/bin/${_TOOL_PREFIX}msgfmt \
@@ -185,14 +189,15 @@
                        --disable-multilib \
                        --disable-symvers \
                        --disable-libstdcxx-pch \
-                       --disable-libstdcxx-dual-abi \
                        --build=`${GCCDIST}/config.guess` \
                        --host=${MACHINE_GNU_PLATFORM} \
                        --with-sysroot=${DESTDIR}
 MKENV_BUILD_MAKE=cd .native && ${MKNATIVE_ENV} ${BUILD_MAKE}
 
 .native/.configure_done: ${_GNU_CFGSRC} ${.CURDIR}/Makefile
-       mkdir .native 2>/dev/null || true
+       mkdir .native .native/gcc .native/gcc/include 2>/dev/null || true
+       # If this fails, gthreads won't be configured initially, but reconfig will.
+       -cp ${DESTDIR}/usr/include/g++/bits/gthr-default.h .native/gcc/include
        PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
                (cd .native && ${MKNATIVE_ENV} \
                        ${HOST_SH} ${GNUHOSTDIST}/configure \
diff -r 4498aeee0965 -r bbcbbe0e13e7 tools/gcc/mknative-gcc
--- a/tools/gcc/mknative-gcc    Fri Feb 01 09:06:07 2019 +0000
+++ b/tools/gcc/mknative-gcc    Fri Feb 01 09:27:23 2019 +0000
@@ -1,5 +1,5 @@
 #!/bin/sh
-#      $NetBSD: mknative-gcc,v 1.96 2019/01/19 20:02:06 mrg Exp $
+#      $NetBSD: mknative-gcc,v 1.97 2019/02/01 09:27:23 mrg Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of gcc.
@@ -178,9 +178,9 @@
 
        mkdir -p $_OUTDIR/lib/$_subdir/arch/$MACHINE_ARCH
        write_c $_OUTDIRBASE/lib/$_subdir/arch/$MACHINE_ARCH/config.h \
-               <$_TMPDIR/$_subdir/config.h
+               <$_TMPDIR/$_PLATFORM/$_subdir/config.h
        write_c $_OUTDIRBASE/lib/$_subdir/arch/$MACHINE_ARCH/backtrace-supported.h \
-               <$_TMPDIR/$_subdir/backtrace-supported.h
+               <$_TMPDIR/$_PLATFORM/$_subdir/backtrace-supported.h
 }
 
 ##### lib/libobjc #####
@@ -256,6 +256,9 @@
                        GLIBCXX_ABI_FLAGS libc__98convenience_la_SOURCES | \
                        sed -e 's/^G_libc__98convenience_la_SOURCES=/G_CPP98_SOURCES=/' \
                            -e 's/codecvt.cc/c98-codecvt.cc/'
+               getvars $_PLATFORM/libstdc++-v3/src/filesystem/Makefile \
+                       libstdc__fs_la_SOURCES | \
+                       sed -e 's/^G_libstdc__fs_la_SOURCES=/G_FILESYSTEM_SOURCES=/'
                getvars $_PLATFORM/libstdc++-v3/Makefile ATOMICITY_SRCDIR \
                        BASIC_FILE_CC CLOCALE_CC CCODECVT_CC CCOLLATE_CC \
                        CCTYPE_CC  CMESSAGES_CC CMONEY_CC CNUMERIC_CC CTIME_CC \



Home | Main Index | Thread Index | Old Index