Source-Changes-HG archive

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

[src/trunk]: src/tools/gcc - gcc.old == gcc-5.3, so copy mknative-gcc{, .old} ...



details:   https://anonhg.NetBSD.org/src/rev/d7558a297b56
branches:  trunk
changeset: 826895:d7558a297b56
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Oct 04 21:29:43 2017 +0000

description:
- gcc.old == gcc-5.3, so copy mknative-gcc{,.old} and adjust
- disable dual libstdc++ abi per joerg
  (https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html)
  will require a major libstdc++ major bump.

diffstat:

 tools/gcc/Makefile         |   6 ++++--
 tools/gcc/mknative-gcc.old |  45 ++++++++++++++++++++++++---------------------
 2 files changed, 28 insertions(+), 23 deletions(-)

diffs (154 lines):

diff -r 4b4b1368d501 -r d7558a297b56 tools/gcc/Makefile
--- a/tools/gcc/Makefile        Wed Oct 04 11:33:01 2017 +0000
+++ b/tools/gcc/Makefile        Wed Oct 04 21:29:43 2017 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.82 2017/08/22 09:17:50 mrg Exp $
+#      $NetBSD: Makefile,v 1.83 2017/10/04 21:29:43 christos Exp $
 
 .include <bsd.own.mk>
 
@@ -8,7 +8,7 @@
 GCCDIST=       ${.CURDIR}/../../external/gpl3/${EXTERNAL_GCC_SUBDIR}/dist
 GNUHOSTDIST=   ${GCCDIST}
 
-.if ${HAVE_GCC} == 48
+.if ${HAVE_GCC} == 53
 MKNATIVE=              ${.CURDIR}/mknative-gcc.old
 .endif
 
@@ -35,6 +35,7 @@
                        --with-bugurl=http://www.NetBSD.org/Misc/send-pr.html \
                        --with-pkgversion="NetBSD ${NETBSD_GCC_VERSION}" \
                        --with-system-zlib \
+                       --disable-libstdcxx-dual-abi \
                        --enable-__cxa_atexit \
                        --enable-libstdcxx-time=rt \
                        --enable-libstdcxx-threads
@@ -190,6 +191,7 @@
                        --disable-multilib \
                        --disable-symvers \
                        --disable-libstdcxx-pch \
+                       --disable-libstdcxx-dual-abi \
                        --build=`${GCCDIST}/config.guess` \
                        --host=${MACHINE_GNU_PLATFORM} \
                        --with-sysroot=${DESTDIR}
diff -r 4b4b1368d501 -r d7558a297b56 tools/gcc/mknative-gcc.old
--- a/tools/gcc/mknative-gcc.old        Wed Oct 04 11:33:01 2017 +0000
+++ b/tools/gcc/mknative-gcc.old        Wed Oct 04 21:29:43 2017 +0000
@@ -1,10 +1,10 @@
 #!/bin/sh
-#      $NetBSD: mknative-gcc.old,v 1.3 2016/04/21 07:22:15 mrg Exp $
+#      $NetBSD: mknative-gcc.old,v 1.4 2017/10/04 21:29:43 christos Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of gcc.
 #
-# This version is for GCC 4.8.
+# This version is for GCC 5.3
 
 # initialise
 
@@ -37,19 +37,6 @@
                -e "s,-I/usr/include/[^         ]*,,"
 }
 
