- 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
This commit is contained in:
mrg 2016-03-15 21:38:32 +00:00
parent c53665cd03
commit df62ea31af
2 changed files with 23 additions and 5 deletions

View File

@ -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+= --with-tune=${GCC_CONFIG_TUNE.${MACHINE_ARCH}}
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+= --enable-initfini-array
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 @@ MKENV_BUILD_MAKE=cd .native && ${MKNATIVE_ENV} ${BUILD_MAKE}
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} \

View File

@ -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 @@ get_libstdcxx_v3 () {
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_libstdcxx_v3 () {
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 @@ get_gcc () {
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 @@ __EOF__
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 #####