Source-Changes-HG archive

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

[src/trunk]: src/tools/gcc - pull i386-builtin-types.inc automatically on x86



details:   https://anonhg.NetBSD.org/src/rev/683c47bb7c5f
branches:  trunk
changeset: 814293:683c47bb7c5f
user:      mrg <mrg%NetBSD.org@localhost>
date:      Tue Mar 15 21:38:32 2016 +0000

description:
- pull i386-builtin-types.inc automatically on x86
- reenable cxx rt support
- don't grab insn-modes.h, we build it
- rename the c98 and c11 subdir codecvt.cc files while extracting
  them with mknative
- grab GGC_H as well, and use it in dependency lists

diffstat:

 tools/gcc/Makefile     |  13 ++++++++++++-
 tools/gcc/mknative-gcc |  15 +++++++++++----
 2 files changed, 23 insertions(+), 5 deletions(-)

diffs (95 lines):

diff -r 20f16b5c23cb -r 683c47bb7c5f tools/gcc/Makefile
--- a/tools/gcc/Makefile        Tue Mar 15 19:21:27 2016 +0000
+++ b/tools/gcc/Makefile        Tue Mar 15 21:38:32 2016 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.77 2016/03/13 01:06:51 mrg Exp $
+#      $NetBSD: Makefile,v 1.78 2016/03/15 21:38:32 mrg Exp $
 
 .include <bsd.own.mk>
 
@@ -48,6 +48,10 @@
 COMMON_CONFIGURE_ARGS+= --enable-libstdcxx-time=rt --enable-lto
 .endif
 
+.if ${HAVE_GCC} == 53
+COMMON_CONFIGURE_ARGS+= --enable-libstdcxx-time=rt
+.endif
+
 CONFIGURE_ARGS=        ${COMMON_CONFIGURE_ARGS}
 CONFIGURE_ARGS+= \
                --with-sysroot=${DESTDIR} \
@@ -178,6 +182,10 @@
 NATIVE_CONFIGURE_ARGS+= --disable-shared
 .endif
 
+.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
+EXTRA_GCC_TARGETS=     i386-builtin-types.inc
+.endif
+
 NATIVE_CONFIGURE_ARGS+=        \
                        --disable-multilib \
                        --disable-symvers \
@@ -211,6 +219,9 @@
        PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
                (cd .native/gcc && ${MKNATIVE_ENV} ${BUILD_MAKE} -e libgcc.mvars tconfig.h unwind.h); \
                (cd .native && touch gcc/cc1obj gcc/cc1plus gcc/f771 gcc/libgcc.a gcc/libgcc_s.so)
+.if !empty(${EXTRA_GCC_TARGETS})
+               (cd .native/gcc && ${MKNATIVE_ENV} ${BUILD_MAKE} -e ${EXTRA_GCC_TARGETS})
+.endif
 .for _lib in ${MKNATIVE_CONFIG_TARGET_LIBS}
        PATH=${TOOLDIR}/bin:$$PATH; export PATH; \
                (cd .native && ${MKNATIVE_ENV} ${BUILD_MAKE} \
diff -r 20f16b5c23cb -r 683c47bb7c5f tools/gcc/mknative-gcc
--- a/tools/gcc/mknative-gcc    Tue Mar 15 19:21:27 2016 +0000
+++ b/tools/gcc/mknative-gcc    Tue Mar 15 21:38:32 2016 +0000
@@ -1,5 +1,5 @@
 #!/bin/sh
-#      $NetBSD: mknative-gcc,v 1.84 2016/03/15 06:10:13 mrg Exp $
+#      $NetBSD: mknative-gcc,v 1.85 2016/03/15 21:38:32 mrg Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of gcc.
@@ -248,11 +248,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 \
                        GLIBCXX_ABI_FLAGS libc__98convenience_la_SOURCES | \
                        sed -e 's/^G_libc__98convenience_la_SOURCES=/G_CPP98_SOURCES=/' \
-                           -e 's/locale_init.cc//' -e 's/localename.cc//'
+                           -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 \
@@ -279,7 +281,7 @@
 get_gcc_bootstrap () {
        _subdir="$1"
        mkdir -p $_OUTDIR/usr.bin/$_subdir/arch/$MACHINE_ARCH
-       for f in auto-host tm config insn-modes; do
+       for f in auto-host tm config; do
                write_c $_OUTDIRBASE/usr.bin/$_subdir/arch/$MACHINE_ARCH/$f.h <$_TMPDIR/gcc/$f.h
        done
 }
@@ -312,6 +314,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 \
@@ -392,6 +395,10 @@
        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 #####



Home | Main Index | Thread Index | Old Index