-##### lib/crtstuff #####
-
-get_crtstuff () {
-       _subdir="$1"
-       mkdir -p $_OUTDIR/lib/$_subdir/arch
-
-       getvars gcc/Makefile \
-               INCLUDES CRTSTUFF_CFLAGS CRTSTUFF_T_CFLAGS CRTSTUFF_T_CFLAGS_S \
-               tm_defines xm_file xm_defines \
-               | sanitise_includes \
-               | write_mk $_OUTDIRBASE/lib/$_subdir/arch/$MACHINE_ARCH.mk
-}
-
 ##### lib/libg2c #####
 
 get_libg2c () {
@@ -121,7 +108,10 @@
 
        {
                getvars $_mf \
-                       LIBGCOV
+                       LIBGCOV_MERGE \
+                       LIBGCOV_PROFILER \
+                       LIBGCOV_INTERFACE \
+                       LIBGCOV_DRIVER
        } | write_mk $_OUTDIRBASE/lib/lib$_subdir/libgcov/arch/$MACHINE_ARCH/defs.mk
 
        write_c $_OUTDIRBASE/lib/lib$_subdir/libgcov/arch/$MACHINE_ARCH/gcov-iov.h \
@@ -245,9 +235,13 @@
                getvars $_PLATFORM/libstdc++-v3/src/Makefile \
                        libstdc___la_SOURCES | sed 's/^G_libstdc___la_SOURCES=/G_SRC_SOURCES=/'
                getvars $_PLATFORM/libstdc++-v3/src/c++11/Makefile \
-                       libc__11convenience_la_SOURCES | sed 's/^G_libc__11convenience_la_SOURCES=/G_CPP11_SOURCES=/'
+                       libc__11convenience_la_SOURCES | \
+                       sed -e 's/^G_libc__11convenience_la_SOURCES=/G_CPP11_SOURCES=/' \
+                           -e 's/codecvt.cc/c11-codecvt.cc/'
                getvars $_PLATFORM/libstdc++-v3/src/c++98/Makefile \
-                       libc__98convenience_la_SOURCES | sed 's/^G_libc__98convenience_la_SOURCES=/G_CPP98_SOURCES=/'
+                       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/Makefile ATOMICITY_SRCDIR \
                        BASIC_FILE_CC CLOCALE_CC CCODECVT_CC CCOLLATE_CC \
                        CCTYPE_CC  CMESSAGES_CC CMONEY_CC CNUMERIC_CC CTIME_CC \
@@ -277,6 +271,11 @@
        for f in auto-host tm config; do
                write_c $_OUTDIRBASE/usr.bin/$_subdir/arch/$MACHINE_ARCH/$f.h <$_TMPDIR/gcc/$f.h
        done
+       # XXXGCC5 don't really want to copy insn-modes as we build
+       # it but libgcc needs to too early yet
+       for f in insn-modes; do
+               write_c $_OUTDIRBASE/usr.bin/$_subdir/arch/$MACHINE_ARCH/$f.h <$_TMPDIR/gcc/$f.h
+       done
 }
 
 get_gcc () {
@@ -307,6 +306,7 @@
                        GCC_OBJS GCOV_OBJS GXX_OBJS GTM_H PROTO_OBJS ${_extravars1} \
                        INCLUDES md_file OBJC_OBJS OBJS out_file version \
                        BUILD_PREFIX RTL_H RTL_BASE_H TREE_H ${_hconfig_h} BASIC_BLOCK_H GCC_H \
+                       GGC_H \
                        GTFILES_SRCDIR GTFILES_FILES_FILES GTFILES_FILES_LANGS \
                        GTFILES GTFILES_LANG_DIR_NAMES NOEXCEPTION_FLAGS \
                        NATIVE_SYSTEM_HEADER_DIR \
@@ -380,13 +380,17 @@
 
        # special transforms
        for f in gtyp-input.list; do
-               sed -e 's/^.*external\/gpl3\/gcc\.old\/dist/SRCDIR/' < $_TMPDIR/gcc/$f > $_OUTDIR/usr.bin/$_subdir/arch/$MACHINE_ARCH/$f
+               sed -e 's/^.*external\/gpl3\/gcc\/dist/SRCDIR/' < $_TMPDIR/gcc/$f > $_OUTDIR/usr.bin/$_subdir/arch/$MACHINE_ARCH/$f
        done
 
        # special platforms
        if [ "${MACHINE_ARCH}" = "sh3el" -o "${MACHINE_ARCH}" = "sh3eb" ]; then
                write_c $_OUTDIRBASE/usr.bin/$_subdir/arch/$MACHINE_ARCH/sysroot-suffix.h <$_TMPDIR/gcc/sysroot-suffix.h
        fi
+
+       if [ "${MACHINE_ARCH}" = "i386" -o "${MACHINE_ARCH}" = "x86_64" ]; then
+               write_c $_OUTDIRBASE/usr.bin/$_subdir/arch/$MACHINE_ARCH/i386-builtin-types.inc <$_TMPDIR/gcc/i386-builtin-types.inc
+       fi
 }
 
 ##### main #####
@@ -397,7 +401,6 @@
 libgcc*-bootstrap)
        get_libgcc gcc
        get_libgcov gcc $_PLATFORM/libgcc/Makefile
-       get_crtstuff crtstuff
        get_gcc_bootstrap gcc
        exit 0
        ;;
@@ -411,7 +414,7 @@
        get_gcc gcc
        get_libgcc gcc
        get_libgcov gcc $_PLATFORM/libgcc/Makefile
-       get_crtstuff crtstuff
+       get_gcc_bootstrap gcc
        get_gcc_libiberty gcc
        get_libobjc libobjc
        get_libstdcxx_v3 libstdc++-v3 gcc



Home | Main Index | Thread Index | Old Index