Module Name: src
Committed By: mrg
Date: Fri Feb 1 09:27:24 UTC 2019
Modified Files:
src/tools/gcc: Makefile mknative-gcc
Log Message:
- 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
To generate a diff of this commit:
cvs rdiff -u -r1.88 -r1.89 src/tools/gcc/Makefile
cvs rdiff -u -r1.96 -r1.97 src/tools/gcc/mknative-gcc
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tools/gcc/Makefile
diff -u src/tools/gcc/Makefile:1.88 src/tools/gcc/Makefile:1.89
--- src/tools/gcc/Makefile:1.88 Sat Jan 19 12:58:37 2019
+++ src/tools/gcc/Makefile Fri Feb 1 09:27:23 2019
@@ -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 @@ COMMON_CONFIGURE_ARGS= --target=${MACHIN
--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-arch=${GC
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_TARGET= gcc6
MKNATIVE_CONFIG_TARGET_LIBS+= \
configure-target-libstdc++-v3 \
+ configure-target-libbacktrace \
configure-target-libobjc
BINENV= /usr/bin/env -i
@@ -105,7 +109,7 @@ MKNATIVE_ENV= ${BINENV} ${CONFIGURE_ENV:
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 @@ NATIVE_CONFIGURE_ARGS+= \
--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 \
Index: src/tools/gcc/mknative-gcc
diff -u src/tools/gcc/mknative-gcc:1.96 src/tools/gcc/mknative-gcc:1.97
--- src/tools/gcc/mknative-gcc:1.96 Sat Jan 19 20:02:06 2019
+++ src/tools/gcc/mknative-gcc Fri Feb 1 09:27:23 2019
@@ -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 @@ get_libbacktrace () {
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 @@ get_libstdcxx_v3 () {
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 \