more consolidation and properly condition all variables like previously.

This commit is contained in:
mrg 2020-09-09 07:12:04 +00:00
parent 949f2e0433
commit d875c5372c

View File

@ -1,5 +1,5 @@
#!/bin/sh
# $NetBSD: mknative-gcc,v 1.111 2020/09/09 04:52:32 mrg Exp $
# $NetBSD: mknative-gcc,v 1.112 2020/09/09 07:12:04 mrg Exp $
#
# Shell script for generating all the constants needed for a native
# platform build of gcc.
@ -226,14 +226,16 @@ get_libstdcxx_v3 () {
mkdir -p $_OUTDIR/lib/$_subdir/arch/$_MACHINE_ARCH
_build_headers="c++config.h cxxabi_tweaks.h"
_headers1="backward_headers c_base_headers_extra c_base_headers_extra_install"
_headers1="$_headers1 tr1_headers tr2_headers decimal_headers c_compatibility_headers_install"
_headers1="backward_headers c_base_headers_extra"
_headers1="$_headers1 c_base_headers_extra_install"
_headers1="$_headers1 tr1_headers tr2_headers"
_headers1="$_headers1 decimal_headers c_compatibility_headers_install"
_headers1="$_headers1 debug_headers parallel_headers"
_headers1="$_headers1 pb_headers1 pb_headers2 pb_headers3 pb_headers4"
_headers1="$_headers1 pb_headers5 pb_headers6 pb_headers7"
# These subdirs get the subdir removed from the values.
_headers2="bits_headers ext_headers host_headers thread_host_headers pstl_headers"
_headers2="$_headers2 profile_headers profile_impl_headers"
_headers1="$_headers1 bits_headers ext_headers host_headers"
_headers1="$_headers1 thread_host_headers pstl_headers"
_headers1="$_headers1 profile_headers profile_impl_headers"
# build files
for h in $_build_headers; do
@ -289,10 +291,8 @@ get_libstdcxx_v3 () {
# includes
getvars $_PLATFORM/libstdc++-v3/include/Makefile \
$_headers1 | \
sed -e 's#\${GNUHOSTDIST}/libstdc++-v3/include/##g'
getvars $_PLATFORM/libstdc++-v3/include/Makefile \
$_headers2 | \
sed -e 's#\${GNUHOSTDIST}/libstdc++-v3/[^/][^/]*/##g'
sed -e 's#\${GNUHOSTDIST}/libstdc++-v3/include/##g' \
-e 's#\${GNUHOSTDIST}/libstdc++-v3/config/##g'
getvars $_PLATFORM/libstdc++-v3/include/Makefile \
BASIC_FILE_H ALLOCATOR_H CSTDIO_H CLOCALE_H CMESSAGES_H CTIME_H
} | sanitise_includes \