History log of /netbsd-current/tools/gcc/mknative-gcc
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.118 21-Feb-2024 mrg

fetch G_CPP20_SOURCES.


# 1.117 31-Jul-2023 mrg

updates for GCC 12 (relatively tiny).

- gcov-iov.h is now called version.h and we build it directly.
- need to explicitly ask for bversion.h gtyp-input.list to be built.


Revision tags: netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base
# 1.116 22-Jul-2022 mrg

don't rename codecvt.cc here, do it in a Makefile when consumed.

since the Makefiles already need updates for these, it's easier
if all of the changes are there.


# 1.115 16-Aug-2021 mrg

fetch experimental_headers, experimental_bits_headers, and ext_host_headers
to install install experimental/* and ext/opt_random.h.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.114 11-Apr-2021 mrg

fetch omp-device-properties.h and don't try to fetch sanitizer
stuff automatically yet.


# 1.113 11-Apr-2021 mrg

make mknative-gcc.old for GCC 9. begin to update mknative-gcc for GCC 10.


# 1.112 09-Sep-2020 mrg

more consolidation and properly condition all variables like previously.


# 1.111 09-Sep-2020 mrg

consolidate a bunch of libstdc++ variable collection.


# 1.110 08-Sep-2020 mrg

oops, pull out the value of pstl_headers.


# 1.109 06-Sep-2020 mrg

pass down earm* not earmv5* to mknative-gcc.


# 1.108 05-Sep-2020 mrg

disable fetching stuff from libsanitizer for now. it needs libstdc++
to build in mknative using gcc makefiles, and our locale changes break
the "normal" build of this.

make sure MKNATIVE_TARGET is always set. since mknative-gcc doesn't
care about the version any more (we keep two versions for gcc/gcc.old)
simply set it to "gcc".


# 1.107 05-Sep-2020 mrg

pull out a few more things for GCC 9.


# 1.106 05-Sep-2020 mrg

port to GCC 9.3.


# 1.105 13-Aug-2020 mrg

set _OUTDIRBASE depending on $0, and then set _OUTDIR based on this.
now you can copy mknative-gcc to mknative-gcc.old without edit.


# 1.104 12-Aug-2020 mrg

mknative-gcc is for GCC 8.4.
mknative-gcc.old is supposed to be for GCC 7, but is the GCC 6
version. update it and mark it for GCC 7.5.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 phil-wifi-20191119
# 1.103 24-Oct-2019 christos

arm needs more files


# 1.102 16-Oct-2019 mrg

copy arm-cpu.h and arm-isa.h for arm platforms.


Revision tags: netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 netbsd-9-base phil-wifi-20190609
# 1.101 23-Feb-2019 mrg

branches: 1.101.2;
pull out libstdc++ config.h as-is, for gnu.ver processing.
pull out the cxx11_sources and cxx98_sources values to avoid hard coding.


# 1.100 09-Feb-2019 mrg

- build the gthr*.h files to be installed on the fly, instead of
having dozens of copies of the same thing in the tree.
- don't fetch any gthr*.h files.
- delete ancient gthr-tpf.h that was removed in GCC 4.8 or so.

this should fix the call_once tests for real now.


# 1.99 04-Feb-2019 mrg

common-target source list is MD. make it so.


# 1.98 04-Feb-2019 mrg

- don't getlinks here, they're no longer used.
- pullout the libcommon, libcommon-target and libgomp source list so they
don't have to be hard coded in the reachover makefile


# 1.97 01-Feb-2019 mrg

- 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


Revision tags: pgoyette-compat-20190127
# 1.96 19-Jan-2019 mrg

make includes works now.

pull out more data needed for headers and fix gthr-defaults.h.

libgcc_s has multiple symbols.


# 1.95 19-Jan-2019 mrg

also pull out these variables:
enable_execute_stack
unwind_header
md_unwind_header
sfp_machine_header
thread_header


Revision tags: pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906
# 1.94 04-Sep-2018 mrg

also pullout INTERNAL_CFLAGS for the libgcc build, where it may have
-DHAVE_CC_TLS defined on the command line. (we already collect all
the other components.)


# 1.93 04-Sep-2018 mrg

in configargs.h, as well as normalising to /usr/src, normalise the
--build to the same as the --host, so that it never changes based
upon the host you ran mknative on. (some recent changes are only
because i updated a system from netbsd-7 to netbsd-8. this will
avoid that in the future.)


Revision tags: pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.92 06-Feb-2018 mrg

branches: 1.92.2; 1.92.4;
also fetch GCOV_DUMP_OBJS.


# 1.91 03-Feb-2018 mrg

pullout port_specific_symbol_files from libstdc++.


# 1.90 04-Oct-2017 christos

use the variable for the source dir instead of duplicating it.


Revision tags: perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104
# 1.89 05-Oct-2016 christos

branches: 1.89.6;
revert our changes; softfloat removal is now done in libgcc/config.host


# 1.88 05-Oct-2016 christos

We provide our own soft-float implementation in libc, so elide the libgcc
sources for it.


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.87 17-Mar-2016 mrg

branches: 1.87.2;
set NETBSD_GCC_VERSION for GCC 5.3 separately.
don't collect crtstuff anymore.


# 1.86 16-Mar-2016 mrg

grab insn-modes.h, and do the libgcc bootstrap from gcc as well.


# 1.85 15-Mar-2016 mrg

- 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


# 1.84 15-Mar-2016 mrg

update for GCC 5.3 libgcov and libstdc++


# 1.83 15-Mar-2016 mrg

very first baby steps towards GCC 5.3 mknative.


# 1.82 24-Jan-2016 mrg

add a comment saying this is for GCC 4.8


# 1.81 31-Jan-2015 mrg

kill the -fPIC that m68000 ends up with, fixing it in the specs
is not trivial..


# 1.80 30-Jan-2015 mrg

canonicalise the src dir to /usr/src, so it doesn't matter
where we run mknative.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.79 29-May-2014 skrll

Don't grab libstdc++-v3/config.h it's not used.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
# 1.78 02-Mar-2014 mrg

branches: 1.78.2;
don't collect gthr-default.h anymore.


# 1.77 02-Mar-2014 mrg

don't collect c++allocator.h. we copy it via G_ALLOCATOR_H we've
already pulled out, and the extra copy can confuse make when it
has an older timestamp than the copy in dist/libstdc++-v3/.


# 1.76 26-Feb-2014 mrg

prepare for moving GCC 4.5 into gcc.old:

- convert to using ${EXTERNAL_GCC_SUBDIR}
- define base-external-gpl3-gcc* subdir as GCC_SUBDIR
- use <bsd.init.mk> over <bsd.own.mk> for a bunch of places; mostly
because it arranges for ../Makefile.inc to be included earlier, and
don't bother including the latter if the former is already included.
- move all .PATH: settings after <bsd.{own,lib}.mk> so that all
valid variables are set before it is evaluated
- rename mknative-gcc* to match their subdir name.

XXX the relationship between the Makefile.inc/Makefile.gcc_path files
is kind of sketchy, it would be great if this was fixed.


# 1.75 16-Feb-2014 skrll

The mpfr sources moved down into a src directory - deal with this in
mknative.


# 1.74 28-Nov-2013 mrg

update to MPC 1.0.1.


# 1.73 20-Oct-2013 skrll

Deleted 1 line too many in previous commit.


# 1.72 20-Oct-2013 skrll

g/c gcc3 goop


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.71 28-Jun-2013 mrg

pass both NEWCONFIGDIR and NETBSDSRCDIR to mknative-gcc.


# 1.70 05-May-2013 skrll

Create a sanitise_includes function and use it everywhere it's needed.


# 1.69 25-Apr-2013 skrll

Avoid populating mknative output with gmp,mpfr, and mpc source
directories


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.68 25-Sep-2012 skrll

More tweaks. I didn't manage to complete a mknative from scratch run, but
this is a step in the right direction.


# 1.67 11-Aug-2012 skrll

branches: 1.67.2;
Grab CRTSTUFF_T_CFLAGS_S.

Gentlement start your mknative runs.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base
# 1.66 10-Jan-2012 skrll

Fix bootstrap-libgcc for gcc 4.5


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.65 13-Oct-2011 matt

branches: 1.65.2;
Fix PPC _SOFT_FLOAT


# 1.64 23-Sep-2011 mrg

since omp.h is part of libgomp, put it in the libgomp files not the
libstdc++ files.


# 1.63 21-Sep-2011 mrg

add libgomp support. needed by "cc -fopenmp", that koffice 2.3 wants to use.


# 1.62 17-Aug-2011 matt

Add an inline ex script to modify configargs.h for powerpc to auto-enable
-msoft-float.


# 1.61 03-Jul-2011 mrg

fix the previous


# 1.60 03-Jul-2011 mrg

-I$DESTDIR/usr/include is escaping into the generated files from
the native-gcc run. add some sed commands to remove them.


# 1.59 03-Jul-2011 mrg

copy sysroot-suffix.h as well, for sh3.


# 1.58 02-Jul-2011 mrg

also pull out LIB2ADD_ST for libgcc.


# 1.57 01-Jul-2011 mrg

avoid creating an unused directory.


# 1.56 01-Jul-2011 mrg

- call each ${MKNATIVE_CONFIG_TARGET_LIBS} target separately
- comment out maybe-all-target-libgcc
- cope with the special transformation needed for gtyp-input.list


# 1.55 30-Jun-2011 mrg

fix previous; they belong in _headers1


# 1.54 30-Jun-2011 mrg

also pull tr1_impl_headers parallel_headers and decimal_headers for libstdc++


# 1.53 29-Jun-2011 mrg

fix all-tree.def, and add gtyp-input.list


# 1.52 29-Jun-2011 mrg

fix the path for libdecnumber.


# 1.51 29-Jun-2011 mrg

get libdecnumber info out of GCC.


# 1.50 28-Jun-2011 mrg

also need bversion.h


# 1.49 28-Jun-2011 mrg

some more updates for GCC 4.5.


# 1.48 23-Jun-2011 mrg

output stuff to the right libiberty dir for gcc 4.5.


# 1.47 23-Jun-2011 mrg

get this some what working with GCC 4.5. i at least have managed to
get crtstuff and libgcc to build for amd64, and have linked and tested
/bin/sh with all these GCC 4.5 compiled part.


# 1.46 21-Jun-2011 mrg

initial port to HAVE_GCC = 45. mknative-gcc parts are from me
and are largely untested, most of the rest is from chuq.


Revision tags: cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.45 17-Dec-2009 uebayasi

branches: 1.45.4;
get_libgcc_new: Make previous work for digit only ABI names.


# 1.44 17-Dec-2009 uebayasi

get_libgcc_new: Teach multilib.


Revision tags: matt-premerge-20091211
# 1.43 01-Dec-2009 uebayasi

Skip parameters for multilib build for now.


# 1.42 01-Dec-2009 uebayasi

Handle cases where *.asm is listed in LIB2FUNCS_EXTRA (gcc/config/rs6000).


# 1.41 30-Nov-2009 uebayasi

Handle cases where database text files don't exist.


# 1.40 30-Nov-2009 uebayasi

Call "template sources" as "tmplsrcs", not "tmpsrcs". Requested by mrg@.


# 1.39 30-Nov-2009 uebayasi

Prefix per-library *.mk files with libs.*.


# 1.38 30-Nov-2009 uebayasi

Now that we know what sources are needed to build a given library, we need
the rules how to build those sources. Generate makefiles defining ${COPTS},
${CPPFLAGS}, and ${SRCS} (== template).

Note that ${CPPFLAGS} is actually dfined as _CPPFLAGS like
_CPPFLAGS.tmp___gcc_bcmp.c=-DL__gcc_bcmp
and used to generate wrapper files (e.g. tmp___gcc_bcmp.c). Otherwise it's
automagically passed to ${CC} by bsd.*.mk.


# 1.37 30-Nov-2009 uebayasi

For each library, generate a makefile of the list of template sources too.


# 1.36 30-Nov-2009 uebayasi

For each library, generate a list of sources (*.[cS]).

We create wrapper sources (tmp_*.[cS]) on-the-fly and compile them. For
example, __gcc_bcmp() is compiled using tmp___gcc_bcmp.c, which #define's
L__gcc_bcmp and #include's libgcc2.c.


# 1.35 30-Nov-2009 uebayasi

Move these analyzing functions into one place, get_libgcc_new_analyze().


# 1.34 30-Nov-2009 uebayasi

Typo.


# 1.33 30-Nov-2009 uebayasi

Generate lists of template sources ("tmpsrcs") for each libraries. We'll
need these to create wrappers of tmpsrcs and define correct dependencies.


# 1.32 30-Nov-2009 uebayasi

Generate *.o -> template *.[cS] ("tmpsrc") mapping.

Functions are built from a template (tmpsrc). We create wrapper sources
(src) and define necessary defines and #include tmpsrc.


# 1.31 30-Nov-2009 uebayasi

- Generate a list of CPP flags used to build *.o. Some files are build
repeatedly with different -DXXX to generate similar objects (e.g. different
type size).

- Generate a list of other CC options to build *.o.

(See my sed-fu using hold space in get_libgcc_list_objs_xflags().)


# 1.30 30-Nov-2009 uebayasi

- Generate a list of *.o -> lib*.{a,so} mapping. This is also known by
parsing dependency lines in libgcc.mk.

- Generate a list of *.o -> *.{c,S} mapping. *.S files are known as
${LIB1ASMFUNCS}. Assume other *.o files are built from *.c. This information
is needed to generated wrapper sources later.


# 1.29 30-Nov-2009 uebayasi

Generate lists of functions built in libgcc libraries. This is known by
pattern matching dependency lines in libgcc.mk.


# 1.28 30-Nov-2009 uebayasi

Generate a list of functions provided as *.S.


# 1.27 30-Nov-2009 uebayasi

Define paths of newly generated files.


# 1.26 30-Nov-2009 uebayasi

Start implementing the new style libgcc "mknative" converter which generates
BSD makefiles to build libgcc. The goal is to build all functions rather
than managing the set of functions in gnu/lib/libgcc/Makefile.in by hand.

Because of the complexity of the build procedure, I leave not only generated
makefiles but also intermediate, analyzed data so that people can verify that
the conversion is done correctly.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE jym-xensuspend-nbase netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2
# 1.25 11-Oct-2008 mrg

- add a i386/t-netbsd64 makefile fragment to build 32/64 bit
libgcc/multilib on amd64
- enable the 32/64 bit libgcc/multilib support on sparc64
- adapt mknative-gcc to grab multilib.h
- use --enable-multilib on amd64 and sparc64

none of this affects the installed tools yet, just the src/tools one.


# 1.24 19-Sep-2008 skrll

Grab libgcov stuff.


Revision tags: wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase hpcarm-cleanup-base
# 1.23 08-Feb-2008 skrll

Collect the libobjc config.h


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-4-base
# 1.22 25-Jun-2006 mrg

branches: 1.22.4; 1.22.10;
convert build/ggc-none.o to build-ggc-none.lo.


# 1.21 24-Jun-2006 mrg

also grab ${_extravars} for GCC4 in the get_gcc() function.


# 1.20 09-Jun-2006 skrll

Fixes for mknative runs on gcc3.

- get the information from a gcc3 .native
- don't get gcc4 variables
- put back the getvars for SHLIB_LINK SHLIB_MULTILIB as they work
on gcc3 and leave as XXX'd on gcc4.

I've re-arranged some of the variables to minimise the differences, but
didn't do them all.


# 1.19 02-Jun-2006 mrg

make this work for GCC3 one again.


# 1.18 23-May-2006 mrg

also grab ALL_OPT_FILES from gcc/Makefile for libobjc4.


# 1.17 15-May-2006 mrg

make sure that c++ headers work again.


# 1.16 12-May-2006 mrg

support GCC4:
- look in gnu/dist/gcc4
- don't build fortran
- use /usr/bin/env -i so that gmake works (XXX - breaks from MAKEFLAGS
in the build.sh generated makewrapper.)
- use gmake and Makefile.gmakehost
- update .native/.configure_done target


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-3-base
# 1.15 10-Dec-2004 mrg

mirror a fix from mknative-binutils:
>fix the sed expression that pulls VPATH out of the makefile to work
>with any number of tabs or spaces after the equal sign.


# 1.14 24-Aug-2004 thorpej

Add code to extract make vars for GCC crtstuff.


# 1.13 01-Jul-2004 skrll

Add some more variables used to build libgcc_s.

Part of the fix for PR 22452.


Revision tags: netbsd-2-0-base
# 1.12 10-Feb-2004 skrll

branches: 1.12.2;
Updates so that mknative gets the right things.

- Disable symbol versioning (for now)
- Make sure that libiberty knows its being configured with a
cross compiler.
- The CXX_* variables are no longer needed/used.
- LIB2FUNCS_EXTRA gets pulled in via LIB2ADD
- Get LIB1ASMFUNCS and LIB2ASMSRC
- MAYBE_USE_COLLECT2 got renamed to USE_COLLECT2 (but might not
be used)
- Get EXTRA_HEADERS so that we get generate the right paths for
CPPFLAGS
- Get some variables related to shared libgcc


# 1.11 02-Jan-2004 skrll

Move libgcc3/*.mk to libgcc3/arch.

Update mknative-gcc.


# 1.10 27-Nov-2003 mrg

fix a comment; normalise.


# 1.9 27-Nov-2003 mrg

use mknative.common


# 1.8 27-Nov-2003 mrg

be a little more verbose about what we're doing when running mknative.
also grab LIB2FUNCS_EXTRA for libgcc3 (old fix for m68000).


# 1.7 22-Aug-2003 mrg

don't want auto-build.h anymore


# 1.6 01-Aug-2003 mrg

we need config.h an another version of gthr-default.h


# 1.5 30-Jul-2003 mrg

fix a typo in previous


# 1.4 30-Jul-2003 mrg

libiberty/config.h needs to become per-arch.


# 1.3 28-Jul-2003 mrg

fix a bug in previous - two $'s are bad


# 1.2 28-Jul-2003 mrg

add another transform for libobjc3


# 1.1 25-Jul-2003 mrg

- build "binutils" and "gcc" separately if USE_TOOLS_TOOLCHAIN is not set
to "yes".
- adjust dbsym/mdsetimage to look in the correct place for libbfd.
- new mknative-gcc based in toolchain/mknative


# 1.117 31-Jul-2023 mrg

updates for GCC 12 (relatively tiny).

- gcov-iov.h is now called version.h and we build it directly.
- need to explicitly ask for bversion.h gtyp-input.list to be built.


Revision tags: netbsd-10-base
# 1.116 22-Jul-2022 mrg

don't rename codecvt.cc here, do it in a Makefile when consumed.

since the Makefiles already need updates for these, it's easier
if all of the changes are there.


# 1.115 16-Aug-2021 mrg

fetch experimental_headers, experimental_bits_headers, and ext_host_headers
to install install experimental/* and ext/opt_random.h.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.114 11-Apr-2021 mrg

fetch omp-device-properties.h and don't try to fetch sanitizer
stuff automatically yet.


# 1.113 11-Apr-2021 mrg

make mknative-gcc.old for GCC 9. begin to update mknative-gcc for GCC 10.


# 1.112 09-Sep-2020 mrg

more consolidation and properly condition all variables like previously.


# 1.111 09-Sep-2020 mrg

consolidate a bunch of libstdc++ variable collection.


# 1.110 08-Sep-2020 mrg

oops, pull out the value of pstl_headers.


# 1.109 06-Sep-2020 mrg

pass down earm* not earmv5* to mknative-gcc.


# 1.108 05-Sep-2020 mrg

disable fetching stuff from libsanitizer for now. it needs libstdc++
to build in mknative using gcc makefiles, and our locale changes break
the "normal" build of this.

make sure MKNATIVE_TARGET is always set. since mknative-gcc doesn't
care about the version any more (we keep two versions for gcc/gcc.old)
simply set it to "gcc".


# 1.107 05-Sep-2020 mrg

pull out a few more things for GCC 9.


# 1.106 05-Sep-2020 mrg

port to GCC 9.3.


# 1.105 13-Aug-2020 mrg

set _OUTDIRBASE depending on $0, and then set _OUTDIR based on this.
now you can copy mknative-gcc to mknative-gcc.old without edit.


# 1.104 12-Aug-2020 mrg

mknative-gcc is for GCC 8.4.
mknative-gcc.old is supposed to be for GCC 7, but is the GCC 6
version. update it and mark it for GCC 7.5.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 phil-wifi-20191119
# 1.103 24-Oct-2019 christos

arm needs more files


# 1.102 16-Oct-2019 mrg

copy arm-cpu.h and arm-isa.h for arm platforms.


Revision tags: netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 netbsd-9-base phil-wifi-20190609
# 1.101 23-Feb-2019 mrg

branches: 1.101.2;
pull out libstdc++ config.h as-is, for gnu.ver processing.
pull out the cxx11_sources and cxx98_sources values to avoid hard coding.


# 1.100 09-Feb-2019 mrg

- build the gthr*.h files to be installed on the fly, instead of
having dozens of copies of the same thing in the tree.
- don't fetch any gthr*.h files.
- delete ancient gthr-tpf.h that was removed in GCC 4.8 or so.

this should fix the call_once tests for real now.


# 1.99 04-Feb-2019 mrg

common-target source list is MD. make it so.


# 1.98 04-Feb-2019 mrg

- don't getlinks here, they're no longer used.
- pullout the libcommon, libcommon-target and libgomp source list so they
don't have to be hard coded in the reachover makefile


# 1.97 01-Feb-2019 mrg

- 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


Revision tags: pgoyette-compat-20190127
# 1.96 19-Jan-2019 mrg

make includes works now.

pull out more data needed for headers and fix gthr-defaults.h.

libgcc_s has multiple symbols.


# 1.95 19-Jan-2019 mrg

also pull out these variables:
enable_execute_stack
unwind_header
md_unwind_header
sfp_machine_header
thread_header


Revision tags: pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906
# 1.94 04-Sep-2018 mrg

also pullout INTERNAL_CFLAGS for the libgcc build, where it may have
-DHAVE_CC_TLS defined on the command line. (we already collect all
the other components.)


# 1.93 04-Sep-2018 mrg

in configargs.h, as well as normalising to /usr/src, normalise the
--build to the same as the --host, so that it never changes based
upon the host you ran mknative on. (some recent changes are only
because i updated a system from netbsd-7 to netbsd-8. this will
avoid that in the future.)


Revision tags: pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.92 06-Feb-2018 mrg

branches: 1.92.2; 1.92.4;
also fetch GCOV_DUMP_OBJS.


# 1.91 03-Feb-2018 mrg

pullout port_specific_symbol_files from libstdc++.


# 1.90 04-Oct-2017 christos

use the variable for the source dir instead of duplicating it.


Revision tags: perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104
# 1.89 05-Oct-2016 christos

branches: 1.89.6;
revert our changes; softfloat removal is now done in libgcc/config.host


# 1.88 05-Oct-2016 christos

We provide our own soft-float implementation in libc, so elide the libgcc
sources for it.


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.87 17-Mar-2016 mrg

branches: 1.87.2;
set NETBSD_GCC_VERSION for GCC 5.3 separately.
don't collect crtstuff anymore.


# 1.86 16-Mar-2016 mrg

grab insn-modes.h, and do the libgcc bootstrap from gcc as well.


# 1.85 15-Mar-2016 mrg

- 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


# 1.84 15-Mar-2016 mrg

update for GCC 5.3 libgcov and libstdc++


# 1.83 15-Mar-2016 mrg

very first baby steps towards GCC 5.3 mknative.


# 1.82 24-Jan-2016 mrg

add a comment saying this is for GCC 4.8


# 1.81 31-Jan-2015 mrg

kill the -fPIC that m68000 ends up with, fixing it in the specs
is not trivial..


# 1.80 30-Jan-2015 mrg

canonicalise the src dir to /usr/src, so it doesn't matter
where we run mknative.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.79 29-May-2014 skrll

Don't grab libstdc++-v3/config.h it's not used.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
# 1.78 02-Mar-2014 mrg

branches: 1.78.2;
don't collect gthr-default.h anymore.


# 1.77 02-Mar-2014 mrg

don't collect c++allocator.h. we copy it via G_ALLOCATOR_H we've
already pulled out, and the extra copy can confuse make when it
has an older timestamp than the copy in dist/libstdc++-v3/.


# 1.76 26-Feb-2014 mrg

prepare for moving GCC 4.5 into gcc.old:

- convert to using ${EXTERNAL_GCC_SUBDIR}
- define base-external-gpl3-gcc* subdir as GCC_SUBDIR
- use <bsd.init.mk> over <bsd.own.mk> for a bunch of places; mostly
because it arranges for ../Makefile.inc to be included earlier, and
don't bother including the latter if the former is already included.
- move all .PATH: settings after <bsd.{own,lib}.mk> so that all
valid variables are set before it is evaluated
- rename mknative-gcc* to match their subdir name.

XXX the relationship between the Makefile.inc/Makefile.gcc_path files
is kind of sketchy, it would be great if this was fixed.


# 1.75 16-Feb-2014 skrll

The mpfr sources moved down into a src directory - deal with this in
mknative.


# 1.74 28-Nov-2013 mrg

update to MPC 1.0.1.


# 1.73 20-Oct-2013 skrll

Deleted 1 line too many in previous commit.


# 1.72 20-Oct-2013 skrll

g/c gcc3 goop


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.71 28-Jun-2013 mrg

pass both NEWCONFIGDIR and NETBSDSRCDIR to mknative-gcc.


# 1.70 05-May-2013 skrll

Create a sanitise_includes function and use it everywhere it's needed.


# 1.69 25-Apr-2013 skrll

Avoid populating mknative output with gmp,mpfr, and mpc source
directories


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.68 25-Sep-2012 skrll

More tweaks. I didn't manage to complete a mknative from scratch run, but
this is a step in the right direction.


# 1.67 11-Aug-2012 skrll

branches: 1.67.2;
Grab CRTSTUFF_T_CFLAGS_S.

Gentlement start your mknative runs.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base
# 1.66 10-Jan-2012 skrll

Fix bootstrap-libgcc for gcc 4.5


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.65 13-Oct-2011 matt

branches: 1.65.2;
Fix PPC _SOFT_FLOAT


# 1.64 23-Sep-2011 mrg

since omp.h is part of libgomp, put it in the libgomp files not the
libstdc++ files.


# 1.63 21-Sep-2011 mrg

add libgomp support. needed by "cc -fopenmp", that koffice 2.3 wants to use.


# 1.62 17-Aug-2011 matt

Add an inline ex script to modify configargs.h for powerpc to auto-enable
-msoft-float.


# 1.61 03-Jul-2011 mrg

fix the previous


# 1.60 03-Jul-2011 mrg

-I$DESTDIR/usr/include is escaping into the generated files from
the native-gcc run. add some sed commands to remove them.


# 1.59 03-Jul-2011 mrg

copy sysroot-suffix.h as well, for sh3.


# 1.58 02-Jul-2011 mrg

also pull out LIB2ADD_ST for libgcc.


# 1.57 01-Jul-2011 mrg

avoid creating an unused directory.


# 1.56 01-Jul-2011 mrg

- call each ${MKNATIVE_CONFIG_TARGET_LIBS} target separately
- comment out maybe-all-target-libgcc
- cope with the special transformation needed for gtyp-input.list


# 1.55 30-Jun-2011 mrg

fix previous; they belong in _headers1


# 1.54 30-Jun-2011 mrg

also pull tr1_impl_headers parallel_headers and decimal_headers for libstdc++


# 1.53 29-Jun-2011 mrg

fix all-tree.def, and add gtyp-input.list


# 1.52 29-Jun-2011 mrg

fix the path for libdecnumber.


# 1.51 29-Jun-2011 mrg

get libdecnumber info out of GCC.


# 1.50 28-Jun-2011 mrg

also need bversion.h


# 1.49 28-Jun-2011 mrg

some more updates for GCC 4.5.


# 1.48 23-Jun-2011 mrg

output stuff to the right libiberty dir for gcc 4.5.


# 1.47 23-Jun-2011 mrg

get this some what working with GCC 4.5. i at least have managed to
get crtstuff and libgcc to build for amd64, and have linked and tested
/bin/sh with all these GCC 4.5 compiled part.


# 1.46 21-Jun-2011 mrg

initial port to HAVE_GCC = 45. mknative-gcc parts are from me
and are largely untested, most of the rest is from chuq.


Revision tags: cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.45 17-Dec-2009 uebayasi

branches: 1.45.4;
get_libgcc_new: Make previous work for digit only ABI names.


# 1.44 17-Dec-2009 uebayasi

get_libgcc_new: Teach multilib.


Revision tags: matt-premerge-20091211
# 1.43 01-Dec-2009 uebayasi

Skip parameters for multilib build for now.


# 1.42 01-Dec-2009 uebayasi

Handle cases where *.asm is listed in LIB2FUNCS_EXTRA (gcc/config/rs6000).


# 1.41 30-Nov-2009 uebayasi

Handle cases where database text files don't exist.


# 1.40 30-Nov-2009 uebayasi

Call "template sources" as "tmplsrcs", not "tmpsrcs". Requested by mrg@.


# 1.39 30-Nov-2009 uebayasi

Prefix per-library *.mk files with libs.*.


# 1.38 30-Nov-2009 uebayasi

Now that we know what sources are needed to build a given library, we need
the rules how to build those sources. Generate makefiles defining ${COPTS},
${CPPFLAGS}, and ${SRCS} (== template).

Note that ${CPPFLAGS} is actually dfined as _CPPFLAGS like
_CPPFLAGS.tmp___gcc_bcmp.c=-DL__gcc_bcmp
and used to generate wrapper files (e.g. tmp___gcc_bcmp.c). Otherwise it's
automagically passed to ${CC} by bsd.*.mk.


# 1.37 30-Nov-2009 uebayasi

For each library, generate a makefile of the list of template sources too.


# 1.36 30-Nov-2009 uebayasi

For each library, generate a list of sources (*.[cS]).

We create wrapper sources (tmp_*.[cS]) on-the-fly and compile them. For
example, __gcc_bcmp() is compiled using tmp___gcc_bcmp.c, which #define's
L__gcc_bcmp and #include's libgcc2.c.


# 1.35 30-Nov-2009 uebayasi

Move these analyzing functions into one place, get_libgcc_new_analyze().


# 1.34 30-Nov-2009 uebayasi

Typo.


# 1.33 30-Nov-2009 uebayasi

Generate lists of template sources ("tmpsrcs") for each libraries. We'll
need these to create wrappers of tmpsrcs and define correct dependencies.


# 1.32 30-Nov-2009 uebayasi

Generate *.o -> template *.[cS] ("tmpsrc") mapping.

Functions are built from a template (tmpsrc). We create wrapper sources
(src) and define necessary defines and #include tmpsrc.


# 1.31 30-Nov-2009 uebayasi

- Generate a list of CPP flags used to build *.o. Some files are build
repeatedly with different -DXXX to generate similar objects (e.g. different
type size).

- Generate a list of other CC options to build *.o.

(See my sed-fu using hold space in get_libgcc_list_objs_xflags().)


# 1.30 30-Nov-2009 uebayasi

- Generate a list of *.o -> lib*.{a,so} mapping. This is also known by
parsing dependency lines in libgcc.mk.

- Generate a list of *.o -> *.{c,S} mapping. *.S files are known as
${LIB1ASMFUNCS}. Assume other *.o files are built from *.c. This information
is needed to generated wrapper sources later.


# 1.29 30-Nov-2009 uebayasi

Generate lists of functions built in libgcc libraries. This is known by
pattern matching dependency lines in libgcc.mk.


# 1.28 30-Nov-2009 uebayasi

Generate a list of functions provided as *.S.


# 1.27 30-Nov-2009 uebayasi

Define paths of newly generated files.


# 1.26 30-Nov-2009 uebayasi

Start implementing the new style libgcc "mknative" converter which generates
BSD makefiles to build libgcc. The goal is to build all functions rather
than managing the set of functions in gnu/lib/libgcc/Makefile.in by hand.

Because of the complexity of the build procedure, I leave not only generated
makefiles but also intermediate, analyzed data so that people can verify that
the conversion is done correctly.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE jym-xensuspend-nbase netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2
# 1.25 11-Oct-2008 mrg

- add a i386/t-netbsd64 makefile fragment to build 32/64 bit
libgcc/multilib on amd64
- enable the 32/64 bit libgcc/multilib support on sparc64
- adapt mknative-gcc to grab multilib.h
- use --enable-multilib on amd64 and sparc64

none of this affects the installed tools yet, just the src/tools one.


# 1.24 19-Sep-2008 skrll

Grab libgcov stuff.


Revision tags: wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase hpcarm-cleanup-base
# 1.23 08-Feb-2008 skrll

Collect the libobjc config.h


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-4-base
# 1.22 25-Jun-2006 mrg

branches: 1.22.4; 1.22.10;
convert build/ggc-none.o to build-ggc-none.lo.


# 1.21 24-Jun-2006 mrg

also grab ${_extravars} for GCC4 in the get_gcc() function.


# 1.20 09-Jun-2006 skrll

Fixes for mknative runs on gcc3.

- get the information from a gcc3 .native
- don't get gcc4 variables
- put back the getvars for SHLIB_LINK SHLIB_MULTILIB as they work
on gcc3 and leave as XXX'd on gcc4.

I've re-arranged some of the variables to minimise the differences, but
didn't do them all.


# 1.19 02-Jun-2006 mrg

make this work for GCC3 one again.


# 1.18 23-May-2006 mrg

also grab ALL_OPT_FILES from gcc/Makefile for libobjc4.


# 1.17 15-May-2006 mrg

make sure that c++ headers work again.


# 1.16 12-May-2006 mrg

support GCC4:
- look in gnu/dist/gcc4
- don't build fortran
- use /usr/bin/env -i so that gmake works (XXX - breaks from MAKEFLAGS
in the build.sh generated makewrapper.)
- use gmake and Makefile.gmakehost
- update .native/.configure_done target


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-3-base
# 1.15 10-Dec-2004 mrg

mirror a fix from mknative-binutils:
>fix the sed expression that pulls VPATH out of the makefile to work
>with any number of tabs or spaces after the equal sign.


# 1.14 24-Aug-2004 thorpej

Add code to extract make vars for GCC crtstuff.


# 1.13 01-Jul-2004 skrll

Add some more variables used to build libgcc_s.

Part of the fix for PR 22452.


Revision tags: netbsd-2-0-base
# 1.12 10-Feb-2004 skrll

branches: 1.12.2;
Updates so that mknative gets the right things.

- Disable symbol versioning (for now)
- Make sure that libiberty knows its being configured with a
cross compiler.
- The CXX_* variables are no longer needed/used.
- LIB2FUNCS_EXTRA gets pulled in via LIB2ADD
- Get LIB1ASMFUNCS and LIB2ASMSRC
- MAYBE_USE_COLLECT2 got renamed to USE_COLLECT2 (but might not
be used)
- Get EXTRA_HEADERS so that we get generate the right paths for
CPPFLAGS
- Get some variables related to shared libgcc


# 1.11 02-Jan-2004 skrll

Move libgcc3/*.mk to libgcc3/arch.

Update mknative-gcc.


# 1.10 27-Nov-2003 mrg

fix a comment; normalise.


# 1.9 27-Nov-2003 mrg

use mknative.common


# 1.8 27-Nov-2003 mrg

be a little more verbose about what we're doing when running mknative.
also grab LIB2FUNCS_EXTRA for libgcc3 (old fix for m68000).


# 1.7 22-Aug-2003 mrg

don't want auto-build.h anymore


# 1.6 01-Aug-2003 mrg

we need config.h an another version of gthr-default.h


# 1.5 30-Jul-2003 mrg

fix a typo in previous


# 1.4 30-Jul-2003 mrg

libiberty/config.h needs to become per-arch.


# 1.3 28-Jul-2003 mrg

fix a bug in previous - two $'s are bad


# 1.2 28-Jul-2003 mrg

add another transform for libobjc3


# 1.1 25-Jul-2003 mrg

- build "binutils" and "gcc" separately if USE_TOOLS_TOOLCHAIN is not set
to "yes".
- adjust dbsym/mdsetimage to look in the correct place for libbfd.
- new mknative-gcc based in toolchain/mknative


# 1.116 22-Jul-2022 mrg

don't rename codecvt.cc here, do it in a Makefile when consumed.

since the Makefiles already need updates for these, it's easier
if all of the changes are there.


# 1.115 16-Aug-2021 mrg

fetch experimental_headers, experimental_bits_headers, and ext_host_headers
to install install experimental/* and ext/opt_random.h.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.114 11-Apr-2021 mrg

fetch omp-device-properties.h and don't try to fetch sanitizer
stuff automatically yet.


# 1.113 11-Apr-2021 mrg

make mknative-gcc.old for GCC 9. begin to update mknative-gcc for GCC 10.


# 1.112 09-Sep-2020 mrg

more consolidation and properly condition all variables like previously.


# 1.111 09-Sep-2020 mrg

consolidate a bunch of libstdc++ variable collection.


# 1.110 08-Sep-2020 mrg

oops, pull out the value of pstl_headers.


# 1.109 06-Sep-2020 mrg

pass down earm* not earmv5* to mknative-gcc.


# 1.108 05-Sep-2020 mrg

disable fetching stuff from libsanitizer for now. it needs libstdc++
to build in mknative using gcc makefiles, and our locale changes break
the "normal" build of this.

make sure MKNATIVE_TARGET is always set. since mknative-gcc doesn't
care about the version any more (we keep two versions for gcc/gcc.old)
simply set it to "gcc".


# 1.107 05-Sep-2020 mrg

pull out a few more things for GCC 9.


# 1.106 05-Sep-2020 mrg

port to GCC 9.3.


# 1.105 13-Aug-2020 mrg

set _OUTDIRBASE depending on $0, and then set _OUTDIR based on this.
now you can copy mknative-gcc to mknative-gcc.old without edit.


# 1.104 12-Aug-2020 mrg

mknative-gcc is for GCC 8.4.
mknative-gcc.old is supposed to be for GCC 7, but is the GCC 6
version. update it and mark it for GCC 7.5.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 phil-wifi-20191119
# 1.103 24-Oct-2019 christos

arm needs more files


# 1.102 16-Oct-2019 mrg

copy arm-cpu.h and arm-isa.h for arm platforms.


Revision tags: netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 netbsd-9-base phil-wifi-20190609
# 1.101 23-Feb-2019 mrg

branches: 1.101.2;
pull out libstdc++ config.h as-is, for gnu.ver processing.
pull out the cxx11_sources and cxx98_sources values to avoid hard coding.


# 1.100 09-Feb-2019 mrg

- build the gthr*.h files to be installed on the fly, instead of
having dozens of copies of the same thing in the tree.
- don't fetch any gthr*.h files.
- delete ancient gthr-tpf.h that was removed in GCC 4.8 or so.

this should fix the call_once tests for real now.


# 1.99 04-Feb-2019 mrg

common-target source list is MD. make it so.


# 1.98 04-Feb-2019 mrg

- don't getlinks here, they're no longer used.
- pullout the libcommon, libcommon-target and libgomp source list so they
don't have to be hard coded in the reachover makefile


# 1.97 01-Feb-2019 mrg

- 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


Revision tags: pgoyette-compat-20190127
# 1.96 19-Jan-2019 mrg

make includes works now.

pull out more data needed for headers and fix gthr-defaults.h.

libgcc_s has multiple symbols.


# 1.95 19-Jan-2019 mrg

also pull out these variables:
enable_execute_stack
unwind_header
md_unwind_header
sfp_machine_header
thread_header


Revision tags: pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906
# 1.94 04-Sep-2018 mrg

also pullout INTERNAL_CFLAGS for the libgcc build, where it may have
-DHAVE_CC_TLS defined on the command line. (we already collect all
the other components.)


# 1.93 04-Sep-2018 mrg

in configargs.h, as well as normalising to /usr/src, normalise the
--build to the same as the --host, so that it never changes based
upon the host you ran mknative on. (some recent changes are only
because i updated a system from netbsd-7 to netbsd-8. this will
avoid that in the future.)


Revision tags: pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.92 06-Feb-2018 mrg

branches: 1.92.2; 1.92.4;
also fetch GCOV_DUMP_OBJS.


# 1.91 03-Feb-2018 mrg

pullout port_specific_symbol_files from libstdc++.


# 1.90 04-Oct-2017 christos

use the variable for the source dir instead of duplicating it.


Revision tags: perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104
# 1.89 05-Oct-2016 christos

branches: 1.89.6;
revert our changes; softfloat removal is now done in libgcc/config.host


# 1.88 05-Oct-2016 christos

We provide our own soft-float implementation in libc, so elide the libgcc
sources for it.


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.87 17-Mar-2016 mrg

branches: 1.87.2;
set NETBSD_GCC_VERSION for GCC 5.3 separately.
don't collect crtstuff anymore.


# 1.86 16-Mar-2016 mrg

grab insn-modes.h, and do the libgcc bootstrap from gcc as well.


# 1.85 15-Mar-2016 mrg

- 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


# 1.84 15-Mar-2016 mrg

update for GCC 5.3 libgcov and libstdc++


# 1.83 15-Mar-2016 mrg

very first baby steps towards GCC 5.3 mknative.


# 1.82 24-Jan-2016 mrg

add a comment saying this is for GCC 4.8


# 1.81 31-Jan-2015 mrg

kill the -fPIC that m68000 ends up with, fixing it in the specs
is not trivial..


# 1.80 30-Jan-2015 mrg

canonicalise the src dir to /usr/src, so it doesn't matter
where we run mknative.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.79 29-May-2014 skrll

Don't grab libstdc++-v3/config.h it's not used.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
# 1.78 02-Mar-2014 mrg

branches: 1.78.2;
don't collect gthr-default.h anymore.


# 1.77 02-Mar-2014 mrg

don't collect c++allocator.h. we copy it via G_ALLOCATOR_H we've
already pulled out, and the extra copy can confuse make when it
has an older timestamp than the copy in dist/libstdc++-v3/.


# 1.76 26-Feb-2014 mrg

prepare for moving GCC 4.5 into gcc.old:

- convert to using ${EXTERNAL_GCC_SUBDIR}
- define base-external-gpl3-gcc* subdir as GCC_SUBDIR
- use <bsd.init.mk> over <bsd.own.mk> for a bunch of places; mostly
because it arranges for ../Makefile.inc to be included earlier, and
don't bother including the latter if the former is already included.
- move all .PATH: settings after <bsd.{own,lib}.mk> so that all
valid variables are set before it is evaluated
- rename mknative-gcc* to match their subdir name.

XXX the relationship between the Makefile.inc/Makefile.gcc_path files
is kind of sketchy, it would be great if this was fixed.


# 1.75 16-Feb-2014 skrll

The mpfr sources moved down into a src directory - deal with this in
mknative.


# 1.74 28-Nov-2013 mrg

update to MPC 1.0.1.


# 1.73 20-Oct-2013 skrll

Deleted 1 line too many in previous commit.


# 1.72 20-Oct-2013 skrll

g/c gcc3 goop


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.71 28-Jun-2013 mrg

pass both NEWCONFIGDIR and NETBSDSRCDIR to mknative-gcc.


# 1.70 05-May-2013 skrll

Create a sanitise_includes function and use it everywhere it's needed.


# 1.69 25-Apr-2013 skrll

Avoid populating mknative output with gmp,mpfr, and mpc source
directories


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.68 25-Sep-2012 skrll

More tweaks. I didn't manage to complete a mknative from scratch run, but
this is a step in the right direction.


# 1.67 11-Aug-2012 skrll

branches: 1.67.2;
Grab CRTSTUFF_T_CFLAGS_S.

Gentlement start your mknative runs.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base
# 1.66 10-Jan-2012 skrll

Fix bootstrap-libgcc for gcc 4.5


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.65 13-Oct-2011 matt

branches: 1.65.2;
Fix PPC _SOFT_FLOAT


# 1.64 23-Sep-2011 mrg

since omp.h is part of libgomp, put it in the libgomp files not the
libstdc++ files.


# 1.63 21-Sep-2011 mrg

add libgomp support. needed by "cc -fopenmp", that koffice 2.3 wants to use.


# 1.62 17-Aug-2011 matt

Add an inline ex script to modify configargs.h for powerpc to auto-enable
-msoft-float.


# 1.61 03-Jul-2011 mrg

fix the previous


# 1.60 03-Jul-2011 mrg

-I$DESTDIR/usr/include is escaping into the generated files from
the native-gcc run. add some sed commands to remove them.


# 1.59 03-Jul-2011 mrg

copy sysroot-suffix.h as well, for sh3.


# 1.58 02-Jul-2011 mrg

also pull out LIB2ADD_ST for libgcc.


# 1.57 01-Jul-2011 mrg

avoid creating an unused directory.


# 1.56 01-Jul-2011 mrg

- call each ${MKNATIVE_CONFIG_TARGET_LIBS} target separately
- comment out maybe-all-target-libgcc
- cope with the special transformation needed for gtyp-input.list


# 1.55 30-Jun-2011 mrg

fix previous; they belong in _headers1


# 1.54 30-Jun-2011 mrg

also pull tr1_impl_headers parallel_headers and decimal_headers for libstdc++


# 1.53 29-Jun-2011 mrg

fix all-tree.def, and add gtyp-input.list


# 1.52 29-Jun-2011 mrg

fix the path for libdecnumber.


# 1.51 29-Jun-2011 mrg

get libdecnumber info out of GCC.


# 1.50 28-Jun-2011 mrg

also need bversion.h


# 1.49 28-Jun-2011 mrg

some more updates for GCC 4.5.


# 1.48 23-Jun-2011 mrg

output stuff to the right libiberty dir for gcc 4.5.


# 1.47 23-Jun-2011 mrg

get this some what working with GCC 4.5. i at least have managed to
get crtstuff and libgcc to build for amd64, and have linked and tested
/bin/sh with all these GCC 4.5 compiled part.


# 1.46 21-Jun-2011 mrg

initial port to HAVE_GCC = 45. mknative-gcc parts are from me
and are largely untested, most of the rest is from chuq.


Revision tags: cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.45 17-Dec-2009 uebayasi

branches: 1.45.4;
get_libgcc_new: Make previous work for digit only ABI names.


# 1.44 17-Dec-2009 uebayasi

get_libgcc_new: Teach multilib.


Revision tags: matt-premerge-20091211
# 1.43 01-Dec-2009 uebayasi

Skip parameters for multilib build for now.


# 1.42 01-Dec-2009 uebayasi

Handle cases where *.asm is listed in LIB2FUNCS_EXTRA (gcc/config/rs6000).


# 1.41 30-Nov-2009 uebayasi

Handle cases where database text files don't exist.


# 1.40 30-Nov-2009 uebayasi

Call "template sources" as "tmplsrcs", not "tmpsrcs". Requested by mrg@.


# 1.39 30-Nov-2009 uebayasi

Prefix per-library *.mk files with libs.*.


# 1.38 30-Nov-2009 uebayasi

Now that we know what sources are needed to build a given library, we need
the rules how to build those sources. Generate makefiles defining ${COPTS},
${CPPFLAGS}, and ${SRCS} (== template).

Note that ${CPPFLAGS} is actually dfined as _CPPFLAGS like
_CPPFLAGS.tmp___gcc_bcmp.c=-DL__gcc_bcmp
and used to generate wrapper files (e.g. tmp___gcc_bcmp.c). Otherwise it's
automagically passed to ${CC} by bsd.*.mk.


# 1.37 30-Nov-2009 uebayasi

For each library, generate a makefile of the list of template sources too.


# 1.36 30-Nov-2009 uebayasi

For each library, generate a list of sources (*.[cS]).

We create wrapper sources (tmp_*.[cS]) on-the-fly and compile them. For
example, __gcc_bcmp() is compiled using tmp___gcc_bcmp.c, which #define's
L__gcc_bcmp and #include's libgcc2.c.


# 1.35 30-Nov-2009 uebayasi

Move these analyzing functions into one place, get_libgcc_new_analyze().


# 1.34 30-Nov-2009 uebayasi

Typo.


# 1.33 30-Nov-2009 uebayasi

Generate lists of template sources ("tmpsrcs") for each libraries. We'll
need these to create wrappers of tmpsrcs and define correct dependencies.


# 1.32 30-Nov-2009 uebayasi

Generate *.o -> template *.[cS] ("tmpsrc") mapping.

Functions are built from a template (tmpsrc). We create wrapper sources
(src) and define necessary defines and #include tmpsrc.


# 1.31 30-Nov-2009 uebayasi

- Generate a list of CPP flags used to build *.o. Some files are build
repeatedly with different -DXXX to generate similar objects (e.g. different
type size).

- Generate a list of other CC options to build *.o.

(See my sed-fu using hold space in get_libgcc_list_objs_xflags().)


# 1.30 30-Nov-2009 uebayasi

- Generate a list of *.o -> lib*.{a,so} mapping. This is also known by
parsing dependency lines in libgcc.mk.

- Generate a list of *.o -> *.{c,S} mapping. *.S files are known as
${LIB1ASMFUNCS}. Assume other *.o files are built from *.c. This information
is needed to generated wrapper sources later.


# 1.29 30-Nov-2009 uebayasi

Generate lists of functions built in libgcc libraries. This is known by
pattern matching dependency lines in libgcc.mk.


# 1.28 30-Nov-2009 uebayasi

Generate a list of functions provided as *.S.


# 1.27 30-Nov-2009 uebayasi

Define paths of newly generated files.


# 1.26 30-Nov-2009 uebayasi

Start implementing the new style libgcc "mknative" converter which generates
BSD makefiles to build libgcc. The goal is to build all functions rather
than managing the set of functions in gnu/lib/libgcc/Makefile.in by hand.

Because of the complexity of the build procedure, I leave not only generated
makefiles but also intermediate, analyzed data so that people can verify that
the conversion is done correctly.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE jym-xensuspend-nbase netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2
# 1.25 11-Oct-2008 mrg

- add a i386/t-netbsd64 makefile fragment to build 32/64 bit
libgcc/multilib on amd64
- enable the 32/64 bit libgcc/multilib support on sparc64
- adapt mknative-gcc to grab multilib.h
- use --enable-multilib on amd64 and sparc64

none of this affects the installed tools yet, just the src/tools one.


# 1.24 19-Sep-2008 skrll

Grab libgcov stuff.


Revision tags: wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase hpcarm-cleanup-base
# 1.23 08-Feb-2008 skrll

Collect the libobjc config.h


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-4-base
# 1.22 25-Jun-2006 mrg

branches: 1.22.4; 1.22.10;
convert build/ggc-none.o to build-ggc-none.lo.


# 1.21 24-Jun-2006 mrg

also grab ${_extravars} for GCC4 in the get_gcc() function.


# 1.20 09-Jun-2006 skrll

Fixes for mknative runs on gcc3.

- get the information from a gcc3 .native
- don't get gcc4 variables
- put back the getvars for SHLIB_LINK SHLIB_MULTILIB as they work
on gcc3 and leave as XXX'd on gcc4.

I've re-arranged some of the variables to minimise the differences, but
didn't do them all.


# 1.19 02-Jun-2006 mrg

make this work for GCC3 one again.


# 1.18 23-May-2006 mrg

also grab ALL_OPT_FILES from gcc/Makefile for libobjc4.


# 1.17 15-May-2006 mrg

make sure that c++ headers work again.


# 1.16 12-May-2006 mrg

support GCC4:
- look in gnu/dist/gcc4
- don't build fortran
- use /usr/bin/env -i so that gmake works (XXX - breaks from MAKEFLAGS
in the build.sh generated makewrapper.)
- use gmake and Makefile.gmakehost
- update .native/.configure_done target


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-3-base
# 1.15 10-Dec-2004 mrg

mirror a fix from mknative-binutils:
>fix the sed expression that pulls VPATH out of the makefile to work
>with any number of tabs or spaces after the equal sign.


# 1.14 24-Aug-2004 thorpej

Add code to extract make vars for GCC crtstuff.


# 1.13 01-Jul-2004 skrll

Add some more variables used to build libgcc_s.

Part of the fix for PR 22452.


Revision tags: netbsd-2-0-base
# 1.12 10-Feb-2004 skrll

branches: 1.12.2;
Updates so that mknative gets the right things.

- Disable symbol versioning (for now)
- Make sure that libiberty knows its being configured with a
cross compiler.
- The CXX_* variables are no longer needed/used.
- LIB2FUNCS_EXTRA gets pulled in via LIB2ADD
- Get LIB1ASMFUNCS and LIB2ASMSRC
- MAYBE_USE_COLLECT2 got renamed to USE_COLLECT2 (but might not
be used)
- Get EXTRA_HEADERS so that we get generate the right paths for
CPPFLAGS
- Get some variables related to shared libgcc


# 1.11 02-Jan-2004 skrll

Move libgcc3/*.mk to libgcc3/arch.

Update mknative-gcc.


# 1.10 27-Nov-2003 mrg

fix a comment; normalise.


# 1.9 27-Nov-2003 mrg

use mknative.common


# 1.8 27-Nov-2003 mrg

be a little more verbose about what we're doing when running mknative.
also grab LIB2FUNCS_EXTRA for libgcc3 (old fix for m68000).


# 1.7 22-Aug-2003 mrg

don't want auto-build.h anymore


# 1.6 01-Aug-2003 mrg

we need config.h an another version of gthr-default.h


# 1.5 30-Jul-2003 mrg

fix a typo in previous


# 1.4 30-Jul-2003 mrg

libiberty/config.h needs to become per-arch.


# 1.3 28-Jul-2003 mrg

fix a bug in previous - two $'s are bad


# 1.2 28-Jul-2003 mrg

add another transform for libobjc3


# 1.1 25-Jul-2003 mrg

- build "binutils" and "gcc" separately if USE_TOOLS_TOOLCHAIN is not set
to "yes".
- adjust dbsym/mdsetimage to look in the correct place for libbfd.
- new mknative-gcc based in toolchain/mknative


# 1.115 16-Aug-2021 mrg

fetch experimental_headers, experimental_bits_headers, and ext_host_headers
to install install experimental/* and ext/opt_random.h.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.114 11-Apr-2021 mrg

fetch omp-device-properties.h and don't try to fetch sanitizer
stuff automatically yet.


# 1.113 11-Apr-2021 mrg

make mknative-gcc.old for GCC 9. begin to update mknative-gcc for GCC 10.


# 1.112 09-Sep-2020 mrg

more consolidation and properly condition all variables like previously.


# 1.111 09-Sep-2020 mrg

consolidate a bunch of libstdc++ variable collection.


# 1.110 08-Sep-2020 mrg

oops, pull out the value of pstl_headers.


# 1.109 06-Sep-2020 mrg

pass down earm* not earmv5* to mknative-gcc.


# 1.108 05-Sep-2020 mrg

disable fetching stuff from libsanitizer for now. it needs libstdc++
to build in mknative using gcc makefiles, and our locale changes break
the "normal" build of this.

make sure MKNATIVE_TARGET is always set. since mknative-gcc doesn't
care about the version any more (we keep two versions for gcc/gcc.old)
simply set it to "gcc".


# 1.107 05-Sep-2020 mrg

pull out a few more things for GCC 9.


# 1.106 05-Sep-2020 mrg

port to GCC 9.3.


# 1.105 13-Aug-2020 mrg

set _OUTDIRBASE depending on $0, and then set _OUTDIR based on this.
now you can copy mknative-gcc to mknative-gcc.old without edit.


# 1.104 12-Aug-2020 mrg

mknative-gcc is for GCC 8.4.
mknative-gcc.old is supposed to be for GCC 7, but is the GCC 6
version. update it and mark it for GCC 7.5.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 phil-wifi-20191119
# 1.103 24-Oct-2019 christos

arm needs more files


# 1.102 16-Oct-2019 mrg

copy arm-cpu.h and arm-isa.h for arm platforms.


Revision tags: netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 netbsd-9-base phil-wifi-20190609
# 1.101 23-Feb-2019 mrg

branches: 1.101.2;
pull out libstdc++ config.h as-is, for gnu.ver processing.
pull out the cxx11_sources and cxx98_sources values to avoid hard coding.


# 1.100 09-Feb-2019 mrg

- build the gthr*.h files to be installed on the fly, instead of
having dozens of copies of the same thing in the tree.
- don't fetch any gthr*.h files.
- delete ancient gthr-tpf.h that was removed in GCC 4.8 or so.

this should fix the call_once tests for real now.


# 1.99 04-Feb-2019 mrg

common-target source list is MD. make it so.


# 1.98 04-Feb-2019 mrg

- don't getlinks here, they're no longer used.
- pullout the libcommon, libcommon-target and libgomp source list so they
don't have to be hard coded in the reachover makefile


# 1.97 01-Feb-2019 mrg

- 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


Revision tags: pgoyette-compat-20190127
# 1.96 19-Jan-2019 mrg

make includes works now.

pull out more data needed for headers and fix gthr-defaults.h.

libgcc_s has multiple symbols.


# 1.95 19-Jan-2019 mrg

also pull out these variables:
enable_execute_stack
unwind_header
md_unwind_header
sfp_machine_header
thread_header


Revision tags: pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906
# 1.94 04-Sep-2018 mrg

also pullout INTERNAL_CFLAGS for the libgcc build, where it may have
-DHAVE_CC_TLS defined on the command line. (we already collect all
the other components.)


# 1.93 04-Sep-2018 mrg

in configargs.h, as well as normalising to /usr/src, normalise the
--build to the same as the --host, so that it never changes based
upon the host you ran mknative on. (some recent changes are only
because i updated a system from netbsd-7 to netbsd-8. this will
avoid that in the future.)


Revision tags: pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.92 06-Feb-2018 mrg

branches: 1.92.2; 1.92.4;
also fetch GCOV_DUMP_OBJS.


# 1.91 03-Feb-2018 mrg

pullout port_specific_symbol_files from libstdc++.


# 1.90 04-Oct-2017 christos

use the variable for the source dir instead of duplicating it.


Revision tags: perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104
# 1.89 05-Oct-2016 christos

branches: 1.89.6;
revert our changes; softfloat removal is now done in libgcc/config.host


# 1.88 05-Oct-2016 christos

We provide our own soft-float implementation in libc, so elide the libgcc
sources for it.


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.87 17-Mar-2016 mrg

branches: 1.87.2;
set NETBSD_GCC_VERSION for GCC 5.3 separately.
don't collect crtstuff anymore.


# 1.86 16-Mar-2016 mrg

grab insn-modes.h, and do the libgcc bootstrap from gcc as well.


# 1.85 15-Mar-2016 mrg

- 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


# 1.84 15-Mar-2016 mrg

update for GCC 5.3 libgcov and libstdc++


# 1.83 15-Mar-2016 mrg

very first baby steps towards GCC 5.3 mknative.


# 1.82 24-Jan-2016 mrg

add a comment saying this is for GCC 4.8


# 1.81 31-Jan-2015 mrg

kill the -fPIC that m68000 ends up with, fixing it in the specs
is not trivial..


# 1.80 30-Jan-2015 mrg

canonicalise the src dir to /usr/src, so it doesn't matter
where we run mknative.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.79 29-May-2014 skrll

Don't grab libstdc++-v3/config.h it's not used.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
# 1.78 02-Mar-2014 mrg

branches: 1.78.2;
don't collect gthr-default.h anymore.


# 1.77 02-Mar-2014 mrg

don't collect c++allocator.h. we copy it via G_ALLOCATOR_H we've
already pulled out, and the extra copy can confuse make when it
has an older timestamp than the copy in dist/libstdc++-v3/.


# 1.76 26-Feb-2014 mrg

prepare for moving GCC 4.5 into gcc.old:

- convert to using ${EXTERNAL_GCC_SUBDIR}
- define base-external-gpl3-gcc* subdir as GCC_SUBDIR
- use <bsd.init.mk> over <bsd.own.mk> for a bunch of places; mostly
because it arranges for ../Makefile.inc to be included earlier, and
don't bother including the latter if the former is already included.
- move all .PATH: settings after <bsd.{own,lib}.mk> so that all
valid variables are set before it is evaluated
- rename mknative-gcc* to match their subdir name.

XXX the relationship between the Makefile.inc/Makefile.gcc_path files
is kind of sketchy, it would be great if this was fixed.


# 1.75 16-Feb-2014 skrll

The mpfr sources moved down into a src directory - deal with this in
mknative.


# 1.74 28-Nov-2013 mrg

update to MPC 1.0.1.


# 1.73 20-Oct-2013 skrll

Deleted 1 line too many in previous commit.


# 1.72 20-Oct-2013 skrll

g/c gcc3 goop


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.71 28-Jun-2013 mrg

pass both NEWCONFIGDIR and NETBSDSRCDIR to mknative-gcc.


# 1.70 05-May-2013 skrll

Create a sanitise_includes function and use it everywhere it's needed.


# 1.69 25-Apr-2013 skrll

Avoid populating mknative output with gmp,mpfr, and mpc source
directories


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.68 25-Sep-2012 skrll

More tweaks. I didn't manage to complete a mknative from scratch run, but
this is a step in the right direction.


# 1.67 11-Aug-2012 skrll

branches: 1.67.2;
Grab CRTSTUFF_T_CFLAGS_S.

Gentlement start your mknative runs.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base
# 1.66 10-Jan-2012 skrll

Fix bootstrap-libgcc for gcc 4.5


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.65 13-Oct-2011 matt

branches: 1.65.2;
Fix PPC _SOFT_FLOAT


# 1.64 23-Sep-2011 mrg

since omp.h is part of libgomp, put it in the libgomp files not the
libstdc++ files.


# 1.63 21-Sep-2011 mrg

add libgomp support. needed by "cc -fopenmp", that koffice 2.3 wants to use.


# 1.62 17-Aug-2011 matt

Add an inline ex script to modify configargs.h for powerpc to auto-enable
-msoft-float.


# 1.61 03-Jul-2011 mrg

fix the previous


# 1.60 03-Jul-2011 mrg

-I$DESTDIR/usr/include is escaping into the generated files from
the native-gcc run. add some sed commands to remove them.


# 1.59 03-Jul-2011 mrg

copy sysroot-suffix.h as well, for sh3.


# 1.58 02-Jul-2011 mrg

also pull out LIB2ADD_ST for libgcc.


# 1.57 01-Jul-2011 mrg

avoid creating an unused directory.


# 1.56 01-Jul-2011 mrg

- call each ${MKNATIVE_CONFIG_TARGET_LIBS} target separately
- comment out maybe-all-target-libgcc
- cope with the special transformation needed for gtyp-input.list


# 1.55 30-Jun-2011 mrg

fix previous; they belong in _headers1


# 1.54 30-Jun-2011 mrg

also pull tr1_impl_headers parallel_headers and decimal_headers for libstdc++


# 1.53 29-Jun-2011 mrg

fix all-tree.def, and add gtyp-input.list


# 1.52 29-Jun-2011 mrg

fix the path for libdecnumber.


# 1.51 29-Jun-2011 mrg

get libdecnumber info out of GCC.


# 1.50 28-Jun-2011 mrg

also need bversion.h


# 1.49 28-Jun-2011 mrg

some more updates for GCC 4.5.


# 1.48 23-Jun-2011 mrg

output stuff to the right libiberty dir for gcc 4.5.


# 1.47 23-Jun-2011 mrg

get this some what working with GCC 4.5. i at least have managed to
get crtstuff and libgcc to build for amd64, and have linked and tested
/bin/sh with all these GCC 4.5 compiled part.


# 1.46 21-Jun-2011 mrg

initial port to HAVE_GCC = 45. mknative-gcc parts are from me
and are largely untested, most of the rest is from chuq.


Revision tags: cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.45 17-Dec-2009 uebayasi

branches: 1.45.4;
get_libgcc_new: Make previous work for digit only ABI names.


# 1.44 17-Dec-2009 uebayasi

get_libgcc_new: Teach multilib.


Revision tags: matt-premerge-20091211
# 1.43 01-Dec-2009 uebayasi

Skip parameters for multilib build for now.


# 1.42 01-Dec-2009 uebayasi

Handle cases where *.asm is listed in LIB2FUNCS_EXTRA (gcc/config/rs6000).


# 1.41 30-Nov-2009 uebayasi

Handle cases where database text files don't exist.


# 1.40 30-Nov-2009 uebayasi

Call "template sources" as "tmplsrcs", not "tmpsrcs". Requested by mrg@.


# 1.39 30-Nov-2009 uebayasi

Prefix per-library *.mk files with libs.*.


# 1.38 30-Nov-2009 uebayasi

Now that we know what sources are needed to build a given library, we need
the rules how to build those sources. Generate makefiles defining ${COPTS},
${CPPFLAGS}, and ${SRCS} (== template).

Note that ${CPPFLAGS} is actually dfined as _CPPFLAGS like
_CPPFLAGS.tmp___gcc_bcmp.c=-DL__gcc_bcmp
and used to generate wrapper files (e.g. tmp___gcc_bcmp.c). Otherwise it's
automagically passed to ${CC} by bsd.*.mk.


# 1.37 30-Nov-2009 uebayasi

For each library, generate a makefile of the list of template sources too.


# 1.36 30-Nov-2009 uebayasi

For each library, generate a list of sources (*.[cS]).

We create wrapper sources (tmp_*.[cS]) on-the-fly and compile them. For
example, __gcc_bcmp() is compiled using tmp___gcc_bcmp.c, which #define's
L__gcc_bcmp and #include's libgcc2.c.


# 1.35 30-Nov-2009 uebayasi

Move these analyzing functions into one place, get_libgcc_new_analyze().


# 1.34 30-Nov-2009 uebayasi

Typo.


# 1.33 30-Nov-2009 uebayasi

Generate lists of template sources ("tmpsrcs") for each libraries. We'll
need these to create wrappers of tmpsrcs and define correct dependencies.


# 1.32 30-Nov-2009 uebayasi

Generate *.o -> template *.[cS] ("tmpsrc") mapping.

Functions are built from a template (tmpsrc). We create wrapper sources
(src) and define necessary defines and #include tmpsrc.


# 1.31 30-Nov-2009 uebayasi

- Generate a list of CPP flags used to build *.o. Some files are build
repeatedly with different -DXXX to generate similar objects (e.g. different
type size).

- Generate a list of other CC options to build *.o.

(See my sed-fu using hold space in get_libgcc_list_objs_xflags().)


# 1.30 30-Nov-2009 uebayasi

- Generate a list of *.o -> lib*.{a,so} mapping. This is also known by
parsing dependency lines in libgcc.mk.

- Generate a list of *.o -> *.{c,S} mapping. *.S files are known as
${LIB1ASMFUNCS}. Assume other *.o files are built from *.c. This information
is needed to generated wrapper sources later.


# 1.29 30-Nov-2009 uebayasi

Generate lists of functions built in libgcc libraries. This is known by
pattern matching dependency lines in libgcc.mk.


# 1.28 30-Nov-2009 uebayasi

Generate a list of functions provided as *.S.


# 1.27 30-Nov-2009 uebayasi

Define paths of newly generated files.


# 1.26 30-Nov-2009 uebayasi

Start implementing the new style libgcc "mknative" converter which generates
BSD makefiles to build libgcc. The goal is to build all functions rather
than managing the set of functions in gnu/lib/libgcc/Makefile.in by hand.

Because of the complexity of the build procedure, I leave not only generated
makefiles but also intermediate, analyzed data so that people can verify that
the conversion is done correctly.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE jym-xensuspend-nbase netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2
# 1.25 11-Oct-2008 mrg

- add a i386/t-netbsd64 makefile fragment to build 32/64 bit
libgcc/multilib on amd64
- enable the 32/64 bit libgcc/multilib support on sparc64
- adapt mknative-gcc to grab multilib.h
- use --enable-multilib on amd64 and sparc64

none of this affects the installed tools yet, just the src/tools one.


# 1.24 19-Sep-2008 skrll

Grab libgcov stuff.


Revision tags: wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase hpcarm-cleanup-base
# 1.23 08-Feb-2008 skrll

Collect the libobjc config.h


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-4-base
# 1.22 25-Jun-2006 mrg

branches: 1.22.4; 1.22.10;
convert build/ggc-none.o to build-ggc-none.lo.


# 1.21 24-Jun-2006 mrg

also grab ${_extravars} for GCC4 in the get_gcc() function.


# 1.20 09-Jun-2006 skrll

Fixes for mknative runs on gcc3.

- get the information from a gcc3 .native
- don't get gcc4 variables
- put back the getvars for SHLIB_LINK SHLIB_MULTILIB as they work
on gcc3 and leave as XXX'd on gcc4.

I've re-arranged some of the variables to minimise the differences, but
didn't do them all.


# 1.19 02-Jun-2006 mrg

make this work for GCC3 one again.


# 1.18 23-May-2006 mrg

also grab ALL_OPT_FILES from gcc/Makefile for libobjc4.


# 1.17 15-May-2006 mrg

make sure that c++ headers work again.


# 1.16 12-May-2006 mrg

support GCC4:
- look in gnu/dist/gcc4
- don't build fortran
- use /usr/bin/env -i so that gmake works (XXX - breaks from MAKEFLAGS
in the build.sh generated makewrapper.)
- use gmake and Makefile.gmakehost
- update .native/.configure_done target


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-3-base
# 1.15 10-Dec-2004 mrg

mirror a fix from mknative-binutils:
>fix the sed expression that pulls VPATH out of the makefile to work
>with any number of tabs or spaces after the equal sign.


# 1.14 24-Aug-2004 thorpej

Add code to extract make vars for GCC crtstuff.


# 1.13 01-Jul-2004 skrll

Add some more variables used to build libgcc_s.

Part of the fix for PR 22452.


Revision tags: netbsd-2-0-base
# 1.12 10-Feb-2004 skrll

branches: 1.12.2;
Updates so that mknative gets the right things.

- Disable symbol versioning (for now)
- Make sure that libiberty knows its being configured with a
cross compiler.
- The CXX_* variables are no longer needed/used.
- LIB2FUNCS_EXTRA gets pulled in via LIB2ADD
- Get LIB1ASMFUNCS and LIB2ASMSRC
- MAYBE_USE_COLLECT2 got renamed to USE_COLLECT2 (but might not
be used)
- Get EXTRA_HEADERS so that we get generate the right paths for
CPPFLAGS
- Get some variables related to shared libgcc


# 1.11 02-Jan-2004 skrll

Move libgcc3/*.mk to libgcc3/arch.

Update mknative-gcc.


# 1.10 27-Nov-2003 mrg

fix a comment; normalise.


# 1.9 27-Nov-2003 mrg

use mknative.common


# 1.8 27-Nov-2003 mrg

be a little more verbose about what we're doing when running mknative.
also grab LIB2FUNCS_EXTRA for libgcc3 (old fix for m68000).


# 1.7 22-Aug-2003 mrg

don't want auto-build.h anymore


# 1.6 01-Aug-2003 mrg

we need config.h an another version of gthr-default.h


# 1.5 30-Jul-2003 mrg

fix a typo in previous


# 1.4 30-Jul-2003 mrg

libiberty/config.h needs to become per-arch.


# 1.3 28-Jul-2003 mrg

fix a bug in previous - two $'s are bad


# 1.2 28-Jul-2003 mrg

add another transform for libobjc3


# 1.1 25-Jul-2003 mrg

- build "binutils" and "gcc" separately if USE_TOOLS_TOOLCHAIN is not set
to "yes".
- adjust dbsym/mdsetimage to look in the correct place for libbfd.
- new mknative-gcc based in toolchain/mknative


# 1.114 11-Apr-2021 mrg

fetch omp-device-properties.h and don't try to fetch sanitizer
stuff automatically yet.


# 1.113 11-Apr-2021 mrg

make mknative-gcc.old for GCC 9. begin to update mknative-gcc for GCC 10.


# 1.112 09-Sep-2020 mrg

more consolidation and properly condition all variables like previously.


# 1.111 09-Sep-2020 mrg

consolidate a bunch of libstdc++ variable collection.


# 1.110 08-Sep-2020 mrg

oops, pull out the value of pstl_headers.


# 1.109 06-Sep-2020 mrg

pass down earm* not earmv5* to mknative-gcc.


# 1.108 05-Sep-2020 mrg

disable fetching stuff from libsanitizer for now. it needs libstdc++
to build in mknative using gcc makefiles, and our locale changes break
the "normal" build of this.

make sure MKNATIVE_TARGET is always set. since mknative-gcc doesn't
care about the version any more (we keep two versions for gcc/gcc.old)
simply set it to "gcc".


# 1.107 05-Sep-2020 mrg

pull out a few more things for GCC 9.


# 1.106 05-Sep-2020 mrg

port to GCC 9.3.


# 1.105 13-Aug-2020 mrg

set _OUTDIRBASE depending on $0, and then set _OUTDIR based on this.
now you can copy mknative-gcc to mknative-gcc.old without edit.


# 1.104 12-Aug-2020 mrg

mknative-gcc is for GCC 8.4.
mknative-gcc.old is supposed to be for GCC 7, but is the GCC 6
version. update it and mark it for GCC 7.5.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 phil-wifi-20191119
# 1.103 24-Oct-2019 christos

arm needs more files


# 1.102 16-Oct-2019 mrg

copy arm-cpu.h and arm-isa.h for arm platforms.


Revision tags: netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 netbsd-9-base phil-wifi-20190609
# 1.101 23-Feb-2019 mrg

branches: 1.101.2;
pull out libstdc++ config.h as-is, for gnu.ver processing.
pull out the cxx11_sources and cxx98_sources values to avoid hard coding.


# 1.100 09-Feb-2019 mrg

- build the gthr*.h files to be installed on the fly, instead of
having dozens of copies of the same thing in the tree.
- don't fetch any gthr*.h files.
- delete ancient gthr-tpf.h that was removed in GCC 4.8 or so.

this should fix the call_once tests for real now.


# 1.99 04-Feb-2019 mrg

common-target source list is MD. make it so.


# 1.98 04-Feb-2019 mrg

- don't getlinks here, they're no longer used.
- pullout the libcommon, libcommon-target and libgomp source list so they
don't have to be hard coded in the reachover makefile


# 1.97 01-Feb-2019 mrg

- 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


Revision tags: pgoyette-compat-20190127
# 1.96 19-Jan-2019 mrg

make includes works now.

pull out more data needed for headers and fix gthr-defaults.h.

libgcc_s has multiple symbols.


# 1.95 19-Jan-2019 mrg

also pull out these variables:
enable_execute_stack
unwind_header
md_unwind_header
sfp_machine_header
thread_header


Revision tags: pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906
# 1.94 04-Sep-2018 mrg

also pullout INTERNAL_CFLAGS for the libgcc build, where it may have
-DHAVE_CC_TLS defined on the command line. (we already collect all
the other components.)


# 1.93 04-Sep-2018 mrg

in configargs.h, as well as normalising to /usr/src, normalise the
--build to the same as the --host, so that it never changes based
upon the host you ran mknative on. (some recent changes are only
because i updated a system from netbsd-7 to netbsd-8. this will
avoid that in the future.)


Revision tags: pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.92 06-Feb-2018 mrg

branches: 1.92.2; 1.92.4;
also fetch GCOV_DUMP_OBJS.


# 1.91 03-Feb-2018 mrg

pullout port_specific_symbol_files from libstdc++.


# 1.90 04-Oct-2017 christos

use the variable for the source dir instead of duplicating it.


Revision tags: perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104
# 1.89 05-Oct-2016 christos

branches: 1.89.6;
revert our changes; softfloat removal is now done in libgcc/config.host


# 1.88 05-Oct-2016 christos

We provide our own soft-float implementation in libc, so elide the libgcc
sources for it.


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.87 17-Mar-2016 mrg

branches: 1.87.2;
set NETBSD_GCC_VERSION for GCC 5.3 separately.
don't collect crtstuff anymore.


# 1.86 16-Mar-2016 mrg

grab insn-modes.h, and do the libgcc bootstrap from gcc as well.


# 1.85 15-Mar-2016 mrg

- 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


# 1.84 15-Mar-2016 mrg

update for GCC 5.3 libgcov and libstdc++


# 1.83 15-Mar-2016 mrg

very first baby steps towards GCC 5.3 mknative.


# 1.82 24-Jan-2016 mrg

add a comment saying this is for GCC 4.8


# 1.81 31-Jan-2015 mrg

kill the -fPIC that m68000 ends up with, fixing it in the specs
is not trivial..


# 1.80 30-Jan-2015 mrg

canonicalise the src dir to /usr/src, so it doesn't matter
where we run mknative.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.79 29-May-2014 skrll

Don't grab libstdc++-v3/config.h it's not used.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
# 1.78 02-Mar-2014 mrg

branches: 1.78.2;
don't collect gthr-default.h anymore.


# 1.77 02-Mar-2014 mrg

don't collect c++allocator.h. we copy it via G_ALLOCATOR_H we've
already pulled out, and the extra copy can confuse make when it
has an older timestamp than the copy in dist/libstdc++-v3/.


# 1.76 26-Feb-2014 mrg

prepare for moving GCC 4.5 into gcc.old:

- convert to using ${EXTERNAL_GCC_SUBDIR}
- define base-external-gpl3-gcc* subdir as GCC_SUBDIR
- use <bsd.init.mk> over <bsd.own.mk> for a bunch of places; mostly
because it arranges for ../Makefile.inc to be included earlier, and
don't bother including the latter if the former is already included.
- move all .PATH: settings after <bsd.{own,lib}.mk> so that all
valid variables are set before it is evaluated
- rename mknative-gcc* to match their subdir name.

XXX the relationship between the Makefile.inc/Makefile.gcc_path files
is kind of sketchy, it would be great if this was fixed.


# 1.75 16-Feb-2014 skrll

The mpfr sources moved down into a src directory - deal with this in
mknative.


# 1.74 28-Nov-2013 mrg

update to MPC 1.0.1.


# 1.73 20-Oct-2013 skrll

Deleted 1 line too many in previous commit.


# 1.72 20-Oct-2013 skrll

g/c gcc3 goop


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.71 28-Jun-2013 mrg

pass both NEWCONFIGDIR and NETBSDSRCDIR to mknative-gcc.


# 1.70 05-May-2013 skrll

Create a sanitise_includes function and use it everywhere it's needed.


# 1.69 25-Apr-2013 skrll

Avoid populating mknative output with gmp,mpfr, and mpc source
directories


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.68 25-Sep-2012 skrll

More tweaks. I didn't manage to complete a mknative from scratch run, but
this is a step in the right direction.


# 1.67 11-Aug-2012 skrll

branches: 1.67.2;
Grab CRTSTUFF_T_CFLAGS_S.

Gentlement start your mknative runs.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base
# 1.66 10-Jan-2012 skrll

Fix bootstrap-libgcc for gcc 4.5


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.65 13-Oct-2011 matt

branches: 1.65.2;
Fix PPC _SOFT_FLOAT


# 1.64 23-Sep-2011 mrg

since omp.h is part of libgomp, put it in the libgomp files not the
libstdc++ files.


# 1.63 21-Sep-2011 mrg

add libgomp support. needed by "cc -fopenmp", that koffice 2.3 wants to use.


# 1.62 17-Aug-2011 matt

Add an inline ex script to modify configargs.h for powerpc to auto-enable
-msoft-float.


# 1.61 03-Jul-2011 mrg

fix the previous


# 1.60 03-Jul-2011 mrg

-I$DESTDIR/usr/include is escaping into the generated files from
the native-gcc run. add some sed commands to remove them.


# 1.59 03-Jul-2011 mrg

copy sysroot-suffix.h as well, for sh3.


# 1.58 02-Jul-2011 mrg

also pull out LIB2ADD_ST for libgcc.


# 1.57 01-Jul-2011 mrg

avoid creating an unused directory.


# 1.56 01-Jul-2011 mrg

- call each ${MKNATIVE_CONFIG_TARGET_LIBS} target separately
- comment out maybe-all-target-libgcc
- cope with the special transformation needed for gtyp-input.list


# 1.55 30-Jun-2011 mrg

fix previous; they belong in _headers1


# 1.54 30-Jun-2011 mrg

also pull tr1_impl_headers parallel_headers and decimal_headers for libstdc++


# 1.53 29-Jun-2011 mrg

fix all-tree.def, and add gtyp-input.list


# 1.52 29-Jun-2011 mrg

fix the path for libdecnumber.


# 1.51 29-Jun-2011 mrg

get libdecnumber info out of GCC.


# 1.50 28-Jun-2011 mrg

also need bversion.h


# 1.49 28-Jun-2011 mrg

some more updates for GCC 4.5.


# 1.48 23-Jun-2011 mrg

output stuff to the right libiberty dir for gcc 4.5.


# 1.47 23-Jun-2011 mrg

get this some what working with GCC 4.5. i at least have managed to
get crtstuff and libgcc to build for amd64, and have linked and tested
/bin/sh with all these GCC 4.5 compiled part.


# 1.46 21-Jun-2011 mrg

initial port to HAVE_GCC = 45. mknative-gcc parts are from me
and are largely untested, most of the rest is from chuq.


Revision tags: cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.45 17-Dec-2009 uebayasi

branches: 1.45.4;
get_libgcc_new: Make previous work for digit only ABI names.


# 1.44 17-Dec-2009 uebayasi

get_libgcc_new: Teach multilib.


Revision tags: matt-premerge-20091211
# 1.43 01-Dec-2009 uebayasi

Skip parameters for multilib build for now.


# 1.42 01-Dec-2009 uebayasi

Handle cases where *.asm is listed in LIB2FUNCS_EXTRA (gcc/config/rs6000).


# 1.41 30-Nov-2009 uebayasi

Handle cases where database text files don't exist.


# 1.40 30-Nov-2009 uebayasi

Call "template sources" as "tmplsrcs", not "tmpsrcs". Requested by mrg@.


# 1.39 30-Nov-2009 uebayasi

Prefix per-library *.mk files with libs.*.


# 1.38 30-Nov-2009 uebayasi

Now that we know what sources are needed to build a given library, we need
the rules how to build those sources. Generate makefiles defining ${COPTS},
${CPPFLAGS}, and ${SRCS} (== template).

Note that ${CPPFLAGS} is actually dfined as _CPPFLAGS like
_CPPFLAGS.tmp___gcc_bcmp.c=-DL__gcc_bcmp
and used to generate wrapper files (e.g. tmp___gcc_bcmp.c). Otherwise it's
automagically passed to ${CC} by bsd.*.mk.


# 1.37 30-Nov-2009 uebayasi

For each library, generate a makefile of the list of template sources too.


# 1.36 30-Nov-2009 uebayasi

For each library, generate a list of sources (*.[cS]).

We create wrapper sources (tmp_*.[cS]) on-the-fly and compile them. For
example, __gcc_bcmp() is compiled using tmp___gcc_bcmp.c, which #define's
L__gcc_bcmp and #include's libgcc2.c.


# 1.35 30-Nov-2009 uebayasi

Move these analyzing functions into one place, get_libgcc_new_analyze().


# 1.34 30-Nov-2009 uebayasi

Typo.


# 1.33 30-Nov-2009 uebayasi

Generate lists of template sources ("tmpsrcs") for each libraries. We'll
need these to create wrappers of tmpsrcs and define correct dependencies.


# 1.32 30-Nov-2009 uebayasi

Generate *.o -> template *.[cS] ("tmpsrc") mapping.

Functions are built from a template (tmpsrc). We create wrapper sources
(src) and define necessary defines and #include tmpsrc.


# 1.31 30-Nov-2009 uebayasi

- Generate a list of CPP flags used to build *.o. Some files are build
repeatedly with different -DXXX to generate similar objects (e.g. different
type size).

- Generate a list of other CC options to build *.o.

(See my sed-fu using hold space in get_libgcc_list_objs_xflags().)


# 1.30 30-Nov-2009 uebayasi

- Generate a list of *.o -> lib*.{a,so} mapping. This is also known by
parsing dependency lines in libgcc.mk.

- Generate a list of *.o -> *.{c,S} mapping. *.S files are known as
${LIB1ASMFUNCS}. Assume other *.o files are built from *.c. This information
is needed to generated wrapper sources later.


# 1.29 30-Nov-2009 uebayasi

Generate lists of functions built in libgcc libraries. This is known by
pattern matching dependency lines in libgcc.mk.


# 1.28 30-Nov-2009 uebayasi

Generate a list of functions provided as *.S.


# 1.27 30-Nov-2009 uebayasi

Define paths of newly generated files.


# 1.26 30-Nov-2009 uebayasi

Start implementing the new style libgcc "mknative" converter which generates
BSD makefiles to build libgcc. The goal is to build all functions rather
than managing the set of functions in gnu/lib/libgcc/Makefile.in by hand.

Because of the complexity of the build procedure, I leave not only generated
makefiles but also intermediate, analyzed data so that people can verify that
the conversion is done correctly.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE jym-xensuspend-nbase netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2
# 1.25 11-Oct-2008 mrg

- add a i386/t-netbsd64 makefile fragment to build 32/64 bit
libgcc/multilib on amd64
- enable the 32/64 bit libgcc/multilib support on sparc64
- adapt mknative-gcc to grab multilib.h
- use --enable-multilib on amd64 and sparc64

none of this affects the installed tools yet, just the src/tools one.


# 1.24 19-Sep-2008 skrll

Grab libgcov stuff.


Revision tags: wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase hpcarm-cleanup-base
# 1.23 08-Feb-2008 skrll

Collect the libobjc config.h


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-4-base
# 1.22 25-Jun-2006 mrg

branches: 1.22.4; 1.22.10;
convert build/ggc-none.o to build-ggc-none.lo.


# 1.21 24-Jun-2006 mrg

also grab ${_extravars} for GCC4 in the get_gcc() function.


# 1.20 09-Jun-2006 skrll

Fixes for mknative runs on gcc3.

- get the information from a gcc3 .native
- don't get gcc4 variables
- put back the getvars for SHLIB_LINK SHLIB_MULTILIB as they work
on gcc3 and leave as XXX'd on gcc4.

I've re-arranged some of the variables to minimise the differences, but
didn't do them all.


# 1.19 02-Jun-2006 mrg

make this work for GCC3 one again.


# 1.18 23-May-2006 mrg

also grab ALL_OPT_FILES from gcc/Makefile for libobjc4.


# 1.17 15-May-2006 mrg

make sure that c++ headers work again.


# 1.16 12-May-2006 mrg

support GCC4:
- look in gnu/dist/gcc4
- don't build fortran
- use /usr/bin/env -i so that gmake works (XXX - breaks from MAKEFLAGS
in the build.sh generated makewrapper.)
- use gmake and Makefile.gmakehost
- update .native/.configure_done target


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-3-base
# 1.15 10-Dec-2004 mrg

mirror a fix from mknative-binutils:
>fix the sed expression that pulls VPATH out of the makefile to work
>with any number of tabs or spaces after the equal sign.


# 1.14 24-Aug-2004 thorpej

Add code to extract make vars for GCC crtstuff.


# 1.13 01-Jul-2004 skrll

Add some more variables used to build libgcc_s.

Part of the fix for PR 22452.


Revision tags: netbsd-2-0-base
# 1.12 10-Feb-2004 skrll

branches: 1.12.2;
Updates so that mknative gets the right things.

- Disable symbol versioning (for now)
- Make sure that libiberty knows its being configured with a
cross compiler.
- The CXX_* variables are no longer needed/used.
- LIB2FUNCS_EXTRA gets pulled in via LIB2ADD
- Get LIB1ASMFUNCS and LIB2ASMSRC
- MAYBE_USE_COLLECT2 got renamed to USE_COLLECT2 (but might not
be used)
- Get EXTRA_HEADERS so that we get generate the right paths for
CPPFLAGS
- Get some variables related to shared libgcc


# 1.11 02-Jan-2004 skrll

Move libgcc3/*.mk to libgcc3/arch.

Update mknative-gcc.


# 1.10 27-Nov-2003 mrg

fix a comment; normalise.


# 1.9 27-Nov-2003 mrg

use mknative.common


# 1.8 27-Nov-2003 mrg

be a little more verbose about what we're doing when running mknative.
also grab LIB2FUNCS_EXTRA for libgcc3 (old fix for m68000).


# 1.7 22-Aug-2003 mrg

don't want auto-build.h anymore


# 1.6 01-Aug-2003 mrg

we need config.h an another version of gthr-default.h


# 1.5 30-Jul-2003 mrg

fix a typo in previous


# 1.4 30-Jul-2003 mrg

libiberty/config.h needs to become per-arch.


# 1.3 28-Jul-2003 mrg

fix a bug in previous - two $'s are bad


# 1.2 28-Jul-2003 mrg

add another transform for libobjc3


# 1.1 25-Jul-2003 mrg

- build "binutils" and "gcc" separately if USE_TOOLS_TOOLCHAIN is not set
to "yes".
- adjust dbsym/mdsetimage to look in the correct place for libbfd.
- new mknative-gcc based in toolchain/mknative


# 1.112 09-Sep-2020 mrg

more consolidation and properly condition all variables like previously.


# 1.111 09-Sep-2020 mrg

consolidate a bunch of libstdc++ variable collection.


# 1.110 08-Sep-2020 mrg

oops, pull out the value of pstl_headers.


# 1.109 06-Sep-2020 mrg

pass down earm* not earmv5* to mknative-gcc.


# 1.108 05-Sep-2020 mrg

disable fetching stuff from libsanitizer for now. it needs libstdc++
to build in mknative using gcc makefiles, and our locale changes break
the "normal" build of this.

make sure MKNATIVE_TARGET is always set. since mknative-gcc doesn't
care about the version any more (we keep two versions for gcc/gcc.old)
simply set it to "gcc".


# 1.107 05-Sep-2020 mrg

pull out a few more things for GCC 9.


# 1.106 05-Sep-2020 mrg

port to GCC 9.3.


# 1.105 13-Aug-2020 mrg

set _OUTDIRBASE depending on $0, and then set _OUTDIR based on this.
now you can copy mknative-gcc to mknative-gcc.old without edit.


# 1.104 12-Aug-2020 mrg

mknative-gcc is for GCC 8.4.
mknative-gcc.old is supposed to be for GCC 7, but is the GCC 6
version. update it and mark it for GCC 7.5.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 phil-wifi-20191119
# 1.103 24-Oct-2019 christos

arm needs more files


# 1.102 16-Oct-2019 mrg

copy arm-cpu.h and arm-isa.h for arm platforms.


Revision tags: netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 netbsd-9-base phil-wifi-20190609
# 1.101 23-Feb-2019 mrg

branches: 1.101.2;
pull out libstdc++ config.h as-is, for gnu.ver processing.
pull out the cxx11_sources and cxx98_sources values to avoid hard coding.


# 1.100 09-Feb-2019 mrg

- build the gthr*.h files to be installed on the fly, instead of
having dozens of copies of the same thing in the tree.
- don't fetch any gthr*.h files.
- delete ancient gthr-tpf.h that was removed in GCC 4.8 or so.

this should fix the call_once tests for real now.


# 1.99 04-Feb-2019 mrg

common-target source list is MD. make it so.


# 1.98 04-Feb-2019 mrg

- don't getlinks here, they're no longer used.
- pullout the libcommon, libcommon-target and libgomp source list so they
don't have to be hard coded in the reachover makefile


# 1.97 01-Feb-2019 mrg

- 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


Revision tags: pgoyette-compat-20190127
# 1.96 19-Jan-2019 mrg

make includes works now.

pull out more data needed for headers and fix gthr-defaults.h.

libgcc_s has multiple symbols.


# 1.95 19-Jan-2019 mrg

also pull out these variables:
enable_execute_stack
unwind_header
md_unwind_header
sfp_machine_header
thread_header


Revision tags: pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906
# 1.94 04-Sep-2018 mrg

also pullout INTERNAL_CFLAGS for the libgcc build, where it may have
-DHAVE_CC_TLS defined on the command line. (we already collect all
the other components.)


# 1.93 04-Sep-2018 mrg

in configargs.h, as well as normalising to /usr/src, normalise the
--build to the same as the --host, so that it never changes based
upon the host you ran mknative on. (some recent changes are only
because i updated a system from netbsd-7 to netbsd-8. this will
avoid that in the future.)


Revision tags: pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.92 06-Feb-2018 mrg

branches: 1.92.2; 1.92.4;
also fetch GCOV_DUMP_OBJS.


# 1.91 03-Feb-2018 mrg

pullout port_specific_symbol_files from libstdc++.


# 1.90 04-Oct-2017 christos

use the variable for the source dir instead of duplicating it.


Revision tags: perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104
# 1.89 05-Oct-2016 christos

branches: 1.89.6;
revert our changes; softfloat removal is now done in libgcc/config.host


# 1.88 05-Oct-2016 christos

We provide our own soft-float implementation in libc, so elide the libgcc
sources for it.


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.87 17-Mar-2016 mrg

branches: 1.87.2;
set NETBSD_GCC_VERSION for GCC 5.3 separately.
don't collect crtstuff anymore.


# 1.86 16-Mar-2016 mrg

grab insn-modes.h, and do the libgcc bootstrap from gcc as well.


# 1.85 15-Mar-2016 mrg

- 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


# 1.84 15-Mar-2016 mrg

update for GCC 5.3 libgcov and libstdc++


# 1.83 15-Mar-2016 mrg

very first baby steps towards GCC 5.3 mknative.


# 1.82 24-Jan-2016 mrg

add a comment saying this is for GCC 4.8


# 1.81 31-Jan-2015 mrg

kill the -fPIC that m68000 ends up with, fixing it in the specs
is not trivial..


# 1.80 30-Jan-2015 mrg

canonicalise the src dir to /usr/src, so it doesn't matter
where we run mknative.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.79 29-May-2014 skrll

Don't grab libstdc++-v3/config.h it's not used.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
# 1.78 02-Mar-2014 mrg

branches: 1.78.2;
don't collect gthr-default.h anymore.


# 1.77 02-Mar-2014 mrg

don't collect c++allocator.h. we copy it via G_ALLOCATOR_H we've
already pulled out, and the extra copy can confuse make when it
has an older timestamp than the copy in dist/libstdc++-v3/.


# 1.76 26-Feb-2014 mrg

prepare for moving GCC 4.5 into gcc.old:

- convert to using ${EXTERNAL_GCC_SUBDIR}
- define base-external-gpl3-gcc* subdir as GCC_SUBDIR
- use <bsd.init.mk> over <bsd.own.mk> for a bunch of places; mostly
because it arranges for ../Makefile.inc to be included earlier, and
don't bother including the latter if the former is already included.
- move all .PATH: settings after <bsd.{own,lib}.mk> so that all
valid variables are set before it is evaluated
- rename mknative-gcc* to match their subdir name.

XXX the relationship between the Makefile.inc/Makefile.gcc_path files
is kind of sketchy, it would be great if this was fixed.


# 1.75 16-Feb-2014 skrll

The mpfr sources moved down into a src directory - deal with this in
mknative.


# 1.74 28-Nov-2013 mrg

update to MPC 1.0.1.


# 1.73 20-Oct-2013 skrll

Deleted 1 line too many in previous commit.


# 1.72 20-Oct-2013 skrll

g/c gcc3 goop


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.71 28-Jun-2013 mrg

pass both NEWCONFIGDIR and NETBSDSRCDIR to mknative-gcc.


# 1.70 05-May-2013 skrll

Create a sanitise_includes function and use it everywhere it's needed.


# 1.69 25-Apr-2013 skrll

Avoid populating mknative output with gmp,mpfr, and mpc source
directories


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.68 25-Sep-2012 skrll

More tweaks. I didn't manage to complete a mknative from scratch run, but
this is a step in the right direction.


# 1.67 11-Aug-2012 skrll

branches: 1.67.2;
Grab CRTSTUFF_T_CFLAGS_S.

Gentlement start your mknative runs.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base
# 1.66 10-Jan-2012 skrll

Fix bootstrap-libgcc for gcc 4.5


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.65 13-Oct-2011 matt

branches: 1.65.2;
Fix PPC _SOFT_FLOAT


# 1.64 23-Sep-2011 mrg

since omp.h is part of libgomp, put it in the libgomp files not the
libstdc++ files.


# 1.63 21-Sep-2011 mrg

add libgomp support. needed by "cc -fopenmp", that koffice 2.3 wants to use.


# 1.62 17-Aug-2011 matt

Add an inline ex script to modify configargs.h for powerpc to auto-enable
-msoft-float.


# 1.61 03-Jul-2011 mrg

fix the previous


# 1.60 03-Jul-2011 mrg

-I$DESTDIR/usr/include is escaping into the generated files from
the native-gcc run. add some sed commands to remove them.


# 1.59 03-Jul-2011 mrg

copy sysroot-suffix.h as well, for sh3.


# 1.58 02-Jul-2011 mrg

also pull out LIB2ADD_ST for libgcc.


# 1.57 01-Jul-2011 mrg

avoid creating an unused directory.


# 1.56 01-Jul-2011 mrg

- call each ${MKNATIVE_CONFIG_TARGET_LIBS} target separately
- comment out maybe-all-target-libgcc
- cope with the special transformation needed for gtyp-input.list


# 1.55 30-Jun-2011 mrg

fix previous; they belong in _headers1


# 1.54 30-Jun-2011 mrg

also pull tr1_impl_headers parallel_headers and decimal_headers for libstdc++


# 1.53 29-Jun-2011 mrg

fix all-tree.def, and add gtyp-input.list


# 1.52 29-Jun-2011 mrg

fix the path for libdecnumber.


# 1.51 29-Jun-2011 mrg

get libdecnumber info out of GCC.


# 1.50 28-Jun-2011 mrg

also need bversion.h


# 1.49 28-Jun-2011 mrg

some more updates for GCC 4.5.


# 1.48 23-Jun-2011 mrg

output stuff to the right libiberty dir for gcc 4.5.


# 1.47 23-Jun-2011 mrg

get this some what working with GCC 4.5. i at least have managed to
get crtstuff and libgcc to build for amd64, and have linked and tested
/bin/sh with all these GCC 4.5 compiled part.


# 1.46 21-Jun-2011 mrg

initial port to HAVE_GCC = 45. mknative-gcc parts are from me
and are largely untested, most of the rest is from chuq.


Revision tags: cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.45 17-Dec-2009 uebayasi

branches: 1.45.4;
get_libgcc_new: Make previous work for digit only ABI names.


# 1.44 17-Dec-2009 uebayasi

get_libgcc_new: Teach multilib.


Revision tags: matt-premerge-20091211
# 1.43 01-Dec-2009 uebayasi

Skip parameters for multilib build for now.


# 1.42 01-Dec-2009 uebayasi

Handle cases where *.asm is listed in LIB2FUNCS_EXTRA (gcc/config/rs6000).


# 1.41 30-Nov-2009 uebayasi

Handle cases where database text files don't exist.


# 1.40 30-Nov-2009 uebayasi

Call "template sources" as "tmplsrcs", not "tmpsrcs". Requested by mrg@.


# 1.39 30-Nov-2009 uebayasi

Prefix per-library *.mk files with libs.*.


# 1.38 30-Nov-2009 uebayasi

Now that we know what sources are needed to build a given library, we need
the rules how to build those sources. Generate makefiles defining ${COPTS},
${CPPFLAGS}, and ${SRCS} (== template).

Note that ${CPPFLAGS} is actually dfined as _CPPFLAGS like
_CPPFLAGS.tmp___gcc_bcmp.c=-DL__gcc_bcmp
and used to generate wrapper files (e.g. tmp___gcc_bcmp.c). Otherwise it's
automagically passed to ${CC} by bsd.*.mk.


# 1.37 30-Nov-2009 uebayasi

For each library, generate a makefile of the list of template sources too.


# 1.36 30-Nov-2009 uebayasi

For each library, generate a list of sources (*.[cS]).

We create wrapper sources (tmp_*.[cS]) on-the-fly and compile them. For
example, __gcc_bcmp() is compiled using tmp___gcc_bcmp.c, which #define's
L__gcc_bcmp and #include's libgcc2.c.


# 1.35 30-Nov-2009 uebayasi

Move these analyzing functions into one place, get_libgcc_new_analyze().


# 1.34 30-Nov-2009 uebayasi

Typo.


# 1.33 30-Nov-2009 uebayasi

Generate lists of template sources ("tmpsrcs") for each libraries. We'll
need these to create wrappers of tmpsrcs and define correct dependencies.


# 1.32 30-Nov-2009 uebayasi

Generate *.o -> template *.[cS] ("tmpsrc") mapping.

Functions are built from a template (tmpsrc). We create wrapper sources
(src) and define necessary defines and #include tmpsrc.


# 1.31 30-Nov-2009 uebayasi

- Generate a list of CPP flags used to build *.o. Some files are build
repeatedly with different -DXXX to generate similar objects (e.g. different
type size).

- Generate a list of other CC options to build *.o.

(See my sed-fu using hold space in get_libgcc_list_objs_xflags().)


# 1.30 30-Nov-2009 uebayasi

- Generate a list of *.o -> lib*.{a,so} mapping. This is also known by
parsing dependency lines in libgcc.mk.

- Generate a list of *.o -> *.{c,S} mapping. *.S files are known as
${LIB1ASMFUNCS}. Assume other *.o files are built from *.c. This information
is needed to generated wrapper sources later.


# 1.29 30-Nov-2009 uebayasi

Generate lists of functions built in libgcc libraries. This is known by
pattern matching dependency lines in libgcc.mk.


# 1.28 30-Nov-2009 uebayasi

Generate a list of functions provided as *.S.


# 1.27 30-Nov-2009 uebayasi

Define paths of newly generated files.


# 1.26 30-Nov-2009 uebayasi

Start implementing the new style libgcc "mknative" converter which generates
BSD makefiles to build libgcc. The goal is to build all functions rather
than managing the set of functions in gnu/lib/libgcc/Makefile.in by hand.

Because of the complexity of the build procedure, I leave not only generated
makefiles but also intermediate, analyzed data so that people can verify that
the conversion is done correctly.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE jym-xensuspend-nbase netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2
# 1.25 11-Oct-2008 mrg

- add a i386/t-netbsd64 makefile fragment to build 32/64 bit
libgcc/multilib on amd64
- enable the 32/64 bit libgcc/multilib support on sparc64
- adapt mknative-gcc to grab multilib.h
- use --enable-multilib on amd64 and sparc64

none of this affects the installed tools yet, just the src/tools one.


# 1.24 19-Sep-2008 skrll

Grab libgcov stuff.


Revision tags: wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase hpcarm-cleanup-base
# 1.23 08-Feb-2008 skrll

Collect the libobjc config.h


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-4-base
# 1.22 25-Jun-2006 mrg

branches: 1.22.4; 1.22.10;
convert build/ggc-none.o to build-ggc-none.lo.


# 1.21 24-Jun-2006 mrg

also grab ${_extravars} for GCC4 in the get_gcc() function.


# 1.20 09-Jun-2006 skrll

Fixes for mknative runs on gcc3.

- get the information from a gcc3 .native
- don't get gcc4 variables
- put back the getvars for SHLIB_LINK SHLIB_MULTILIB as they work
on gcc3 and leave as XXX'd on gcc4.

I've re-arranged some of the variables to minimise the differences, but
didn't do them all.


# 1.19 02-Jun-2006 mrg

make this work for GCC3 one again.


# 1.18 23-May-2006 mrg

also grab ALL_OPT_FILES from gcc/Makefile for libobjc4.


# 1.17 15-May-2006 mrg

make sure that c++ headers work again.


# 1.16 12-May-2006 mrg

support GCC4:
- look in gnu/dist/gcc4
- don't build fortran
- use /usr/bin/env -i so that gmake works (XXX - breaks from MAKEFLAGS
in the build.sh generated makewrapper.)
- use gmake and Makefile.gmakehost
- update .native/.configure_done target


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-3-base
# 1.15 10-Dec-2004 mrg

mirror a fix from mknative-binutils:
>fix the sed expression that pulls VPATH out of the makefile to work
>with any number of tabs or spaces after the equal sign.


# 1.14 24-Aug-2004 thorpej

Add code to extract make vars for GCC crtstuff.


# 1.13 01-Jul-2004 skrll

Add some more variables used to build libgcc_s.

Part of the fix for PR 22452.


Revision tags: netbsd-2-0-base
# 1.12 10-Feb-2004 skrll

branches: 1.12.2;
Updates so that mknative gets the right things.

- Disable symbol versioning (for now)
- Make sure that libiberty knows its being configured with a
cross compiler.
- The CXX_* variables are no longer needed/used.
- LIB2FUNCS_EXTRA gets pulled in via LIB2ADD
- Get LIB1ASMFUNCS and LIB2ASMSRC
- MAYBE_USE_COLLECT2 got renamed to USE_COLLECT2 (but might not
be used)
- Get EXTRA_HEADERS so that we get generate the right paths for
CPPFLAGS
- Get some variables related to shared libgcc


# 1.11 02-Jan-2004 skrll

Move libgcc3/*.mk to libgcc3/arch.

Update mknative-gcc.


# 1.10 27-Nov-2003 mrg

fix a comment; normalise.


# 1.9 27-Nov-2003 mrg

use mknative.common


# 1.8 27-Nov-2003 mrg

be a little more verbose about what we're doing when running mknative.
also grab LIB2FUNCS_EXTRA for libgcc3 (old fix for m68000).


# 1.7 22-Aug-2003 mrg

don't want auto-build.h anymore


# 1.6 01-Aug-2003 mrg

we need config.h an another version of gthr-default.h


# 1.5 30-Jul-2003 mrg

fix a typo in previous


# 1.4 30-Jul-2003 mrg

libiberty/config.h needs to become per-arch.


# 1.3 28-Jul-2003 mrg

fix a bug in previous - two $'s are bad


# 1.2 28-Jul-2003 mrg

add another transform for libobjc3


# 1.1 25-Jul-2003 mrg

- build "binutils" and "gcc" separately if USE_TOOLS_TOOLCHAIN is not set
to "yes".
- adjust dbsym/mdsetimage to look in the correct place for libbfd.
- new mknative-gcc based in toolchain/mknative


# 1.109 06-Sep-2020 mrg

pass down earm* not earmv5* to mknative-gcc.


# 1.108 05-Sep-2020 mrg

disable fetching stuff from libsanitizer for now. it needs libstdc++
to build in mknative using gcc makefiles, and our locale changes break
the "normal" build of this.

make sure MKNATIVE_TARGET is always set. since mknative-gcc doesn't
care about the version any more (we keep two versions for gcc/gcc.old)
simply set it to "gcc".


# 1.107 05-Sep-2020 mrg

pull out a few more things for GCC 9.


# 1.106 05-Sep-2020 mrg

port to GCC 9.3.


# 1.105 13-Aug-2020 mrg

set _OUTDIRBASE depending on $0, and then set _OUTDIR based on this.
now you can copy mknative-gcc to mknative-gcc.old without edit.


# 1.104 12-Aug-2020 mrg

mknative-gcc is for GCC 8.4.
mknative-gcc.old is supposed to be for GCC 7, but is the GCC 6
version. update it and mark it for GCC 7.5.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 phil-wifi-20191119
# 1.103 24-Oct-2019 christos

arm needs more files


# 1.102 16-Oct-2019 mrg

copy arm-cpu.h and arm-isa.h for arm platforms.


Revision tags: netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 netbsd-9-base phil-wifi-20190609
# 1.101 23-Feb-2019 mrg

branches: 1.101.2;
pull out libstdc++ config.h as-is, for gnu.ver processing.
pull out the cxx11_sources and cxx98_sources values to avoid hard coding.


# 1.100 09-Feb-2019 mrg

- build the gthr*.h files to be installed on the fly, instead of
having dozens of copies of the same thing in the tree.
- don't fetch any gthr*.h files.
- delete ancient gthr-tpf.h that was removed in GCC 4.8 or so.

this should fix the call_once tests for real now.


# 1.99 04-Feb-2019 mrg

common-target source list is MD. make it so.


# 1.98 04-Feb-2019 mrg

- don't getlinks here, they're no longer used.
- pullout the libcommon, libcommon-target and libgomp source list so they
don't have to be hard coded in the reachover makefile


# 1.97 01-Feb-2019 mrg

- 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


Revision tags: pgoyette-compat-20190127
# 1.96 19-Jan-2019 mrg

make includes works now.

pull out more data needed for headers and fix gthr-defaults.h.

libgcc_s has multiple symbols.


# 1.95 19-Jan-2019 mrg

also pull out these variables:
enable_execute_stack
unwind_header
md_unwind_header
sfp_machine_header
thread_header


Revision tags: pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906
# 1.94 04-Sep-2018 mrg

also pullout INTERNAL_CFLAGS for the libgcc build, where it may have
-DHAVE_CC_TLS defined on the command line. (we already collect all
the other components.)


# 1.93 04-Sep-2018 mrg

in configargs.h, as well as normalising to /usr/src, normalise the
--build to the same as the --host, so that it never changes based
upon the host you ran mknative on. (some recent changes are only
because i updated a system from netbsd-7 to netbsd-8. this will
avoid that in the future.)


Revision tags: pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.92 06-Feb-2018 mrg

branches: 1.92.2; 1.92.4;
also fetch GCOV_DUMP_OBJS.


# 1.91 03-Feb-2018 mrg

pullout port_specific_symbol_files from libstdc++.


# 1.90 04-Oct-2017 christos

use the variable for the source dir instead of duplicating it.


Revision tags: perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104
# 1.89 05-Oct-2016 christos

branches: 1.89.6;
revert our changes; softfloat removal is now done in libgcc/config.host


# 1.88 05-Oct-2016 christos

We provide our own soft-float implementation in libc, so elide the libgcc
sources for it.


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.87 17-Mar-2016 mrg

branches: 1.87.2;
set NETBSD_GCC_VERSION for GCC 5.3 separately.
don't collect crtstuff anymore.


# 1.86 16-Mar-2016 mrg

grab insn-modes.h, and do the libgcc bootstrap from gcc as well.


# 1.85 15-Mar-2016 mrg

- 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


# 1.84 15-Mar-2016 mrg

update for GCC 5.3 libgcov and libstdc++


# 1.83 15-Mar-2016 mrg

very first baby steps towards GCC 5.3 mknative.


# 1.82 24-Jan-2016 mrg

add a comment saying this is for GCC 4.8


# 1.81 31-Jan-2015 mrg

kill the -fPIC that m68000 ends up with, fixing it in the specs
is not trivial..


# 1.80 30-Jan-2015 mrg

canonicalise the src dir to /usr/src, so it doesn't matter
where we run mknative.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.79 29-May-2014 skrll

Don't grab libstdc++-v3/config.h it's not used.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
# 1.78 02-Mar-2014 mrg

branches: 1.78.2;
don't collect gthr-default.h anymore.


# 1.77 02-Mar-2014 mrg

don't collect c++allocator.h. we copy it via G_ALLOCATOR_H we've
already pulled out, and the extra copy can confuse make when it
has an older timestamp than the copy in dist/libstdc++-v3/.


# 1.76 26-Feb-2014 mrg

prepare for moving GCC 4.5 into gcc.old:

- convert to using ${EXTERNAL_GCC_SUBDIR}
- define base-external-gpl3-gcc* subdir as GCC_SUBDIR
- use <bsd.init.mk> over <bsd.own.mk> for a bunch of places; mostly
because it arranges for ../Makefile.inc to be included earlier, and
don't bother including the latter if the former is already included.
- move all .PATH: settings after <bsd.{own,lib}.mk> so that all
valid variables are set before it is evaluated
- rename mknative-gcc* to match their subdir name.

XXX the relationship between the Makefile.inc/Makefile.gcc_path files
is kind of sketchy, it would be great if this was fixed.


# 1.75 16-Feb-2014 skrll

The mpfr sources moved down into a src directory - deal with this in
mknative.


# 1.74 28-Nov-2013 mrg

update to MPC 1.0.1.


# 1.73 20-Oct-2013 skrll

Deleted 1 line too many in previous commit.


# 1.72 20-Oct-2013 skrll

g/c gcc3 goop


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.71 28-Jun-2013 mrg

pass both NEWCONFIGDIR and NETBSDSRCDIR to mknative-gcc.


# 1.70 05-May-2013 skrll

Create a sanitise_includes function and use it everywhere it's needed.


# 1.69 25-Apr-2013 skrll

Avoid populating mknative output with gmp,mpfr, and mpc source
directories


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.68 25-Sep-2012 skrll

More tweaks. I didn't manage to complete a mknative from scratch run, but
this is a step in the right direction.


# 1.67 11-Aug-2012 skrll

branches: 1.67.2;
Grab CRTSTUFF_T_CFLAGS_S.

Gentlement start your mknative runs.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base
# 1.66 10-Jan-2012 skrll

Fix bootstrap-libgcc for gcc 4.5


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.65 13-Oct-2011 matt

branches: 1.65.2;
Fix PPC _SOFT_FLOAT


# 1.64 23-Sep-2011 mrg

since omp.h is part of libgomp, put it in the libgomp files not the
libstdc++ files.


# 1.63 21-Sep-2011 mrg

add libgomp support. needed by "cc -fopenmp", that koffice 2.3 wants to use.


# 1.62 17-Aug-2011 matt

Add an inline ex script to modify configargs.h for powerpc to auto-enable
-msoft-float.


# 1.61 03-Jul-2011 mrg

fix the previous


# 1.60 03-Jul-2011 mrg

-I$DESTDIR/usr/include is escaping into the generated files from
the native-gcc run. add some sed commands to remove them.


# 1.59 03-Jul-2011 mrg

copy sysroot-suffix.h as well, for sh3.


# 1.58 02-Jul-2011 mrg

also pull out LIB2ADD_ST for libgcc.


# 1.57 01-Jul-2011 mrg

avoid creating an unused directory.


# 1.56 01-Jul-2011 mrg

- call each ${MKNATIVE_CONFIG_TARGET_LIBS} target separately
- comment out maybe-all-target-libgcc
- cope with the special transformation needed for gtyp-input.list


# 1.55 30-Jun-2011 mrg

fix previous; they belong in _headers1


# 1.54 30-Jun-2011 mrg

also pull tr1_impl_headers parallel_headers and decimal_headers for libstdc++


# 1.53 29-Jun-2011 mrg

fix all-tree.def, and add gtyp-input.list


# 1.52 29-Jun-2011 mrg

fix the path for libdecnumber.


# 1.51 29-Jun-2011 mrg

get libdecnumber info out of GCC.


# 1.50 28-Jun-2011 mrg

also need bversion.h


# 1.49 28-Jun-2011 mrg

some more updates for GCC 4.5.


# 1.48 23-Jun-2011 mrg

output stuff to the right libiberty dir for gcc 4.5.


# 1.47 23-Jun-2011 mrg

get this some what working with GCC 4.5. i at least have managed to
get crtstuff and libgcc to build for amd64, and have linked and tested
/bin/sh with all these GCC 4.5 compiled part.


# 1.46 21-Jun-2011 mrg

initial port to HAVE_GCC = 45. mknative-gcc parts are from me
and are largely untested, most of the rest is from chuq.


Revision tags: cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.45 17-Dec-2009 uebayasi

branches: 1.45.4;
get_libgcc_new: Make previous work for digit only ABI names.


# 1.44 17-Dec-2009 uebayasi

get_libgcc_new: Teach multilib.


Revision tags: matt-premerge-20091211
# 1.43 01-Dec-2009 uebayasi

Skip parameters for multilib build for now.


# 1.42 01-Dec-2009 uebayasi

Handle cases where *.asm is listed in LIB2FUNCS_EXTRA (gcc/config/rs6000).


# 1.41 30-Nov-2009 uebayasi

Handle cases where database text files don't exist.


# 1.40 30-Nov-2009 uebayasi

Call "template sources" as "tmplsrcs", not "tmpsrcs". Requested by mrg@.


# 1.39 30-Nov-2009 uebayasi

Prefix per-library *.mk files with libs.*.


# 1.38 30-Nov-2009 uebayasi

Now that we know what sources are needed to build a given library, we need
the rules how to build those sources. Generate makefiles defining ${COPTS},
${CPPFLAGS}, and ${SRCS} (== template).

Note that ${CPPFLAGS} is actually dfined as _CPPFLAGS like
_CPPFLAGS.tmp___gcc_bcmp.c=-DL__gcc_bcmp
and used to generate wrapper files (e.g. tmp___gcc_bcmp.c). Otherwise it's
automagically passed to ${CC} by bsd.*.mk.


# 1.37 30-Nov-2009 uebayasi

For each library, generate a makefile of the list of template sources too.


# 1.36 30-Nov-2009 uebayasi

For each library, generate a list of sources (*.[cS]).

We create wrapper sources (tmp_*.[cS]) on-the-fly and compile them. For
example, __gcc_bcmp() is compiled using tmp___gcc_bcmp.c, which #define's
L__gcc_bcmp and #include's libgcc2.c.


# 1.35 30-Nov-2009 uebayasi

Move these analyzing functions into one place, get_libgcc_new_analyze().


# 1.34 30-Nov-2009 uebayasi

Typo.


# 1.33 30-Nov-2009 uebayasi

Generate lists of template sources ("tmpsrcs") for each libraries. We'll
need these to create wrappers of tmpsrcs and define correct dependencies.


# 1.32 30-Nov-2009 uebayasi

Generate *.o -> template *.[cS] ("tmpsrc") mapping.

Functions are built from a template (tmpsrc). We create wrapper sources
(src) and define necessary defines and #include tmpsrc.


# 1.31 30-Nov-2009 uebayasi

- Generate a list of CPP flags used to build *.o. Some files are build
repeatedly with different -DXXX to generate similar objects (e.g. different
type size).

- Generate a list of other CC options to build *.o.

(See my sed-fu using hold space in get_libgcc_list_objs_xflags().)


# 1.30 30-Nov-2009 uebayasi

- Generate a list of *.o -> lib*.{a,so} mapping. This is also known by
parsing dependency lines in libgcc.mk.

- Generate a list of *.o -> *.{c,S} mapping. *.S files are known as
${LIB1ASMFUNCS}. Assume other *.o files are built from *.c. This information
is needed to generated wrapper sources later.


# 1.29 30-Nov-2009 uebayasi

Generate lists of functions built in libgcc libraries. This is known by
pattern matching dependency lines in libgcc.mk.


# 1.28 30-Nov-2009 uebayasi

Generate a list of functions provided as *.S.


# 1.27 30-Nov-2009 uebayasi

Define paths of newly generated files.


# 1.26 30-Nov-2009 uebayasi

Start implementing the new style libgcc "mknative" converter which generates
BSD makefiles to build libgcc. The goal is to build all functions rather
than managing the set of functions in gnu/lib/libgcc/Makefile.in by hand.

Because of the complexity of the build procedure, I leave not only generated
makefiles but also intermediate, analyzed data so that people can verify that
the conversion is done correctly.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE jym-xensuspend-nbase netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2
# 1.25 11-Oct-2008 mrg

- add a i386/t-netbsd64 makefile fragment to build 32/64 bit
libgcc/multilib on amd64
- enable the 32/64 bit libgcc/multilib support on sparc64
- adapt mknative-gcc to grab multilib.h
- use --enable-multilib on amd64 and sparc64

none of this affects the installed tools yet, just the src/tools one.


# 1.24 19-Sep-2008 skrll

Grab libgcov stuff.


Revision tags: wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase hpcarm-cleanup-base
# 1.23 08-Feb-2008 skrll

Collect the libobjc config.h


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-4-base
# 1.22 25-Jun-2006 mrg

branches: 1.22.4; 1.22.10;
convert build/ggc-none.o to build-ggc-none.lo.


# 1.21 24-Jun-2006 mrg

also grab ${_extravars} for GCC4 in the get_gcc() function.


# 1.20 09-Jun-2006 skrll

Fixes for mknative runs on gcc3.

- get the information from a gcc3 .native
- don't get gcc4 variables
- put back the getvars for SHLIB_LINK SHLIB_MULTILIB as they work
on gcc3 and leave as XXX'd on gcc4.

I've re-arranged some of the variables to minimise the differences, but
didn't do them all.


# 1.19 02-Jun-2006 mrg

make this work for GCC3 one again.


# 1.18 23-May-2006 mrg

also grab ALL_OPT_FILES from gcc/Makefile for libobjc4.


# 1.17 15-May-2006 mrg

make sure that c++ headers work again.


# 1.16 12-May-2006 mrg

support GCC4:
- look in gnu/dist/gcc4
- don't build fortran
- use /usr/bin/env -i so that gmake works (XXX - breaks from MAKEFLAGS
in the build.sh generated makewrapper.)
- use gmake and Makefile.gmakehost
- update .native/.configure_done target


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-3-base
# 1.15 10-Dec-2004 mrg

mirror a fix from mknative-binutils:
>fix the sed expression that pulls VPATH out of the makefile to work
>with any number of tabs or spaces after the equal sign.


# 1.14 24-Aug-2004 thorpej

Add code to extract make vars for GCC crtstuff.


# 1.13 01-Jul-2004 skrll

Add some more variables used to build libgcc_s.

Part of the fix for PR 22452.


Revision tags: netbsd-2-0-base
# 1.12 10-Feb-2004 skrll

branches: 1.12.2;
Updates so that mknative gets the right things.

- Disable symbol versioning (for now)
- Make sure that libiberty knows its being configured with a
cross compiler.
- The CXX_* variables are no longer needed/used.
- LIB2FUNCS_EXTRA gets pulled in via LIB2ADD
- Get LIB1ASMFUNCS and LIB2ASMSRC
- MAYBE_USE_COLLECT2 got renamed to USE_COLLECT2 (but might not
be used)
- Get EXTRA_HEADERS so that we get generate the right paths for
CPPFLAGS
- Get some variables related to shared libgcc


# 1.11 02-Jan-2004 skrll

Move libgcc3/*.mk to libgcc3/arch.

Update mknative-gcc.


# 1.10 27-Nov-2003 mrg

fix a comment; normalise.


# 1.9 27-Nov-2003 mrg

use mknative.common


# 1.8 27-Nov-2003 mrg

be a little more verbose about what we're doing when running mknative.
also grab LIB2FUNCS_EXTRA for libgcc3 (old fix for m68000).


# 1.7 22-Aug-2003 mrg

don't want auto-build.h anymore


# 1.6 01-Aug-2003 mrg

we need config.h an another version of gthr-default.h


# 1.5 30-Jul-2003 mrg

fix a typo in previous


# 1.4 30-Jul-2003 mrg

libiberty/config.h needs to become per-arch.


# 1.3 28-Jul-2003 mrg

fix a bug in previous - two $'s are bad


# 1.2 28-Jul-2003 mrg

add another transform for libobjc3


# 1.1 25-Jul-2003 mrg

- build "binutils" and "gcc" separately if USE_TOOLS_TOOLCHAIN is not set
to "yes".
- adjust dbsym/mdsetimage to look in the correct place for libbfd.
- new mknative-gcc based in toolchain/mknative


# 1.108 05-Sep-2020 mrg

disable fetching stuff from libsanitizer for now. it needs libstdc++
to build in mknative using gcc makefiles, and our locale changes break
the "normal" build of this.

make sure MKNATIVE_TARGET is always set. since mknative-gcc doesn't
care about the version any more (we keep two versions for gcc/gcc.old)
simply set it to "gcc".


# 1.107 05-Sep-2020 mrg

pull out a few more things for GCC 9.


# 1.106 05-Sep-2020 mrg

port to GCC 9.3.


# 1.105 13-Aug-2020 mrg

set _OUTDIRBASE depending on $0, and then set _OUTDIR based on this.
now you can copy mknative-gcc to mknative-gcc.old without edit.


# 1.104 12-Aug-2020 mrg

mknative-gcc is for GCC 8.4.
mknative-gcc.old is supposed to be for GCC 7, but is the GCC 6
version. update it and mark it for GCC 7.5.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 phil-wifi-20191119
# 1.103 24-Oct-2019 christos

arm needs more files


# 1.102 16-Oct-2019 mrg

copy arm-cpu.h and arm-isa.h for arm platforms.


Revision tags: netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 netbsd-9-base phil-wifi-20190609
# 1.101 23-Feb-2019 mrg

branches: 1.101.2;
pull out libstdc++ config.h as-is, for gnu.ver processing.
pull out the cxx11_sources and cxx98_sources values to avoid hard coding.


# 1.100 09-Feb-2019 mrg

- build the gthr*.h files to be installed on the fly, instead of
having dozens of copies of the same thing in the tree.
- don't fetch any gthr*.h files.
- delete ancient gthr-tpf.h that was removed in GCC 4.8 or so.

this should fix the call_once tests for real now.


# 1.99 04-Feb-2019 mrg

common-target source list is MD. make it so.


# 1.98 04-Feb-2019 mrg

- don't getlinks here, they're no longer used.
- pullout the libcommon, libcommon-target and libgomp source list so they
don't have to be hard coded in the reachover makefile


# 1.97 01-Feb-2019 mrg

- 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


Revision tags: pgoyette-compat-20190127
# 1.96 19-Jan-2019 mrg

make includes works now.

pull out more data needed for headers and fix gthr-defaults.h.

libgcc_s has multiple symbols.


# 1.95 19-Jan-2019 mrg

also pull out these variables:
enable_execute_stack
unwind_header
md_unwind_header
sfp_machine_header
thread_header


Revision tags: pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906
# 1.94 04-Sep-2018 mrg

also pullout INTERNAL_CFLAGS for the libgcc build, where it may have
-DHAVE_CC_TLS defined on the command line. (we already collect all
the other components.)


# 1.93 04-Sep-2018 mrg

in configargs.h, as well as normalising to /usr/src, normalise the
--build to the same as the --host, so that it never changes based
upon the host you ran mknative on. (some recent changes are only
because i updated a system from netbsd-7 to netbsd-8. this will
avoid that in the future.)


Revision tags: pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.92 06-Feb-2018 mrg

branches: 1.92.2; 1.92.4;
also fetch GCOV_DUMP_OBJS.


# 1.91 03-Feb-2018 mrg

pullout port_specific_symbol_files from libstdc++.


# 1.90 04-Oct-2017 christos

use the variable for the source dir instead of duplicating it.


Revision tags: perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104
# 1.89 05-Oct-2016 christos

branches: 1.89.6;
revert our changes; softfloat removal is now done in libgcc/config.host


# 1.88 05-Oct-2016 christos

We provide our own soft-float implementation in libc, so elide the libgcc
sources for it.


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.87 17-Mar-2016 mrg

branches: 1.87.2;
set NETBSD_GCC_VERSION for GCC 5.3 separately.
don't collect crtstuff anymore.


# 1.86 16-Mar-2016 mrg

grab insn-modes.h, and do the libgcc bootstrap from gcc as well.


# 1.85 15-Mar-2016 mrg

- 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


# 1.84 15-Mar-2016 mrg

update for GCC 5.3 libgcov and libstdc++


# 1.83 15-Mar-2016 mrg

very first baby steps towards GCC 5.3 mknative.


# 1.82 24-Jan-2016 mrg

add a comment saying this is for GCC 4.8


# 1.81 31-Jan-2015 mrg

kill the -fPIC that m68000 ends up with, fixing it in the specs
is not trivial..


# 1.80 30-Jan-2015 mrg

canonicalise the src dir to /usr/src, so it doesn't matter
where we run mknative.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.79 29-May-2014 skrll

Don't grab libstdc++-v3/config.h it's not used.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
# 1.78 02-Mar-2014 mrg

branches: 1.78.2;
don't collect gthr-default.h anymore.


# 1.77 02-Mar-2014 mrg

don't collect c++allocator.h. we copy it via G_ALLOCATOR_H we've
already pulled out, and the extra copy can confuse make when it
has an older timestamp than the copy in dist/libstdc++-v3/.


# 1.76 26-Feb-2014 mrg

prepare for moving GCC 4.5 into gcc.old:

- convert to using ${EXTERNAL_GCC_SUBDIR}
- define base-external-gpl3-gcc* subdir as GCC_SUBDIR
- use <bsd.init.mk> over <bsd.own.mk> for a bunch of places; mostly
because it arranges for ../Makefile.inc to be included earlier, and
don't bother including the latter if the former is already included.
- move all .PATH: settings after <bsd.{own,lib}.mk> so that all
valid variables are set before it is evaluated
- rename mknative-gcc* to match their subdir name.

XXX the relationship between the Makefile.inc/Makefile.gcc_path files
is kind of sketchy, it would be great if this was fixed.


# 1.75 16-Feb-2014 skrll

The mpfr sources moved down into a src directory - deal with this in
mknative.


# 1.74 28-Nov-2013 mrg

update to MPC 1.0.1.


# 1.73 20-Oct-2013 skrll

Deleted 1 line too many in previous commit.


# 1.72 20-Oct-2013 skrll

g/c gcc3 goop


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.71 28-Jun-2013 mrg

pass both NEWCONFIGDIR and NETBSDSRCDIR to mknative-gcc.


# 1.70 05-May-2013 skrll

Create a sanitise_includes function and use it everywhere it's needed.


# 1.69 25-Apr-2013 skrll

Avoid populating mknative output with gmp,mpfr, and mpc source
directories


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.68 25-Sep-2012 skrll

More tweaks. I didn't manage to complete a mknative from scratch run, but
this is a step in the right direction.


# 1.67 11-Aug-2012 skrll

branches: 1.67.2;
Grab CRTSTUFF_T_CFLAGS_S.

Gentlement start your mknative runs.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base
# 1.66 10-Jan-2012 skrll

Fix bootstrap-libgcc for gcc 4.5


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.65 13-Oct-2011 matt

branches: 1.65.2;
Fix PPC _SOFT_FLOAT


# 1.64 23-Sep-2011 mrg

since omp.h is part of libgomp, put it in the libgomp files not the
libstdc++ files.


# 1.63 21-Sep-2011 mrg

add libgomp support. needed by "cc -fopenmp", that koffice 2.3 wants to use.


# 1.62 17-Aug-2011 matt

Add an inline ex script to modify configargs.h for powerpc to auto-enable
-msoft-float.


# 1.61 03-Jul-2011 mrg

fix the previous


# 1.60 03-Jul-2011 mrg

-I$DESTDIR/usr/include is escaping into the generated files from
the native-gcc run. add some sed commands to remove them.


# 1.59 03-Jul-2011 mrg

copy sysroot-suffix.h as well, for sh3.


# 1.58 02-Jul-2011 mrg

also pull out LIB2ADD_ST for libgcc.


# 1.57 01-Jul-2011 mrg

avoid creating an unused directory.


# 1.56 01-Jul-2011 mrg

- call each ${MKNATIVE_CONFIG_TARGET_LIBS} target separately
- comment out maybe-all-target-libgcc
- cope with the special transformation needed for gtyp-input.list


# 1.55 30-Jun-2011 mrg

fix previous; they belong in _headers1


# 1.54 30-Jun-2011 mrg

also pull tr1_impl_headers parallel_headers and decimal_headers for libstdc++


# 1.53 29-Jun-2011 mrg

fix all-tree.def, and add gtyp-input.list


# 1.52 29-Jun-2011 mrg

fix the path for libdecnumber.


# 1.51 29-Jun-2011 mrg

get libdecnumber info out of GCC.


# 1.50 28-Jun-2011 mrg

also need bversion.h


# 1.49 28-Jun-2011 mrg

some more updates for GCC 4.5.


# 1.48 23-Jun-2011 mrg

output stuff to the right libiberty dir for gcc 4.5.


# 1.47 23-Jun-2011 mrg

get this some what working with GCC 4.5. i at least have managed to
get crtstuff and libgcc to build for amd64, and have linked and tested
/bin/sh with all these GCC 4.5 compiled part.


# 1.46 21-Jun-2011 mrg

initial port to HAVE_GCC = 45. mknative-gcc parts are from me
and are largely untested, most of the rest is from chuq.


Revision tags: cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.45 17-Dec-2009 uebayasi

branches: 1.45.4;
get_libgcc_new: Make previous work for digit only ABI names.


# 1.44 17-Dec-2009 uebayasi

get_libgcc_new: Teach multilib.


Revision tags: matt-premerge-20091211
# 1.43 01-Dec-2009 uebayasi

Skip parameters for multilib build for now.


# 1.42 01-Dec-2009 uebayasi

Handle cases where *.asm is listed in LIB2FUNCS_EXTRA (gcc/config/rs6000).


# 1.41 30-Nov-2009 uebayasi

Handle cases where database text files don't exist.


# 1.40 30-Nov-2009 uebayasi

Call "template sources" as "tmplsrcs", not "tmpsrcs". Requested by mrg@.


# 1.39 30-Nov-2009 uebayasi

Prefix per-library *.mk files with libs.*.


# 1.38 30-Nov-2009 uebayasi

Now that we know what sources are needed to build a given library, we need
the rules how to build those sources. Generate makefiles defining ${COPTS},
${CPPFLAGS}, and ${SRCS} (== template).

Note that ${CPPFLAGS} is actually dfined as _CPPFLAGS like
_CPPFLAGS.tmp___gcc_bcmp.c=-DL__gcc_bcmp
and used to generate wrapper files (e.g. tmp___gcc_bcmp.c). Otherwise it's
automagically passed to ${CC} by bsd.*.mk.


# 1.37 30-Nov-2009 uebayasi

For each library, generate a makefile of the list of template sources too.


# 1.36 30-Nov-2009 uebayasi

For each library, generate a list of sources (*.[cS]).

We create wrapper sources (tmp_*.[cS]) on-the-fly and compile them. For
example, __gcc_bcmp() is compiled using tmp___gcc_bcmp.c, which #define's
L__gcc_bcmp and #include's libgcc2.c.


# 1.35 30-Nov-2009 uebayasi

Move these analyzing functions into one place, get_libgcc_new_analyze().


# 1.34 30-Nov-2009 uebayasi

Typo.


# 1.33 30-Nov-2009 uebayasi

Generate lists of template sources ("tmpsrcs") for each libraries. We'll
need these to create wrappers of tmpsrcs and define correct dependencies.


# 1.32 30-Nov-2009 uebayasi

Generate *.o -> template *.[cS] ("tmpsrc") mapping.

Functions are built from a template (tmpsrc). We create wrapper sources
(src) and define necessary defines and #include tmpsrc.


# 1.31 30-Nov-2009 uebayasi

- Generate a list of CPP flags used to build *.o. Some files are build
repeatedly with different -DXXX to generate similar objects (e.g. different
type size).

- Generate a list of other CC options to build *.o.

(See my sed-fu using hold space in get_libgcc_list_objs_xflags().)


# 1.30 30-Nov-2009 uebayasi

- Generate a list of *.o -> lib*.{a,so} mapping. This is also known by
parsing dependency lines in libgcc.mk.

- Generate a list of *.o -> *.{c,S} mapping. *.S files are known as
${LIB1ASMFUNCS}. Assume other *.o files are built from *.c. This information
is needed to generated wrapper sources later.


# 1.29 30-Nov-2009 uebayasi

Generate lists of functions built in libgcc libraries. This is known by
pattern matching dependency lines in libgcc.mk.


# 1.28 30-Nov-2009 uebayasi

Generate a list of functions provided as *.S.


# 1.27 30-Nov-2009 uebayasi

Define paths of newly generated files.


# 1.26 30-Nov-2009 uebayasi

Start implementing the new style libgcc "mknative" converter which generates
BSD makefiles to build libgcc. The goal is to build all functions rather
than managing the set of functions in gnu/lib/libgcc/Makefile.in by hand.

Because of the complexity of the build procedure, I leave not only generated
makefiles but also intermediate, analyzed data so that people can verify that
the conversion is done correctly.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE jym-xensuspend-nbase netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2
# 1.25 11-Oct-2008 mrg

- add a i386/t-netbsd64 makefile fragment to build 32/64 bit
libgcc/multilib on amd64
- enable the 32/64 bit libgcc/multilib support on sparc64
- adapt mknative-gcc to grab multilib.h
- use --enable-multilib on amd64 and sparc64

none of this affects the installed tools yet, just the src/tools one.


# 1.24 19-Sep-2008 skrll

Grab libgcov stuff.


Revision tags: wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase hpcarm-cleanup-base
# 1.23 08-Feb-2008 skrll

Collect the libobjc config.h


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-4-base
# 1.22 25-Jun-2006 mrg

branches: 1.22.4; 1.22.10;
convert build/ggc-none.o to build-ggc-none.lo.


# 1.21 24-Jun-2006 mrg

also grab ${_extravars} for GCC4 in the get_gcc() function.


# 1.20 09-Jun-2006 skrll

Fixes for mknative runs on gcc3.

- get the information from a gcc3 .native
- don't get gcc4 variables
- put back the getvars for SHLIB_LINK SHLIB_MULTILIB as they work
on gcc3 and leave as XXX'd on gcc4.

I've re-arranged some of the variables to minimise the differences, but
didn't do them all.


# 1.19 02-Jun-2006 mrg

make this work for GCC3 one again.


# 1.18 23-May-2006 mrg

also grab ALL_OPT_FILES from gcc/Makefile for libobjc4.


# 1.17 15-May-2006 mrg

make sure that c++ headers work again.


# 1.16 12-May-2006 mrg

support GCC4:
- look in gnu/dist/gcc4
- don't build fortran
- use /usr/bin/env -i so that gmake works (XXX - breaks from MAKEFLAGS
in the build.sh generated makewrapper.)
- use gmake and Makefile.gmakehost
- update .native/.configure_done target


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-3-base
# 1.15 10-Dec-2004 mrg

mirror a fix from mknative-binutils:
>fix the sed expression that pulls VPATH out of the makefile to work
>with any number of tabs or spaces after the equal sign.


# 1.14 24-Aug-2004 thorpej

Add code to extract make vars for GCC crtstuff.


# 1.13 01-Jul-2004 skrll

Add some more variables used to build libgcc_s.

Part of the fix for PR 22452.


Revision tags: netbsd-2-0-base
# 1.12 10-Feb-2004 skrll

branches: 1.12.2;
Updates so that mknative gets the right things.

- Disable symbol versioning (for now)
- Make sure that libiberty knows its being configured with a
cross compiler.
- The CXX_* variables are no longer needed/used.
- LIB2FUNCS_EXTRA gets pulled in via LIB2ADD
- Get LIB1ASMFUNCS and LIB2ASMSRC
- MAYBE_USE_COLLECT2 got renamed to USE_COLLECT2 (but might not
be used)
- Get EXTRA_HEADERS so that we get generate the right paths for
CPPFLAGS
- Get some variables related to shared libgcc


# 1.11 02-Jan-2004 skrll

Move libgcc3/*.mk to libgcc3/arch.

Update mknative-gcc.


# 1.10 27-Nov-2003 mrg

fix a comment; normalise.


# 1.9 27-Nov-2003 mrg

use mknative.common


# 1.8 27-Nov-2003 mrg

be a little more verbose about what we're doing when running mknative.
also grab LIB2FUNCS_EXTRA for libgcc3 (old fix for m68000).


# 1.7 22-Aug-2003 mrg

don't want auto-build.h anymore


# 1.6 01-Aug-2003 mrg

we need config.h an another version of gthr-default.h


# 1.5 30-Jul-2003 mrg

fix a typo in previous


# 1.4 30-Jul-2003 mrg

libiberty/config.h needs to become per-arch.


# 1.3 28-Jul-2003 mrg

fix a bug in previous - two $'s are bad


# 1.2 28-Jul-2003 mrg

add another transform for libobjc3


# 1.1 25-Jul-2003 mrg

- build "binutils" and "gcc" separately if USE_TOOLS_TOOLCHAIN is not set
to "yes".
- adjust dbsym/mdsetimage to look in the correct place for libbfd.
- new mknative-gcc based in toolchain/mknative


# 1.105 13-Aug-2020 mrg

set _OUTDIRBASE depending on $0, and then set _OUTDIR based on this.
now you can copy mknative-gcc to mknative-gcc.old without edit.


# 1.104 12-Aug-2020 mrg

mknative-gcc is for GCC 8.4.
mknative-gcc.old is supposed to be for GCC 7, but is the GCC 6
version. update it and mark it for GCC 7.5.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 phil-wifi-20191119
# 1.103 24-Oct-2019 christos

arm needs more files


# 1.102 16-Oct-2019 mrg

copy arm-cpu.h and arm-isa.h for arm platforms.


Revision tags: netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 netbsd-9-base phil-wifi-20190609
# 1.101 23-Feb-2019 mrg

pull out libstdc++ config.h as-is, for gnu.ver processing.
pull out the cxx11_sources and cxx98_sources values to avoid hard coding.


# 1.100 09-Feb-2019 mrg

- build the gthr*.h files to be installed on the fly, instead of
having dozens of copies of the same thing in the tree.
- don't fetch any gthr*.h files.
- delete ancient gthr-tpf.h that was removed in GCC 4.8 or so.

this should fix the call_once tests for real now.


# 1.99 04-Feb-2019 mrg

common-target source list is MD. make it so.


# 1.98 04-Feb-2019 mrg

- don't getlinks here, they're no longer used.
- pullout the libcommon, libcommon-target and libgomp source list so they
don't have to be hard coded in the reachover makefile


# 1.97 01-Feb-2019 mrg

- 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


Revision tags: pgoyette-compat-20190127
# 1.96 19-Jan-2019 mrg

make includes works now.

pull out more data needed for headers and fix gthr-defaults.h.

libgcc_s has multiple symbols.


# 1.95 19-Jan-2019 mrg

also pull out these variables:
enable_execute_stack
unwind_header
md_unwind_header
sfp_machine_header
thread_header


Revision tags: pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906
# 1.94 04-Sep-2018 mrg

also pullout INTERNAL_CFLAGS for the libgcc build, where it may have
-DHAVE_CC_TLS defined on the command line. (we already collect all
the other components.)


# 1.93 04-Sep-2018 mrg

in configargs.h, as well as normalising to /usr/src, normalise the
--build to the same as the --host, so that it never changes based
upon the host you ran mknative on. (some recent changes are only
because i updated a system from netbsd-7 to netbsd-8. this will
avoid that in the future.)


Revision tags: pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.92 06-Feb-2018 mrg

branches: 1.92.2; 1.92.4;
also fetch GCOV_DUMP_OBJS.


# 1.91 03-Feb-2018 mrg

pullout port_specific_symbol_files from libstdc++.


# 1.90 04-Oct-2017 christos

use the variable for the source dir instead of duplicating it.


Revision tags: perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104
# 1.89 05-Oct-2016 christos

branches: 1.89.6;
revert our changes; softfloat removal is now done in libgcc/config.host


# 1.88 05-Oct-2016 christos

We provide our own soft-float implementation in libc, so elide the libgcc
sources for it.


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.87 17-Mar-2016 mrg

branches: 1.87.2;
set NETBSD_GCC_VERSION for GCC 5.3 separately.
don't collect crtstuff anymore.


# 1.86 16-Mar-2016 mrg

grab insn-modes.h, and do the libgcc bootstrap from gcc as well.


# 1.85 15-Mar-2016 mrg

- 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


# 1.84 15-Mar-2016 mrg

update for GCC 5.3 libgcov and libstdc++


# 1.83 15-Mar-2016 mrg

very first baby steps towards GCC 5.3 mknative.


# 1.82 24-Jan-2016 mrg

add a comment saying this is for GCC 4.8


# 1.81 31-Jan-2015 mrg

kill the -fPIC that m68000 ends up with, fixing it in the specs
is not trivial..


# 1.80 30-Jan-2015 mrg

canonicalise the src dir to /usr/src, so it doesn't matter
where we run mknative.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.79 29-May-2014 skrll

Don't grab libstdc++-v3/config.h it's not used.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
# 1.78 02-Mar-2014 mrg

branches: 1.78.2;
don't collect gthr-default.h anymore.


# 1.77 02-Mar-2014 mrg

don't collect c++allocator.h. we copy it via G_ALLOCATOR_H we've
already pulled out, and the extra copy can confuse make when it
has an older timestamp than the copy in dist/libstdc++-v3/.


# 1.76 26-Feb-2014 mrg

prepare for moving GCC 4.5 into gcc.old:

- convert to using ${EXTERNAL_GCC_SUBDIR}
- define base-external-gpl3-gcc* subdir as GCC_SUBDIR
- use <bsd.init.mk> over <bsd.own.mk> for a bunch of places; mostly
because it arranges for ../Makefile.inc to be included earlier, and
don't bother including the latter if the former is already included.
- move all .PATH: settings after <bsd.{own,lib}.mk> so that all
valid variables are set before it is evaluated
- rename mknative-gcc* to match their subdir name.

XXX the relationship between the Makefile.inc/Makefile.gcc_path files
is kind of sketchy, it would be great if this was fixed.


# 1.75 16-Feb-2014 skrll

The mpfr sources moved down into a src directory - deal with this in
mknative.


# 1.74 28-Nov-2013 mrg

update to MPC 1.0.1.


# 1.73 20-Oct-2013 skrll

Deleted 1 line too many in previous commit.


# 1.72 20-Oct-2013 skrll

g/c gcc3 goop


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.71 28-Jun-2013 mrg

pass both NEWCONFIGDIR and NETBSDSRCDIR to mknative-gcc.


# 1.70 05-May-2013 skrll

Create a sanitise_includes function and use it everywhere it's needed.


# 1.69 25-Apr-2013 skrll

Avoid populating mknative output with gmp,mpfr, and mpc source
directories


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.68 25-Sep-2012 skrll

More tweaks. I didn't manage to complete a mknative from scratch run, but
this is a step in the right direction.


# 1.67 11-Aug-2012 skrll

branches: 1.67.2;
Grab CRTSTUFF_T_CFLAGS_S.

Gentlement start your mknative runs.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base
# 1.66 10-Jan-2012 skrll

Fix bootstrap-libgcc for gcc 4.5


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.65 13-Oct-2011 matt

branches: 1.65.2;
Fix PPC _SOFT_FLOAT


# 1.64 23-Sep-2011 mrg

since omp.h is part of libgomp, put it in the libgomp files not the
libstdc++ files.


# 1.63 21-Sep-2011 mrg

add libgomp support. needed by "cc -fopenmp", that koffice 2.3 wants to use.


# 1.62 17-Aug-2011 matt

Add an inline ex script to modify configargs.h for powerpc to auto-enable
-msoft-float.


# 1.61 03-Jul-2011 mrg

fix the previous


# 1.60 03-Jul-2011 mrg

-I$DESTDIR/usr/include is escaping into the generated files from
the native-gcc run. add some sed commands to remove them.


# 1.59 03-Jul-2011 mrg

copy sysroot-suffix.h as well, for sh3.


# 1.58 02-Jul-2011 mrg

also pull out LIB2ADD_ST for libgcc.


# 1.57 01-Jul-2011 mrg

avoid creating an unused directory.


# 1.56 01-Jul-2011 mrg

- call each ${MKNATIVE_CONFIG_TARGET_LIBS} target separately
- comment out maybe-all-target-libgcc
- cope with the special transformation needed for gtyp-input.list


# 1.55 30-Jun-2011 mrg

fix previous; they belong in _headers1


# 1.54 30-Jun-2011 mrg

also pull tr1_impl_headers parallel_headers and decimal_headers for libstdc++


# 1.53 29-Jun-2011 mrg

fix all-tree.def, and add gtyp-input.list


# 1.52 29-Jun-2011 mrg

fix the path for libdecnumber.


# 1.51 29-Jun-2011 mrg

get libdecnumber info out of GCC.


# 1.50 28-Jun-2011 mrg

also need bversion.h


# 1.49 28-Jun-2011 mrg

some more updates for GCC 4.5.


# 1.48 23-Jun-2011 mrg

output stuff to the right libiberty dir for gcc 4.5.


# 1.47 23-Jun-2011 mrg

get this some what working with GCC 4.5. i at least have managed to
get crtstuff and libgcc to build for amd64, and have linked and tested
/bin/sh with all these GCC 4.5 compiled part.


# 1.46 21-Jun-2011 mrg

initial port to HAVE_GCC = 45. mknative-gcc parts are from me
and are largely untested, most of the rest is from chuq.


Revision tags: cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.45 17-Dec-2009 uebayasi

branches: 1.45.4;
get_libgcc_new: Make previous work for digit only ABI names.


# 1.44 17-Dec-2009 uebayasi

get_libgcc_new: Teach multilib.


Revision tags: matt-premerge-20091211
# 1.43 01-Dec-2009 uebayasi

Skip parameters for multilib build for now.


# 1.42 01-Dec-2009 uebayasi

Handle cases where *.asm is listed in LIB2FUNCS_EXTRA (gcc/config/rs6000).


# 1.41 30-Nov-2009 uebayasi

Handle cases where database text files don't exist.


# 1.40 30-Nov-2009 uebayasi

Call "template sources" as "tmplsrcs", not "tmpsrcs". Requested by mrg@.


# 1.39 30-Nov-2009 uebayasi

Prefix per-library *.mk files with libs.*.


# 1.38 30-Nov-2009 uebayasi

Now that we know what sources are needed to build a given library, we need
the rules how to build those sources. Generate makefiles defining ${COPTS},
${CPPFLAGS}, and ${SRCS} (== template).

Note that ${CPPFLAGS} is actually dfined as _CPPFLAGS like
_CPPFLAGS.tmp___gcc_bcmp.c=-DL__gcc_bcmp
and used to generate wrapper files (e.g. tmp___gcc_bcmp.c). Otherwise it's
automagically passed to ${CC} by bsd.*.mk.


# 1.37 30-Nov-2009 uebayasi

For each library, generate a makefile of the list of template sources too.


# 1.36 30-Nov-2009 uebayasi

For each library, generate a list of sources (*.[cS]).

We create wrapper sources (tmp_*.[cS]) on-the-fly and compile them. For
example, __gcc_bcmp() is compiled using tmp___gcc_bcmp.c, which #define's
L__gcc_bcmp and #include's libgcc2.c.


# 1.35 30-Nov-2009 uebayasi

Move these analyzing functions into one place, get_libgcc_new_analyze().


# 1.34 30-Nov-2009 uebayasi

Typo.


# 1.33 30-Nov-2009 uebayasi

Generate lists of template sources ("tmpsrcs") for each libraries. We'll
need these to create wrappers of tmpsrcs and define correct dependencies.


# 1.32 30-Nov-2009 uebayasi

Generate *.o -> template *.[cS] ("tmpsrc") mapping.

Functions are built from a template (tmpsrc). We create wrapper sources
(src) and define necessary defines and #include tmpsrc.


# 1.31 30-Nov-2009 uebayasi

- Generate a list of CPP flags used to build *.o. Some files are build
repeatedly with different -DXXX to generate similar objects (e.g. different
type size).

- Generate a list of other CC options to build *.o.

(See my sed-fu using hold space in get_libgcc_list_objs_xflags().)


# 1.30 30-Nov-2009 uebayasi

- Generate a list of *.o -> lib*.{a,so} mapping. This is also known by
parsing dependency lines in libgcc.mk.

- Generate a list of *.o -> *.{c,S} mapping. *.S files are known as
${LIB1ASMFUNCS}. Assume other *.o files are built from *.c. This information
is needed to generated wrapper sources later.


# 1.29 30-Nov-2009 uebayasi

Generate lists of functions built in libgcc libraries. This is known by
pattern matching dependency lines in libgcc.mk.


# 1.28 30-Nov-2009 uebayasi

Generate a list of functions provided as *.S.


# 1.27 30-Nov-2009 uebayasi

Define paths of newly generated files.


# 1.26 30-Nov-2009 uebayasi

Start implementing the new style libgcc "mknative" converter which generates
BSD makefiles to build libgcc. The goal is to build all functions rather
than managing the set of functions in gnu/lib/libgcc/Makefile.in by hand.

Because of the complexity of the build procedure, I leave not only generated
makefiles but also intermediate, analyzed data so that people can verify that
the conversion is done correctly.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE jym-xensuspend-nbase netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2
# 1.25 11-Oct-2008 mrg

- add a i386/t-netbsd64 makefile fragment to build 32/64 bit
libgcc/multilib on amd64
- enable the 32/64 bit libgcc/multilib support on sparc64
- adapt mknative-gcc to grab multilib.h
- use --enable-multilib on amd64 and sparc64

none of this affects the installed tools yet, just the src/tools one.


# 1.24 19-Sep-2008 skrll

Grab libgcov stuff.


Revision tags: wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase hpcarm-cleanup-base
# 1.23 08-Feb-2008 skrll

Collect the libobjc config.h


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-4-base
# 1.22 25-Jun-2006 mrg

branches: 1.22.4; 1.22.10;
convert build/ggc-none.o to build-ggc-none.lo.


# 1.21 24-Jun-2006 mrg

also grab ${_extravars} for GCC4 in the get_gcc() function.


# 1.20 09-Jun-2006 skrll

Fixes for mknative runs on gcc3.

- get the information from a gcc3 .native
- don't get gcc4 variables
- put back the getvars for SHLIB_LINK SHLIB_MULTILIB as they work
on gcc3 and leave as XXX'd on gcc4.

I've re-arranged some of the variables to minimise the differences, but
didn't do them all.


# 1.19 02-Jun-2006 mrg

make this work for GCC3 one again.


# 1.18 23-May-2006 mrg

also grab ALL_OPT_FILES from gcc/Makefile for libobjc4.


# 1.17 15-May-2006 mrg

make sure that c++ headers work again.


# 1.16 12-May-2006 mrg

support GCC4:
- look in gnu/dist/gcc4
- don't build fortran
- use /usr/bin/env -i so that gmake works (XXX - breaks from MAKEFLAGS
in the build.sh generated makewrapper.)
- use gmake and Makefile.gmakehost
- update .native/.configure_done target


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-3-base
# 1.15 10-Dec-2004 mrg

mirror a fix from mknative-binutils:
>fix the sed expression that pulls VPATH out of the makefile to work
>with any number of tabs or spaces after the equal sign.


# 1.14 24-Aug-2004 thorpej

Add code to extract make vars for GCC crtstuff.


# 1.13 01-Jul-2004 skrll

Add some more variables used to build libgcc_s.

Part of the fix for PR 22452.


Revision tags: netbsd-2-0-base
# 1.12 10-Feb-2004 skrll

branches: 1.12.2;
Updates so that mknative gets the right things.

- Disable symbol versioning (for now)
- Make sure that libiberty knows its being configured with a
cross compiler.
- The CXX_* variables are no longer needed/used.
- LIB2FUNCS_EXTRA gets pulled in via LIB2ADD
- Get LIB1ASMFUNCS and LIB2ASMSRC
- MAYBE_USE_COLLECT2 got renamed to USE_COLLECT2 (but might not
be used)
- Get EXTRA_HEADERS so that we get generate the right paths for
CPPFLAGS
- Get some variables related to shared libgcc


# 1.11 02-Jan-2004 skrll

Move libgcc3/*.mk to libgcc3/arch.

Update mknative-gcc.


# 1.10 27-Nov-2003 mrg

fix a comment; normalise.


# 1.9 27-Nov-2003 mrg

use mknative.common


# 1.8 27-Nov-2003 mrg

be a little more verbose about what we're doing when running mknative.
also grab LIB2FUNCS_EXTRA for libgcc3 (old fix for m68000).


# 1.7 22-Aug-2003 mrg

don't want auto-build.h anymore


# 1.6 01-Aug-2003 mrg

we need config.h an another version of gthr-default.h


# 1.5 30-Jul-2003 mrg

fix a typo in previous


# 1.4 30-Jul-2003 mrg

libiberty/config.h needs to become per-arch.


# 1.3 28-Jul-2003 mrg

fix a bug in previous - two $'s are bad


# 1.2 28-Jul-2003 mrg

add another transform for libobjc3


# 1.1 25-Jul-2003 mrg

- build "binutils" and "gcc" separately if USE_TOOLS_TOOLCHAIN is not set
to "yes".
- adjust dbsym/mdsetimage to look in the correct place for libbfd.
- new mknative-gcc based in toolchain/mknative


# 1.104 12-Aug-2020 mrg

mknative-gcc is for GCC 8.4.
mknative-gcc.old is supposed to be for GCC 7, but is the GCC 6
version. update it and mark it for GCC 7.5.


Revision tags: phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 phil-wifi-20191119
# 1.103 24-Oct-2019 christos

arm needs more files


# 1.102 16-Oct-2019 mrg

copy arm-cpu.h and arm-isa.h for arm platforms.


Revision tags: netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 netbsd-9-base phil-wifi-20190609
# 1.101 23-Feb-2019 mrg

pull out libstdc++ config.h as-is, for gnu.ver processing.
pull out the cxx11_sources and cxx98_sources values to avoid hard coding.


# 1.100 09-Feb-2019 mrg

- build the gthr*.h files to be installed on the fly, instead of
having dozens of copies of the same thing in the tree.
- don't fetch any gthr*.h files.
- delete ancient gthr-tpf.h that was removed in GCC 4.8 or so.

this should fix the call_once tests for real now.


# 1.99 04-Feb-2019 mrg

common-target source list is MD. make it so.


# 1.98 04-Feb-2019 mrg

- don't getlinks here, they're no longer used.
- pullout the libcommon, libcommon-target and libgomp source list so they
don't have to be hard coded in the reachover makefile


# 1.97 01-Feb-2019 mrg

- 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


Revision tags: pgoyette-compat-20190127
# 1.96 19-Jan-2019 mrg

make includes works now.

pull out more data needed for headers and fix gthr-defaults.h.

libgcc_s has multiple symbols.


# 1.95 19-Jan-2019 mrg

also pull out these variables:
enable_execute_stack
unwind_header
md_unwind_header
sfp_machine_header
thread_header


Revision tags: pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906
# 1.94 04-Sep-2018 mrg

also pullout INTERNAL_CFLAGS for the libgcc build, where it may have
-DHAVE_CC_TLS defined on the command line. (we already collect all
the other components.)


# 1.93 04-Sep-2018 mrg

in configargs.h, as well as normalising to /usr/src, normalise the
--build to the same as the --host, so that it never changes based
upon the host you ran mknative on. (some recent changes are only
because i updated a system from netbsd-7 to netbsd-8. this will
avoid that in the future.)


Revision tags: pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.92 06-Feb-2018 mrg

branches: 1.92.2; 1.92.4;
also fetch GCOV_DUMP_OBJS.


# 1.91 03-Feb-2018 mrg

pullout port_specific_symbol_files from libstdc++.


# 1.90 04-Oct-2017 christos

use the variable for the source dir instead of duplicating it.


Revision tags: perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104
# 1.89 05-Oct-2016 christos

branches: 1.89.6;
revert our changes; softfloat removal is now done in libgcc/config.host


# 1.88 05-Oct-2016 christos

We provide our own soft-float implementation in libc, so elide the libgcc
sources for it.


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.87 17-Mar-2016 mrg

branches: 1.87.2;
set NETBSD_GCC_VERSION for GCC 5.3 separately.
don't collect crtstuff anymore.


# 1.86 16-Mar-2016 mrg

grab insn-modes.h, and do the libgcc bootstrap from gcc as well.


# 1.85 15-Mar-2016 mrg

- 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


# 1.84 15-Mar-2016 mrg

update for GCC 5.3 libgcov and libstdc++


# 1.83 15-Mar-2016 mrg

very first baby steps towards GCC 5.3 mknative.


# 1.82 24-Jan-2016 mrg

add a comment saying this is for GCC 4.8


# 1.81 31-Jan-2015 mrg

kill the -fPIC that m68000 ends up with, fixing it in the specs
is not trivial..


# 1.80 30-Jan-2015 mrg

canonicalise the src dir to /usr/src, so it doesn't matter
where we run mknative.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.79 29-May-2014 skrll

Don't grab libstdc++-v3/config.h it's not used.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
# 1.78 02-Mar-2014 mrg

branches: 1.78.2;
don't collect gthr-default.h anymore.


# 1.77 02-Mar-2014 mrg

don't collect c++allocator.h. we copy it via G_ALLOCATOR_H we've
already pulled out, and the extra copy can confuse make when it
has an older timestamp than the copy in dist/libstdc++-v3/.


# 1.76 26-Feb-2014 mrg

prepare for moving GCC 4.5 into gcc.old:

- convert to using ${EXTERNAL_GCC_SUBDIR}
- define base-external-gpl3-gcc* subdir as GCC_SUBDIR
- use <bsd.init.mk> over <bsd.own.mk> for a bunch of places; mostly
because it arranges for ../Makefile.inc to be included earlier, and
don't bother including the latter if the former is already included.
- move all .PATH: settings after <bsd.{own,lib}.mk> so that all
valid variables are set before it is evaluated
- rename mknative-gcc* to match their subdir name.

XXX the relationship between the Makefile.inc/Makefile.gcc_path files
is kind of sketchy, it would be great if this was fixed.


# 1.75 16-Feb-2014 skrll

The mpfr sources moved down into a src directory - deal with this in
mknative.


# 1.74 28-Nov-2013 mrg

update to MPC 1.0.1.


# 1.73 20-Oct-2013 skrll

Deleted 1 line too many in previous commit.


# 1.72 20-Oct-2013 skrll

g/c gcc3 goop


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.71 28-Jun-2013 mrg

pass both NEWCONFIGDIR and NETBSDSRCDIR to mknative-gcc.


# 1.70 05-May-2013 skrll

Create a sanitise_includes function and use it everywhere it's needed.


# 1.69 25-Apr-2013 skrll

Avoid populating mknative output with gmp,mpfr, and mpc source
directories


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.68 25-Sep-2012 skrll

More tweaks. I didn't manage to complete a mknative from scratch run, but
this is a step in the right direction.


# 1.67 11-Aug-2012 skrll

branches: 1.67.2;
Grab CRTSTUFF_T_CFLAGS_S.

Gentlement start your mknative runs.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base
# 1.66 10-Jan-2012 skrll

Fix bootstrap-libgcc for gcc 4.5


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.65 13-Oct-2011 matt

branches: 1.65.2;
Fix PPC _SOFT_FLOAT


# 1.64 23-Sep-2011 mrg

since omp.h is part of libgomp, put it in the libgomp files not the
libstdc++ files.


# 1.63 21-Sep-2011 mrg

add libgomp support. needed by "cc -fopenmp", that koffice 2.3 wants to use.


# 1.62 17-Aug-2011 matt

Add an inline ex script to modify configargs.h for powerpc to auto-enable
-msoft-float.


# 1.61 03-Jul-2011 mrg

fix the previous


# 1.60 03-Jul-2011 mrg

-I$DESTDIR/usr/include is escaping into the generated files from
the native-gcc run. add some sed commands to remove them.


# 1.59 03-Jul-2011 mrg

copy sysroot-suffix.h as well, for sh3.


# 1.58 02-Jul-2011 mrg

also pull out LIB2ADD_ST for libgcc.


# 1.57 01-Jul-2011 mrg

avoid creating an unused directory.


# 1.56 01-Jul-2011 mrg

- call each ${MKNATIVE_CONFIG_TARGET_LIBS} target separately
- comment out maybe-all-target-libgcc
- cope with the special transformation needed for gtyp-input.list


# 1.55 30-Jun-2011 mrg

fix previous; they belong in _headers1


# 1.54 30-Jun-2011 mrg

also pull tr1_impl_headers parallel_headers and decimal_headers for libstdc++


# 1.53 29-Jun-2011 mrg

fix all-tree.def, and add gtyp-input.list


# 1.52 29-Jun-2011 mrg

fix the path for libdecnumber.


# 1.51 29-Jun-2011 mrg

get libdecnumber info out of GCC.


# 1.50 28-Jun-2011 mrg

also need bversion.h


# 1.49 28-Jun-2011 mrg

some more updates for GCC 4.5.


# 1.48 23-Jun-2011 mrg

output stuff to the right libiberty dir for gcc 4.5.


# 1.47 23-Jun-2011 mrg

get this some what working with GCC 4.5. i at least have managed to
get crtstuff and libgcc to build for amd64, and have linked and tested
/bin/sh with all these GCC 4.5 compiled part.


# 1.46 21-Jun-2011 mrg

initial port to HAVE_GCC = 45. mknative-gcc parts are from me
and are largely untested, most of the rest is from chuq.


Revision tags: cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.45 17-Dec-2009 uebayasi

branches: 1.45.4;
get_libgcc_new: Make previous work for digit only ABI names.


# 1.44 17-Dec-2009 uebayasi

get_libgcc_new: Teach multilib.


Revision tags: matt-premerge-20091211
# 1.43 01-Dec-2009 uebayasi

Skip parameters for multilib build for now.


# 1.42 01-Dec-2009 uebayasi

Handle cases where *.asm is listed in LIB2FUNCS_EXTRA (gcc/config/rs6000).


# 1.41 30-Nov-2009 uebayasi

Handle cases where database text files don't exist.


# 1.40 30-Nov-2009 uebayasi

Call "template sources" as "tmplsrcs", not "tmpsrcs". Requested by mrg@.


# 1.39 30-Nov-2009 uebayasi

Prefix per-library *.mk files with libs.*.


# 1.38 30-Nov-2009 uebayasi

Now that we know what sources are needed to build a given library, we need
the rules how to build those sources. Generate makefiles defining ${COPTS},
${CPPFLAGS}, and ${SRCS} (== template).

Note that ${CPPFLAGS} is actually dfined as _CPPFLAGS like
_CPPFLAGS.tmp___gcc_bcmp.c=-DL__gcc_bcmp
and used to generate wrapper files (e.g. tmp___gcc_bcmp.c). Otherwise it's
automagically passed to ${CC} by bsd.*.mk.


# 1.37 30-Nov-2009 uebayasi

For each library, generate a makefile of the list of template sources too.


# 1.36 30-Nov-2009 uebayasi

For each library, generate a list of sources (*.[cS]).

We create wrapper sources (tmp_*.[cS]) on-the-fly and compile them. For
example, __gcc_bcmp() is compiled using tmp___gcc_bcmp.c, which #define's
L__gcc_bcmp and #include's libgcc2.c.


# 1.35 30-Nov-2009 uebayasi

Move these analyzing functions into one place, get_libgcc_new_analyze().


# 1.34 30-Nov-2009 uebayasi

Typo.


# 1.33 30-Nov-2009 uebayasi

Generate lists of template sources ("tmpsrcs") for each libraries. We'll
need these to create wrappers of tmpsrcs and define correct dependencies.


# 1.32 30-Nov-2009 uebayasi

Generate *.o -> template *.[cS] ("tmpsrc") mapping.

Functions are built from a template (tmpsrc). We create wrapper sources
(src) and define necessary defines and #include tmpsrc.


# 1.31 30-Nov-2009 uebayasi

- Generate a list of CPP flags used to build *.o. Some files are build
repeatedly with different -DXXX to generate similar objects (e.g. different
type size).

- Generate a list of other CC options to build *.o.

(See my sed-fu using hold space in get_libgcc_list_objs_xflags().)


# 1.30 30-Nov-2009 uebayasi

- Generate a list of *.o -> lib*.{a,so} mapping. This is also known by
parsing dependency lines in libgcc.mk.

- Generate a list of *.o -> *.{c,S} mapping. *.S files are known as
${LIB1ASMFUNCS}. Assume other *.o files are built from *.c. This information
is needed to generated wrapper sources later.


# 1.29 30-Nov-2009 uebayasi

Generate lists of functions built in libgcc libraries. This is known by
pattern matching dependency lines in libgcc.mk.


# 1.28 30-Nov-2009 uebayasi

Generate a list of functions provided as *.S.


# 1.27 30-Nov-2009 uebayasi

Define paths of newly generated files.


# 1.26 30-Nov-2009 uebayasi

Start implementing the new style libgcc "mknative" converter which generates
BSD makefiles to build libgcc. The goal is to build all functions rather
than managing the set of functions in gnu/lib/libgcc/Makefile.in by hand.

Because of the complexity of the build procedure, I leave not only generated
makefiles but also intermediate, analyzed data so that people can verify that
the conversion is done correctly.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE jym-xensuspend-nbase netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2
# 1.25 11-Oct-2008 mrg

- add a i386/t-netbsd64 makefile fragment to build 32/64 bit
libgcc/multilib on amd64
- enable the 32/64 bit libgcc/multilib support on sparc64
- adapt mknative-gcc to grab multilib.h
- use --enable-multilib on amd64 and sparc64

none of this affects the installed tools yet, just the src/tools one.


# 1.24 19-Sep-2008 skrll

Grab libgcov stuff.


Revision tags: wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase hpcarm-cleanup-base
# 1.23 08-Feb-2008 skrll

Collect the libobjc config.h


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-4-base
# 1.22 25-Jun-2006 mrg

branches: 1.22.4; 1.22.10;
convert build/ggc-none.o to build-ggc-none.lo.


# 1.21 24-Jun-2006 mrg

also grab ${_extravars} for GCC4 in the get_gcc() function.


# 1.20 09-Jun-2006 skrll

Fixes for mknative runs on gcc3.

- get the information from a gcc3 .native
- don't get gcc4 variables
- put back the getvars for SHLIB_LINK SHLIB_MULTILIB as they work
on gcc3 and leave as XXX'd on gcc4.

I've re-arranged some of the variables to minimise the differences, but
didn't do them all.


# 1.19 02-Jun-2006 mrg

make this work for GCC3 one again.


# 1.18 23-May-2006 mrg

also grab ALL_OPT_FILES from gcc/Makefile for libobjc4.


# 1.17 15-May-2006 mrg

make sure that c++ headers work again.


# 1.16 12-May-2006 mrg

support GCC4:
- look in gnu/dist/gcc4
- don't build fortran
- use /usr/bin/env -i so that gmake works (XXX - breaks from MAKEFLAGS
in the build.sh generated makewrapper.)
- use gmake and Makefile.gmakehost
- update .native/.configure_done target


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-3-base
# 1.15 10-Dec-2004 mrg

mirror a fix from mknative-binutils:
>fix the sed expression that pulls VPATH out of the makefile to work
>with any number of tabs or spaces after the equal sign.


# 1.14 24-Aug-2004 thorpej

Add code to extract make vars for GCC crtstuff.


# 1.13 01-Jul-2004 skrll

Add some more variables used to build libgcc_s.

Part of the fix for PR 22452.


Revision tags: netbsd-2-0-base
# 1.12 10-Feb-2004 skrll

branches: 1.12.2;
Updates so that mknative gets the right things.

- Disable symbol versioning (for now)
- Make sure that libiberty knows its being configured with a
cross compiler.
- The CXX_* variables are no longer needed/used.
- LIB2FUNCS_EXTRA gets pulled in via LIB2ADD
- Get LIB1ASMFUNCS and LIB2ASMSRC
- MAYBE_USE_COLLECT2 got renamed to USE_COLLECT2 (but might not
be used)
- Get EXTRA_HEADERS so that we get generate the right paths for
CPPFLAGS
- Get some variables related to shared libgcc


# 1.11 02-Jan-2004 skrll

Move libgcc3/*.mk to libgcc3/arch.

Update mknative-gcc.


# 1.10 27-Nov-2003 mrg

fix a comment; normalise.


# 1.9 27-Nov-2003 mrg

use mknative.common


# 1.8 27-Nov-2003 mrg

be a little more verbose about what we're doing when running mknative.
also grab LIB2FUNCS_EXTRA for libgcc3 (old fix for m68000).


# 1.7 22-Aug-2003 mrg

don't want auto-build.h anymore


# 1.6 01-Aug-2003 mrg

we need config.h an another version of gthr-default.h


# 1.5 30-Jul-2003 mrg

fix a typo in previous


# 1.4 30-Jul-2003 mrg

libiberty/config.h needs to become per-arch.


# 1.3 28-Jul-2003 mrg

fix a bug in previous - two $'s are bad


# 1.2 28-Jul-2003 mrg

add another transform for libobjc3


# 1.1 25-Jul-2003 mrg

- build "binutils" and "gcc" separately if USE_TOOLS_TOOLCHAIN is not set
to "yes".
- adjust dbsym/mdsetimage to look in the correct place for libbfd.
- new mknative-gcc based in toolchain/mknative


# 1.103 24-Oct-2019 christos

arm needs more files


# 1.102 16-Oct-2019 mrg

copy arm-cpu.h and arm-isa.h for arm platforms.


Revision tags: netbsd-9-base phil-wifi-20190609
# 1.101 23-Feb-2019 mrg

pull out libstdc++ config.h as-is, for gnu.ver processing.
pull out the cxx11_sources and cxx98_sources values to avoid hard coding.


# 1.100 09-Feb-2019 mrg

- build the gthr*.h files to be installed on the fly, instead of
having dozens of copies of the same thing in the tree.
- don't fetch any gthr*.h files.
- delete ancient gthr-tpf.h that was removed in GCC 4.8 or so.

this should fix the call_once tests for real now.


# 1.99 04-Feb-2019 mrg

common-target source list is MD. make it so.


# 1.98 04-Feb-2019 mrg

- don't getlinks here, they're no longer used.
- pullout the libcommon, libcommon-target and libgomp source list so they
don't have to be hard coded in the reachover makefile


# 1.97 01-Feb-2019 mrg

- 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


Revision tags: pgoyette-compat-20190127
# 1.96 19-Jan-2019 mrg

make includes works now.

pull out more data needed for headers and fix gthr-defaults.h.

libgcc_s has multiple symbols.


# 1.95 19-Jan-2019 mrg

also pull out these variables:
enable_execute_stack
unwind_header
md_unwind_header
sfp_machine_header
thread_header


Revision tags: pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906
# 1.94 04-Sep-2018 mrg

also pullout INTERNAL_CFLAGS for the libgcc build, where it may have
-DHAVE_CC_TLS defined on the command line. (we already collect all
the other components.)


# 1.93 04-Sep-2018 mrg

in configargs.h, as well as normalising to /usr/src, normalise the
--build to the same as the --host, so that it never changes based
upon the host you ran mknative on. (some recent changes are only
because i updated a system from netbsd-7 to netbsd-8. this will
avoid that in the future.)


Revision tags: pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.92 06-Feb-2018 mrg

branches: 1.92.2; 1.92.4;
also fetch GCOV_DUMP_OBJS.


# 1.91 03-Feb-2018 mrg

pullout port_specific_symbol_files from libstdc++.


# 1.90 04-Oct-2017 christos

use the variable for the source dir instead of duplicating it.


Revision tags: perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104
# 1.89 05-Oct-2016 christos

branches: 1.89.6;
revert our changes; softfloat removal is now done in libgcc/config.host


# 1.88 05-Oct-2016 christos

We provide our own soft-float implementation in libc, so elide the libgcc
sources for it.


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.87 17-Mar-2016 mrg

branches: 1.87.2;
set NETBSD_GCC_VERSION for GCC 5.3 separately.
don't collect crtstuff anymore.


# 1.86 16-Mar-2016 mrg

grab insn-modes.h, and do the libgcc bootstrap from gcc as well.


# 1.85 15-Mar-2016 mrg

- 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


# 1.84 15-Mar-2016 mrg

update for GCC 5.3 libgcov and libstdc++


# 1.83 15-Mar-2016 mrg

very first baby steps towards GCC 5.3 mknative.


# 1.82 24-Jan-2016 mrg

add a comment saying this is for GCC 4.8


# 1.81 31-Jan-2015 mrg

kill the -fPIC that m68000 ends up with, fixing it in the specs
is not trivial..


# 1.80 30-Jan-2015 mrg

canonicalise the src dir to /usr/src, so it doesn't matter
where we run mknative.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.79 29-May-2014 skrll

Don't grab libstdc++-v3/config.h it's not used.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
# 1.78 02-Mar-2014 mrg

branches: 1.78.2;
don't collect gthr-default.h anymore.


# 1.77 02-Mar-2014 mrg

don't collect c++allocator.h. we copy it via G_ALLOCATOR_H we've
already pulled out, and the extra copy can confuse make when it
has an older timestamp than the copy in dist/libstdc++-v3/.


# 1.76 26-Feb-2014 mrg

prepare for moving GCC 4.5 into gcc.old:

- convert to using ${EXTERNAL_GCC_SUBDIR}
- define base-external-gpl3-gcc* subdir as GCC_SUBDIR
- use <bsd.init.mk> over <bsd.own.mk> for a bunch of places; mostly
because it arranges for ../Makefile.inc to be included earlier, and
don't bother including the latter if the former is already included.
- move all .PATH: settings after <bsd.{own,lib}.mk> so that all
valid variables are set before it is evaluated
- rename mknative-gcc* to match their subdir name.

XXX the relationship between the Makefile.inc/Makefile.gcc_path files
is kind of sketchy, it would be great if this was fixed.


# 1.75 16-Feb-2014 skrll

The mpfr sources moved down into a src directory - deal with this in
mknative.


# 1.74 28-Nov-2013 mrg

update to MPC 1.0.1.


# 1.73 20-Oct-2013 skrll

Deleted 1 line too many in previous commit.


# 1.72 20-Oct-2013 skrll

g/c gcc3 goop


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.71 28-Jun-2013 mrg

pass both NEWCONFIGDIR and NETBSDSRCDIR to mknative-gcc.


# 1.70 05-May-2013 skrll

Create a sanitise_includes function and use it everywhere it's needed.


# 1.69 25-Apr-2013 skrll

Avoid populating mknative output with gmp,mpfr, and mpc source
directories


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.68 25-Sep-2012 skrll

More tweaks. I didn't manage to complete a mknative from scratch run, but
this is a step in the right direction.


# 1.67 11-Aug-2012 skrll

branches: 1.67.2;
Grab CRTSTUFF_T_CFLAGS_S.

Gentlement start your mknative runs.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base
# 1.66 10-Jan-2012 skrll

Fix bootstrap-libgcc for gcc 4.5


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.65 13-Oct-2011 matt

branches: 1.65.2;
Fix PPC _SOFT_FLOAT


# 1.64 23-Sep-2011 mrg

since omp.h is part of libgomp, put it in the libgomp files not the
libstdc++ files.


# 1.63 21-Sep-2011 mrg

add libgomp support. needed by "cc -fopenmp", that koffice 2.3 wants to use.


# 1.62 17-Aug-2011 matt

Add an inline ex script to modify configargs.h for powerpc to auto-enable
-msoft-float.


# 1.61 03-Jul-2011 mrg

fix the previous


# 1.60 03-Jul-2011 mrg

-I$DESTDIR/usr/include is escaping into the generated files from
the native-gcc run. add some sed commands to remove them.


# 1.59 03-Jul-2011 mrg

copy sysroot-suffix.h as well, for sh3.


# 1.58 02-Jul-2011 mrg

also pull out LIB2ADD_ST for libgcc.


# 1.57 01-Jul-2011 mrg

avoid creating an unused directory.


# 1.56 01-Jul-2011 mrg

- call each ${MKNATIVE_CONFIG_TARGET_LIBS} target separately
- comment out maybe-all-target-libgcc
- cope with the special transformation needed for gtyp-input.list


# 1.55 30-Jun-2011 mrg

fix previous; they belong in _headers1


# 1.54 30-Jun-2011 mrg

also pull tr1_impl_headers parallel_headers and decimal_headers for libstdc++


# 1.53 29-Jun-2011 mrg

fix all-tree.def, and add gtyp-input.list


# 1.52 29-Jun-2011 mrg

fix the path for libdecnumber.


# 1.51 29-Jun-2011 mrg

get libdecnumber info out of GCC.


# 1.50 28-Jun-2011 mrg

also need bversion.h


# 1.49 28-Jun-2011 mrg

some more updates for GCC 4.5.


# 1.48 23-Jun-2011 mrg

output stuff to the right libiberty dir for gcc 4.5.


# 1.47 23-Jun-2011 mrg

get this some what working with GCC 4.5. i at least have managed to
get crtstuff and libgcc to build for amd64, and have linked and tested
/bin/sh with all these GCC 4.5 compiled part.


# 1.46 21-Jun-2011 mrg

initial port to HAVE_GCC = 45. mknative-gcc parts are from me
and are largely untested, most of the rest is from chuq.


Revision tags: cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.45 17-Dec-2009 uebayasi

branches: 1.45.4;
get_libgcc_new: Make previous work for digit only ABI names.


# 1.44 17-Dec-2009 uebayasi

get_libgcc_new: Teach multilib.


Revision tags: matt-premerge-20091211
# 1.43 01-Dec-2009 uebayasi

Skip parameters for multilib build for now.


# 1.42 01-Dec-2009 uebayasi

Handle cases where *.asm is listed in LIB2FUNCS_EXTRA (gcc/config/rs6000).


# 1.41 30-Nov-2009 uebayasi

Handle cases where database text files don't exist.


# 1.40 30-Nov-2009 uebayasi

Call "template sources" as "tmplsrcs", not "tmpsrcs". Requested by mrg@.


# 1.39 30-Nov-2009 uebayasi

Prefix per-library *.mk files with libs.*.


# 1.38 30-Nov-2009 uebayasi

Now that we know what sources are needed to build a given library, we need
the rules how to build those sources. Generate makefiles defining ${COPTS},
${CPPFLAGS}, and ${SRCS} (== template).

Note that ${CPPFLAGS} is actually dfined as _CPPFLAGS like
_CPPFLAGS.tmp___gcc_bcmp.c=-DL__gcc_bcmp
and used to generate wrapper files (e.g. tmp___gcc_bcmp.c). Otherwise it's
automagically passed to ${CC} by bsd.*.mk.


# 1.37 30-Nov-2009 uebayasi

For each library, generate a makefile of the list of template sources too.


# 1.36 30-Nov-2009 uebayasi

For each library, generate a list of sources (*.[cS]).

We create wrapper sources (tmp_*.[cS]) on-the-fly and compile them. For
example, __gcc_bcmp() is compiled using tmp___gcc_bcmp.c, which #define's
L__gcc_bcmp and #include's libgcc2.c.


# 1.35 30-Nov-2009 uebayasi

Move these analyzing functions into one place, get_libgcc_new_analyze().


# 1.34 30-Nov-2009 uebayasi

Typo.


# 1.33 30-Nov-2009 uebayasi

Generate lists of template sources ("tmpsrcs") for each libraries. We'll
need these to create wrappers of tmpsrcs and define correct dependencies.


# 1.32 30-Nov-2009 uebayasi

Generate *.o -> template *.[cS] ("tmpsrc") mapping.

Functions are built from a template (tmpsrc). We create wrapper sources
(src) and define necessary defines and #include tmpsrc.


# 1.31 30-Nov-2009 uebayasi

- Generate a list of CPP flags used to build *.o. Some files are build
repeatedly with different -DXXX to generate similar objects (e.g. different
type size).

- Generate a list of other CC options to build *.o.

(See my sed-fu using hold space in get_libgcc_list_objs_xflags().)


# 1.30 30-Nov-2009 uebayasi

- Generate a list of *.o -> lib*.{a,so} mapping. This is also known by
parsing dependency lines in libgcc.mk.

- Generate a list of *.o -> *.{c,S} mapping. *.S files are known as
${LIB1ASMFUNCS}. Assume other *.o files are built from *.c. This information
is needed to generated wrapper sources later.


# 1.29 30-Nov-2009 uebayasi

Generate lists of functions built in libgcc libraries. This is known by
pattern matching dependency lines in libgcc.mk.


# 1.28 30-Nov-2009 uebayasi

Generate a list of functions provided as *.S.


# 1.27 30-Nov-2009 uebayasi

Define paths of newly generated files.


# 1.26 30-Nov-2009 uebayasi

Start implementing the new style libgcc "mknative" converter which generates
BSD makefiles to build libgcc. The goal is to build all functions rather
than managing the set of functions in gnu/lib/libgcc/Makefile.in by hand.

Because of the complexity of the build procedure, I leave not only generated
makefiles but also intermediate, analyzed data so that people can verify that
the conversion is done correctly.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE jym-xensuspend-nbase netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2
# 1.25 11-Oct-2008 mrg

- add a i386/t-netbsd64 makefile fragment to build 32/64 bit
libgcc/multilib on amd64
- enable the 32/64 bit libgcc/multilib support on sparc64
- adapt mknative-gcc to grab multilib.h
- use --enable-multilib on amd64 and sparc64

none of this affects the installed tools yet, just the src/tools one.


# 1.24 19-Sep-2008 skrll

Grab libgcov stuff.


Revision tags: wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase hpcarm-cleanup-base
# 1.23 08-Feb-2008 skrll

Collect the libobjc config.h


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-4-base
# 1.22 25-Jun-2006 mrg

branches: 1.22.4; 1.22.10;
convert build/ggc-none.o to build-ggc-none.lo.


# 1.21 24-Jun-2006 mrg

also grab ${_extravars} for GCC4 in the get_gcc() function.


# 1.20 09-Jun-2006 skrll

Fixes for mknative runs on gcc3.

- get the information from a gcc3 .native
- don't get gcc4 variables
- put back the getvars for SHLIB_LINK SHLIB_MULTILIB as they work
on gcc3 and leave as XXX'd on gcc4.

I've re-arranged some of the variables to minimise the differences, but
didn't do them all.


# 1.19 02-Jun-2006 mrg

make this work for GCC3 one again.


# 1.18 23-May-2006 mrg

also grab ALL_OPT_FILES from gcc/Makefile for libobjc4.


# 1.17 15-May-2006 mrg

make sure that c++ headers work again.


# 1.16 12-May-2006 mrg

support GCC4:
- look in gnu/dist/gcc4
- don't build fortran
- use /usr/bin/env -i so that gmake works (XXX - breaks from MAKEFLAGS
in the build.sh generated makewrapper.)
- use gmake and Makefile.gmakehost
- update .native/.configure_done target


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-3-base
# 1.15 10-Dec-2004 mrg

mirror a fix from mknative-binutils:
>fix the sed expression that pulls VPATH out of the makefile to work
>with any number of tabs or spaces after the equal sign.


# 1.14 24-Aug-2004 thorpej

Add code to extract make vars for GCC crtstuff.


# 1.13 01-Jul-2004 skrll

Add some more variables used to build libgcc_s.

Part of the fix for PR 22452.


Revision tags: netbsd-2-0-base
# 1.12 10-Feb-2004 skrll

branches: 1.12.2;
Updates so that mknative gets the right things.

- Disable symbol versioning (for now)
- Make sure that libiberty knows its being configured with a
cross compiler.
- The CXX_* variables are no longer needed/used.
- LIB2FUNCS_EXTRA gets pulled in via LIB2ADD
- Get LIB1ASMFUNCS and LIB2ASMSRC
- MAYBE_USE_COLLECT2 got renamed to USE_COLLECT2 (but might not
be used)
- Get EXTRA_HEADERS so that we get generate the right paths for
CPPFLAGS
- Get some variables related to shared libgcc


# 1.11 02-Jan-2004 skrll

Move libgcc3/*.mk to libgcc3/arch.

Update mknative-gcc.


# 1.10 27-Nov-2003 mrg

fix a comment; normalise.


# 1.9 27-Nov-2003 mrg

use mknative.common


# 1.8 27-Nov-2003 mrg

be a little more verbose about what we're doing when running mknative.
also grab LIB2FUNCS_EXTRA for libgcc3 (old fix for m68000).


# 1.7 22-Aug-2003 mrg

don't want auto-build.h anymore


# 1.6 01-Aug-2003 mrg

we need config.h an another version of gthr-default.h


# 1.5 30-Jul-2003 mrg

fix a typo in previous


# 1.4 30-Jul-2003 mrg

libiberty/config.h needs to become per-arch.


# 1.3 28-Jul-2003 mrg

fix a bug in previous - two $'s are bad


# 1.2 28-Jul-2003 mrg

add another transform for libobjc3


# 1.1 25-Jul-2003 mrg

- build "binutils" and "gcc" separately if USE_TOOLS_TOOLCHAIN is not set
to "yes".
- adjust dbsym/mdsetimage to look in the correct place for libbfd.
- new mknative-gcc based in toolchain/mknative


# 1.102 16-Oct-2019 mrg

copy arm-cpu.h and arm-isa.h for arm platforms.


Revision tags: netbsd-9-base phil-wifi-20190609
# 1.101 23-Feb-2019 mrg

pull out libstdc++ config.h as-is, for gnu.ver processing.
pull out the cxx11_sources and cxx98_sources values to avoid hard coding.


# 1.100 09-Feb-2019 mrg

- build the gthr*.h files to be installed on the fly, instead of
having dozens of copies of the same thing in the tree.
- don't fetch any gthr*.h files.
- delete ancient gthr-tpf.h that was removed in GCC 4.8 or so.

this should fix the call_once tests for real now.


# 1.99 04-Feb-2019 mrg

common-target source list is MD. make it so.


# 1.98 04-Feb-2019 mrg

- don't getlinks here, they're no longer used.
- pullout the libcommon, libcommon-target and libgomp source list so they
don't have to be hard coded in the reachover makefile


# 1.97 01-Feb-2019 mrg

- 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


Revision tags: pgoyette-compat-20190127
# 1.96 19-Jan-2019 mrg

make includes works now.

pull out more data needed for headers and fix gthr-defaults.h.

libgcc_s has multiple symbols.


# 1.95 19-Jan-2019 mrg

also pull out these variables:
enable_execute_stack
unwind_header
md_unwind_header
sfp_machine_header
thread_header


Revision tags: pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906
# 1.94 04-Sep-2018 mrg

also pullout INTERNAL_CFLAGS for the libgcc build, where it may have
-DHAVE_CC_TLS defined on the command line. (we already collect all
the other components.)


# 1.93 04-Sep-2018 mrg

in configargs.h, as well as normalising to /usr/src, normalise the
--build to the same as the --host, so that it never changes based
upon the host you ran mknative on. (some recent changes are only
because i updated a system from netbsd-7 to netbsd-8. this will
avoid that in the future.)


Revision tags: pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.92 06-Feb-2018 mrg

branches: 1.92.2; 1.92.4;
also fetch GCOV_DUMP_OBJS.


# 1.91 03-Feb-2018 mrg

pullout port_specific_symbol_files from libstdc++.


# 1.90 04-Oct-2017 christos

use the variable for the source dir instead of duplicating it.


Revision tags: perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104
# 1.89 05-Oct-2016 christos

branches: 1.89.6;
revert our changes; softfloat removal is now done in libgcc/config.host


# 1.88 05-Oct-2016 christos

We provide our own soft-float implementation in libc, so elide the libgcc
sources for it.


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.87 17-Mar-2016 mrg

branches: 1.87.2;
set NETBSD_GCC_VERSION for GCC 5.3 separately.
don't collect crtstuff anymore.


# 1.86 16-Mar-2016 mrg

grab insn-modes.h, and do the libgcc bootstrap from gcc as well.


# 1.85 15-Mar-2016 mrg

- 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


# 1.84 15-Mar-2016 mrg

update for GCC 5.3 libgcov and libstdc++


# 1.83 15-Mar-2016 mrg

very first baby steps towards GCC 5.3 mknative.


# 1.82 24-Jan-2016 mrg

add a comment saying this is for GCC 4.8


# 1.81 31-Jan-2015 mrg

kill the -fPIC that m68000 ends up with, fixing it in the specs
is not trivial..


# 1.80 30-Jan-2015 mrg

canonicalise the src dir to /usr/src, so it doesn't matter
where we run mknative.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.79 29-May-2014 skrll

Don't grab libstdc++-v3/config.h it's not used.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
# 1.78 02-Mar-2014 mrg

branches: 1.78.2;
don't collect gthr-default.h anymore.


# 1.77 02-Mar-2014 mrg

don't collect c++allocator.h. we copy it via G_ALLOCATOR_H we've
already pulled out, and the extra copy can confuse make when it
has an older timestamp than the copy in dist/libstdc++-v3/.


# 1.76 26-Feb-2014 mrg

prepare for moving GCC 4.5 into gcc.old:

- convert to using ${EXTERNAL_GCC_SUBDIR}
- define base-external-gpl3-gcc* subdir as GCC_SUBDIR
- use <bsd.init.mk> over <bsd.own.mk> for a bunch of places; mostly
because it arranges for ../Makefile.inc to be included earlier, and
don't bother including the latter if the former is already included.
- move all .PATH: settings after <bsd.{own,lib}.mk> so that all
valid variables are set before it is evaluated
- rename mknative-gcc* to match their subdir name.

XXX the relationship between the Makefile.inc/Makefile.gcc_path files
is kind of sketchy, it would be great if this was fixed.


# 1.75 16-Feb-2014 skrll

The mpfr sources moved down into a src directory - deal with this in
mknative.


# 1.74 28-Nov-2013 mrg

update to MPC 1.0.1.


# 1.73 20-Oct-2013 skrll

Deleted 1 line too many in previous commit.


# 1.72 20-Oct-2013 skrll

g/c gcc3 goop


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.71 28-Jun-2013 mrg

pass both NEWCONFIGDIR and NETBSDSRCDIR to mknative-gcc.


# 1.70 05-May-2013 skrll

Create a sanitise_includes function and use it everywhere it's needed.


# 1.69 25-Apr-2013 skrll

Avoid populating mknative output with gmp,mpfr, and mpc source
directories


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.68 25-Sep-2012 skrll

More tweaks. I didn't manage to complete a mknative from scratch run, but
this is a step in the right direction.


# 1.67 11-Aug-2012 skrll

branches: 1.67.2;
Grab CRTSTUFF_T_CFLAGS_S.

Gentlement start your mknative runs.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base
# 1.66 10-Jan-2012 skrll

Fix bootstrap-libgcc for gcc 4.5


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.65 13-Oct-2011 matt

branches: 1.65.2;
Fix PPC _SOFT_FLOAT


# 1.64 23-Sep-2011 mrg

since omp.h is part of libgomp, put it in the libgomp files not the
libstdc++ files.


# 1.63 21-Sep-2011 mrg

add libgomp support. needed by "cc -fopenmp", that koffice 2.3 wants to use.


# 1.62 17-Aug-2011 matt

Add an inline ex script to modify configargs.h for powerpc to auto-enable
-msoft-float.


# 1.61 03-Jul-2011 mrg

fix the previous


# 1.60 03-Jul-2011 mrg

-I$DESTDIR/usr/include is escaping into the generated files from
the native-gcc run. add some sed commands to remove them.


# 1.59 03-Jul-2011 mrg

copy sysroot-suffix.h as well, for sh3.


# 1.58 02-Jul-2011 mrg

also pull out LIB2ADD_ST for libgcc.


# 1.57 01-Jul-2011 mrg

avoid creating an unused directory.


# 1.56 01-Jul-2011 mrg

- call each ${MKNATIVE_CONFIG_TARGET_LIBS} target separately
- comment out maybe-all-target-libgcc
- cope with the special transformation needed for gtyp-input.list


# 1.55 30-Jun-2011 mrg

fix previous; they belong in _headers1


# 1.54 30-Jun-2011 mrg

also pull tr1_impl_headers parallel_headers and decimal_headers for libstdc++


# 1.53 29-Jun-2011 mrg

fix all-tree.def, and add gtyp-input.list


# 1.52 29-Jun-2011 mrg

fix the path for libdecnumber.


# 1.51 29-Jun-2011 mrg

get libdecnumber info out of GCC.


# 1.50 28-Jun-2011 mrg

also need bversion.h


# 1.49 28-Jun-2011 mrg

some more updates for GCC 4.5.


# 1.48 23-Jun-2011 mrg

output stuff to the right libiberty dir for gcc 4.5.


# 1.47 23-Jun-2011 mrg

get this some what working with GCC 4.5. i at least have managed to
get crtstuff and libgcc to build for amd64, and have linked and tested
/bin/sh with all these GCC 4.5 compiled part.


# 1.46 21-Jun-2011 mrg

initial port to HAVE_GCC = 45. mknative-gcc parts are from me
and are largely untested, most of the rest is from chuq.


Revision tags: cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.45 17-Dec-2009 uebayasi

branches: 1.45.4;
get_libgcc_new: Make previous work for digit only ABI names.


# 1.44 17-Dec-2009 uebayasi

get_libgcc_new: Teach multilib.


Revision tags: matt-premerge-20091211
# 1.43 01-Dec-2009 uebayasi

Skip parameters for multilib build for now.


# 1.42 01-Dec-2009 uebayasi

Handle cases where *.asm is listed in LIB2FUNCS_EXTRA (gcc/config/rs6000).


# 1.41 30-Nov-2009 uebayasi

Handle cases where database text files don't exist.


# 1.40 30-Nov-2009 uebayasi

Call "template sources" as "tmplsrcs", not "tmpsrcs". Requested by mrg@.


# 1.39 30-Nov-2009 uebayasi

Prefix per-library *.mk files with libs.*.


# 1.38 30-Nov-2009 uebayasi

Now that we know what sources are needed to build a given library, we need
the rules how to build those sources. Generate makefiles defining ${COPTS},
${CPPFLAGS}, and ${SRCS} (== template).

Note that ${CPPFLAGS} is actually dfined as _CPPFLAGS like
_CPPFLAGS.tmp___gcc_bcmp.c=-DL__gcc_bcmp
and used to generate wrapper files (e.g. tmp___gcc_bcmp.c). Otherwise it's
automagically passed to ${CC} by bsd.*.mk.


# 1.37 30-Nov-2009 uebayasi

For each library, generate a makefile of the list of template sources too.


# 1.36 30-Nov-2009 uebayasi

For each library, generate a list of sources (*.[cS]).

We create wrapper sources (tmp_*.[cS]) on-the-fly and compile them. For
example, __gcc_bcmp() is compiled using tmp___gcc_bcmp.c, which #define's
L__gcc_bcmp and #include's libgcc2.c.


# 1.35 30-Nov-2009 uebayasi

Move these analyzing functions into one place, get_libgcc_new_analyze().


# 1.34 30-Nov-2009 uebayasi

Typo.


# 1.33 30-Nov-2009 uebayasi

Generate lists of template sources ("tmpsrcs") for each libraries. We'll
need these to create wrappers of tmpsrcs and define correct dependencies.


# 1.32 30-Nov-2009 uebayasi

Generate *.o -> template *.[cS] ("tmpsrc") mapping.

Functions are built from a template (tmpsrc). We create wrapper sources
(src) and define necessary defines and #include tmpsrc.


# 1.31 30-Nov-2009 uebayasi

- Generate a list of CPP flags used to build *.o. Some files are build
repeatedly with different -DXXX to generate similar objects (e.g. different
type size).

- Generate a list of other CC options to build *.o.

(See my sed-fu using hold space in get_libgcc_list_objs_xflags().)


# 1.30 30-Nov-2009 uebayasi

- Generate a list of *.o -> lib*.{a,so} mapping. This is also known by
parsing dependency lines in libgcc.mk.

- Generate a list of *.o -> *.{c,S} mapping. *.S files are known as
${LIB1ASMFUNCS}. Assume other *.o files are built from *.c. This information
is needed to generated wrapper sources later.


# 1.29 30-Nov-2009 uebayasi

Generate lists of functions built in libgcc libraries. This is known by
pattern matching dependency lines in libgcc.mk.


# 1.28 30-Nov-2009 uebayasi

Generate a list of functions provided as *.S.


# 1.27 30-Nov-2009 uebayasi

Define paths of newly generated files.


# 1.26 30-Nov-2009 uebayasi

Start implementing the new style libgcc "mknative" converter which generates
BSD makefiles to build libgcc. The goal is to build all functions rather
than managing the set of functions in gnu/lib/libgcc/Makefile.in by hand.

Because of the complexity of the build procedure, I leave not only generated
makefiles but also intermediate, analyzed data so that people can verify that
the conversion is done correctly.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE jym-xensuspend-nbase netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2
# 1.25 11-Oct-2008 mrg

- add a i386/t-netbsd64 makefile fragment to build 32/64 bit
libgcc/multilib on amd64
- enable the 32/64 bit libgcc/multilib support on sparc64
- adapt mknative-gcc to grab multilib.h
- use --enable-multilib on amd64 and sparc64

none of this affects the installed tools yet, just the src/tools one.


# 1.24 19-Sep-2008 skrll

Grab libgcov stuff.


Revision tags: wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase hpcarm-cleanup-base
# 1.23 08-Feb-2008 skrll

Collect the libobjc config.h


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-4-base
# 1.22 25-Jun-2006 mrg

branches: 1.22.4; 1.22.10;
convert build/ggc-none.o to build-ggc-none.lo.


# 1.21 24-Jun-2006 mrg

also grab ${_extravars} for GCC4 in the get_gcc() function.


# 1.20 09-Jun-2006 skrll

Fixes for mknative runs on gcc3.

- get the information from a gcc3 .native
- don't get gcc4 variables
- put back the getvars for SHLIB_LINK SHLIB_MULTILIB as they work
on gcc3 and leave as XXX'd on gcc4.

I've re-arranged some of the variables to minimise the differences, but
didn't do them all.


# 1.19 02-Jun-2006 mrg

make this work for GCC3 one again.


# 1.18 23-May-2006 mrg

also grab ALL_OPT_FILES from gcc/Makefile for libobjc4.


# 1.17 15-May-2006 mrg

make sure that c++ headers work again.


# 1.16 12-May-2006 mrg

support GCC4:
- look in gnu/dist/gcc4
- don't build fortran
- use /usr/bin/env -i so that gmake works (XXX - breaks from MAKEFLAGS
in the build.sh generated makewrapper.)
- use gmake and Makefile.gmakehost
- update .native/.configure_done target


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-3-base
# 1.15 10-Dec-2004 mrg

mirror a fix from mknative-binutils:
>fix the sed expression that pulls VPATH out of the makefile to work
>with any number of tabs or spaces after the equal sign.


# 1.14 24-Aug-2004 thorpej

Add code to extract make vars for GCC crtstuff.


# 1.13 01-Jul-2004 skrll

Add some more variables used to build libgcc_s.

Part of the fix for PR 22452.


Revision tags: netbsd-2-0-base
# 1.12 10-Feb-2004 skrll

branches: 1.12.2;
Updates so that mknative gets the right things.

- Disable symbol versioning (for now)
- Make sure that libiberty knows its being configured with a
cross compiler.
- The CXX_* variables are no longer needed/used.
- LIB2FUNCS_EXTRA gets pulled in via LIB2ADD
- Get LIB1ASMFUNCS and LIB2ASMSRC
- MAYBE_USE_COLLECT2 got renamed to USE_COLLECT2 (but might not
be used)
- Get EXTRA_HEADERS so that we get generate the right paths for
CPPFLAGS
- Get some variables related to shared libgcc


# 1.11 02-Jan-2004 skrll

Move libgcc3/*.mk to libgcc3/arch.

Update mknative-gcc.


# 1.10 27-Nov-2003 mrg

fix a comment; normalise.


# 1.9 27-Nov-2003 mrg

use mknative.common


# 1.8 27-Nov-2003 mrg

be a little more verbose about what we're doing when running mknative.
also grab LIB2FUNCS_EXTRA for libgcc3 (old fix for m68000).


# 1.7 22-Aug-2003 mrg

don't want auto-build.h anymore


# 1.6 01-Aug-2003 mrg

we need config.h an another version of gthr-default.h


# 1.5 30-Jul-2003 mrg

fix a typo in previous


# 1.4 30-Jul-2003 mrg

libiberty/config.h needs to become per-arch.


# 1.3 28-Jul-2003 mrg

fix a bug in previous - two $'s are bad


# 1.2 28-Jul-2003 mrg

add another transform for libobjc3


# 1.1 25-Jul-2003 mrg

- build "binutils" and "gcc" separately if USE_TOOLS_TOOLCHAIN is not set
to "yes".
- adjust dbsym/mdsetimage to look in the correct place for libbfd.
- new mknative-gcc based in toolchain/mknative


# 1.101 23-Feb-2019 mrg

pull out libstdc++ config.h as-is, for gnu.ver processing.
pull out the cxx11_sources and cxx98_sources values to avoid hard coding.


# 1.100 09-Feb-2019 mrg

- build the gthr*.h files to be installed on the fly, instead of
having dozens of copies of the same thing in the tree.
- don't fetch any gthr*.h files.
- delete ancient gthr-tpf.h that was removed in GCC 4.8 or so.

this should fix the call_once tests for real now.


# 1.99 04-Feb-2019 mrg

common-target source list is MD. make it so.


# 1.98 04-Feb-2019 mrg

- don't getlinks here, they're no longer used.
- pullout the libcommon, libcommon-target and libgomp source list so they
don't have to be hard coded in the reachover makefile


# 1.97 01-Feb-2019 mrg

- 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


Revision tags: pgoyette-compat-20190127
# 1.96 19-Jan-2019 mrg

make includes works now.

pull out more data needed for headers and fix gthr-defaults.h.

libgcc_s has multiple symbols.


# 1.95 19-Jan-2019 mrg

also pull out these variables:
enable_execute_stack
unwind_header
md_unwind_header
sfp_machine_header
thread_header


Revision tags: pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906
# 1.94 04-Sep-2018 mrg

also pullout INTERNAL_CFLAGS for the libgcc build, where it may have
-DHAVE_CC_TLS defined on the command line. (we already collect all
the other components.)


# 1.93 04-Sep-2018 mrg

in configargs.h, as well as normalising to /usr/src, normalise the
--build to the same as the --host, so that it never changes based
upon the host you ran mknative on. (some recent changes are only
because i updated a system from netbsd-7 to netbsd-8. this will
avoid that in the future.)


Revision tags: pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.92 06-Feb-2018 mrg

branches: 1.92.2;
also fetch GCOV_DUMP_OBJS.


# 1.91 03-Feb-2018 mrg

pullout port_specific_symbol_files from libstdc++.


# 1.90 04-Oct-2017 christos

use the variable for the source dir instead of duplicating it.


Revision tags: perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104
# 1.89 05-Oct-2016 christos

branches: 1.89.6;
revert our changes; softfloat removal is now done in libgcc/config.host


# 1.88 05-Oct-2016 christos

We provide our own soft-float implementation in libc, so elide the libgcc
sources for it.


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.87 17-Mar-2016 mrg

branches: 1.87.2;
set NETBSD_GCC_VERSION for GCC 5.3 separately.
don't collect crtstuff anymore.


# 1.86 16-Mar-2016 mrg

grab insn-modes.h, and do the libgcc bootstrap from gcc as well.


# 1.85 15-Mar-2016 mrg

- 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


# 1.84 15-Mar-2016 mrg

update for GCC 5.3 libgcov and libstdc++


# 1.83 15-Mar-2016 mrg

very first baby steps towards GCC 5.3 mknative.


# 1.82 24-Jan-2016 mrg

add a comment saying this is for GCC 4.8


# 1.81 31-Jan-2015 mrg

kill the -fPIC that m68000 ends up with, fixing it in the specs
is not trivial..


# 1.80 30-Jan-2015 mrg

canonicalise the src dir to /usr/src, so it doesn't matter
where we run mknative.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.79 29-May-2014 skrll

Don't grab libstdc++-v3/config.h it's not used.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
# 1.78 02-Mar-2014 mrg

branches: 1.78.2;
don't collect gthr-default.h anymore.


# 1.77 02-Mar-2014 mrg

don't collect c++allocator.h. we copy it via G_ALLOCATOR_H we've
already pulled out, and the extra copy can confuse make when it
has an older timestamp than the copy in dist/libstdc++-v3/.


# 1.76 26-Feb-2014 mrg

prepare for moving GCC 4.5 into gcc.old:

- convert to using ${EXTERNAL_GCC_SUBDIR}
- define base-external-gpl3-gcc* subdir as GCC_SUBDIR
- use <bsd.init.mk> over <bsd.own.mk> for a bunch of places; mostly
because it arranges for ../Makefile.inc to be included earlier, and
don't bother including the latter if the former is already included.
- move all .PATH: settings after <bsd.{own,lib}.mk> so that all
valid variables are set before it is evaluated
- rename mknative-gcc* to match their subdir name.

XXX the relationship between the Makefile.inc/Makefile.gcc_path files
is kind of sketchy, it would be great if this was fixed.


# 1.75 16-Feb-2014 skrll

The mpfr sources moved down into a src directory - deal with this in
mknative.


# 1.74 28-Nov-2013 mrg

update to MPC 1.0.1.


# 1.73 20-Oct-2013 skrll

Deleted 1 line too many in previous commit.


# 1.72 20-Oct-2013 skrll

g/c gcc3 goop


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.71 28-Jun-2013 mrg

pass both NEWCONFIGDIR and NETBSDSRCDIR to mknative-gcc.


# 1.70 05-May-2013 skrll

Create a sanitise_includes function and use it everywhere it's needed.


# 1.69 25-Apr-2013 skrll

Avoid populating mknative output with gmp,mpfr, and mpc source
directories


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.68 25-Sep-2012 skrll

More tweaks. I didn't manage to complete a mknative from scratch run, but
this is a step in the right direction.


# 1.67 11-Aug-2012 skrll

branches: 1.67.2;
Grab CRTSTUFF_T_CFLAGS_S.

Gentlement start your mknative runs.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base
# 1.66 10-Jan-2012 skrll

Fix bootstrap-libgcc for gcc 4.5


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.65 13-Oct-2011 matt

branches: 1.65.2;
Fix PPC _SOFT_FLOAT


# 1.64 23-Sep-2011 mrg

since omp.h is part of libgomp, put it in the libgomp files not the
libstdc++ files.


# 1.63 21-Sep-2011 mrg

add libgomp support. needed by "cc -fopenmp", that koffice 2.3 wants to use.


# 1.62 17-Aug-2011 matt

Add an inline ex script to modify configargs.h for powerpc to auto-enable
-msoft-float.


# 1.61 03-Jul-2011 mrg

fix the previous


# 1.60 03-Jul-2011 mrg

-I$DESTDIR/usr/include is escaping into the generated files from
the native-gcc run. add some sed commands to remove them.


# 1.59 03-Jul-2011 mrg

copy sysroot-suffix.h as well, for sh3.


# 1.58 02-Jul-2011 mrg

also pull out LIB2ADD_ST for libgcc.


# 1.57 01-Jul-2011 mrg

avoid creating an unused directory.


# 1.56 01-Jul-2011 mrg

- call each ${MKNATIVE_CONFIG_TARGET_LIBS} target separately
- comment out maybe-all-target-libgcc
- cope with the special transformation needed for gtyp-input.list


# 1.55 30-Jun-2011 mrg

fix previous; they belong in _headers1


# 1.54 30-Jun-2011 mrg

also pull tr1_impl_headers parallel_headers and decimal_headers for libstdc++


# 1.53 29-Jun-2011 mrg

fix all-tree.def, and add gtyp-input.list


# 1.52 29-Jun-2011 mrg

fix the path for libdecnumber.


# 1.51 29-Jun-2011 mrg

get libdecnumber info out of GCC.


# 1.50 28-Jun-2011 mrg

also need bversion.h


# 1.49 28-Jun-2011 mrg

some more updates for GCC 4.5.


# 1.48 23-Jun-2011 mrg

output stuff to the right libiberty dir for gcc 4.5.


# 1.47 23-Jun-2011 mrg

get this some what working with GCC 4.5. i at least have managed to
get crtstuff and libgcc to build for amd64, and have linked and tested
/bin/sh with all these GCC 4.5 compiled part.


# 1.46 21-Jun-2011 mrg

initial port to HAVE_GCC = 45. mknative-gcc parts are from me
and are largely untested, most of the rest is from chuq.


Revision tags: cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.45 17-Dec-2009 uebayasi

branches: 1.45.4;
get_libgcc_new: Make previous work for digit only ABI names.


# 1.44 17-Dec-2009 uebayasi

get_libgcc_new: Teach multilib.


Revision tags: matt-premerge-20091211
# 1.43 01-Dec-2009 uebayasi

Skip parameters for multilib build for now.


# 1.42 01-Dec-2009 uebayasi

Handle cases where *.asm is listed in LIB2FUNCS_EXTRA (gcc/config/rs6000).


# 1.41 30-Nov-2009 uebayasi

Handle cases where database text files don't exist.


# 1.40 30-Nov-2009 uebayasi

Call "template sources" as "tmplsrcs", not "tmpsrcs". Requested by mrg@.


# 1.39 30-Nov-2009 uebayasi

Prefix per-library *.mk files with libs.*.


# 1.38 30-Nov-2009 uebayasi

Now that we know what sources are needed to build a given library, we need
the rules how to build those sources. Generate makefiles defining ${COPTS},
${CPPFLAGS}, and ${SRCS} (== template).

Note that ${CPPFLAGS} is actually dfined as _CPPFLAGS like
_CPPFLAGS.tmp___gcc_bcmp.c=-DL__gcc_bcmp
and used to generate wrapper files (e.g. tmp___gcc_bcmp.c). Otherwise it's
automagically passed to ${CC} by bsd.*.mk.


# 1.37 30-Nov-2009 uebayasi

For each library, generate a makefile of the list of template sources too.


# 1.36 30-Nov-2009 uebayasi

For each library, generate a list of sources (*.[cS]).

We create wrapper sources (tmp_*.[cS]) on-the-fly and compile them. For
example, __gcc_bcmp() is compiled using tmp___gcc_bcmp.c, which #define's
L__gcc_bcmp and #include's libgcc2.c.


# 1.35 30-Nov-2009 uebayasi

Move these analyzing functions into one place, get_libgcc_new_analyze().


# 1.34 30-Nov-2009 uebayasi

Typo.


# 1.33 30-Nov-2009 uebayasi

Generate lists of template sources ("tmpsrcs") for each libraries. We'll
need these to create wrappers of tmpsrcs and define correct dependencies.


# 1.32 30-Nov-2009 uebayasi

Generate *.o -> template *.[cS] ("tmpsrc") mapping.

Functions are built from a template (tmpsrc). We create wrapper sources
(src) and define necessary defines and #include tmpsrc.


# 1.31 30-Nov-2009 uebayasi

- Generate a list of CPP flags used to build *.o. Some files are build
repeatedly with different -DXXX to generate similar objects (e.g. different
type size).

- Generate a list of other CC options to build *.o.

(See my sed-fu using hold space in get_libgcc_list_objs_xflags().)


# 1.30 30-Nov-2009 uebayasi

- Generate a list of *.o -> lib*.{a,so} mapping. This is also known by
parsing dependency lines in libgcc.mk.

- Generate a list of *.o -> *.{c,S} mapping. *.S files are known as
${LIB1ASMFUNCS}. Assume other *.o files are built from *.c. This information
is needed to generated wrapper sources later.


# 1.29 30-Nov-2009 uebayasi

Generate lists of functions built in libgcc libraries. This is known by
pattern matching dependency lines in libgcc.mk.


# 1.28 30-Nov-2009 uebayasi

Generate a list of functions provided as *.S.


# 1.27 30-Nov-2009 uebayasi

Define paths of newly generated files.


# 1.26 30-Nov-2009 uebayasi

Start implementing the new style libgcc "mknative" converter which generates
BSD makefiles to build libgcc. The goal is to build all functions rather
than managing the set of functions in gnu/lib/libgcc/Makefile.in by hand.

Because of the complexity of the build procedure, I leave not only generated
makefiles but also intermediate, analyzed data so that people can verify that
the conversion is done correctly.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE jym-xensuspend-nbase netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2
# 1.25 11-Oct-2008 mrg

- add a i386/t-netbsd64 makefile fragment to build 32/64 bit
libgcc/multilib on amd64
- enable the 32/64 bit libgcc/multilib support on sparc64
- adapt mknative-gcc to grab multilib.h
- use --enable-multilib on amd64 and sparc64

none of this affects the installed tools yet, just the src/tools one.


# 1.24 19-Sep-2008 skrll

Grab libgcov stuff.


Revision tags: wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase hpcarm-cleanup-base
# 1.23 08-Feb-2008 skrll

Collect the libobjc config.h


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-4-base
# 1.22 25-Jun-2006 mrg

branches: 1.22.4; 1.22.10;
convert build/ggc-none.o to build-ggc-none.lo.


# 1.21 24-Jun-2006 mrg

also grab ${_extravars} for GCC4 in the get_gcc() function.


# 1.20 09-Jun-2006 skrll

Fixes for mknative runs on gcc3.

- get the information from a gcc3 .native
- don't get gcc4 variables
- put back the getvars for SHLIB_LINK SHLIB_MULTILIB as they work
on gcc3 and leave as XXX'd on gcc4.

I've re-arranged some of the variables to minimise the differences, but
didn't do them all.


# 1.19 02-Jun-2006 mrg

make this work for GCC3 one again.


# 1.18 23-May-2006 mrg

also grab ALL_OPT_FILES from gcc/Makefile for libobjc4.


# 1.17 15-May-2006 mrg

make sure that c++ headers work again.


# 1.16 12-May-2006 mrg

support GCC4:
- look in gnu/dist/gcc4
- don't build fortran
- use /usr/bin/env -i so that gmake works (XXX - breaks from MAKEFLAGS
in the build.sh generated makewrapper.)
- use gmake and Makefile.gmakehost
- update .native/.configure_done target


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-3-base
# 1.15 10-Dec-2004 mrg

mirror a fix from mknative-binutils:
>fix the sed expression that pulls VPATH out of the makefile to work
>with any number of tabs or spaces after the equal sign.


# 1.14 24-Aug-2004 thorpej

Add code to extract make vars for GCC crtstuff.


# 1.13 01-Jul-2004 skrll

Add some more variables used to build libgcc_s.

Part of the fix for PR 22452.


Revision tags: netbsd-2-0-base
# 1.12 10-Feb-2004 skrll

branches: 1.12.2;
Updates so that mknative gets the right things.

- Disable symbol versioning (for now)
- Make sure that libiberty knows its being configured with a
cross compiler.
- The CXX_* variables are no longer needed/used.
- LIB2FUNCS_EXTRA gets pulled in via LIB2ADD
- Get LIB1ASMFUNCS and LIB2ASMSRC
- MAYBE_USE_COLLECT2 got renamed to USE_COLLECT2 (but might not
be used)
- Get EXTRA_HEADERS so that we get generate the right paths for
CPPFLAGS
- Get some variables related to shared libgcc


# 1.11 02-Jan-2004 skrll

Move libgcc3/*.mk to libgcc3/arch.

Update mknative-gcc.


# 1.10 27-Nov-2003 mrg

fix a comment; normalise.


# 1.9 27-Nov-2003 mrg

use mknative.common


# 1.8 27-Nov-2003 mrg

be a little more verbose about what we're doing when running mknative.
also grab LIB2FUNCS_EXTRA for libgcc3 (old fix for m68000).


# 1.7 22-Aug-2003 mrg

don't want auto-build.h anymore


# 1.6 01-Aug-2003 mrg

we need config.h an another version of gthr-default.h


# 1.5 30-Jul-2003 mrg

fix a typo in previous


# 1.4 30-Jul-2003 mrg

libiberty/config.h needs to become per-arch.


# 1.3 28-Jul-2003 mrg

fix a bug in previous - two $'s are bad


# 1.2 28-Jul-2003 mrg

add another transform for libobjc3


# 1.1 25-Jul-2003 mrg

- build "binutils" and "gcc" separately if USE_TOOLS_TOOLCHAIN is not set
to "yes".
- adjust dbsym/mdsetimage to look in the correct place for libbfd.
- new mknative-gcc based in toolchain/mknative


# 1.92 06-Feb-2018 mrg

also fetch GCOV_DUMP_OBJS.


# 1.91 03-Feb-2018 mrg

pullout port_specific_symbol_files from libstdc++.


# 1.90 04-Oct-2017 christos

use the variable for the source dir instead of duplicating it.


Revision tags: perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104
# 1.89 05-Oct-2016 christos

branches: 1.89.6;
revert our changes; softfloat removal is now done in libgcc/config.host


# 1.88 05-Oct-2016 christos

We provide our own soft-float implementation in libc, so elide the libgcc
sources for it.


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.87 17-Mar-2016 mrg

branches: 1.87.2;
set NETBSD_GCC_VERSION for GCC 5.3 separately.
don't collect crtstuff anymore.


# 1.86 16-Mar-2016 mrg

grab insn-modes.h, and do the libgcc bootstrap from gcc as well.


# 1.85 15-Mar-2016 mrg

- 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


# 1.84 15-Mar-2016 mrg

update for GCC 5.3 libgcov and libstdc++


# 1.83 15-Mar-2016 mrg

very first baby steps towards GCC 5.3 mknative.


# 1.82 24-Jan-2016 mrg

add a comment saying this is for GCC 4.8


# 1.81 31-Jan-2015 mrg

kill the -fPIC that m68000 ends up with, fixing it in the specs
is not trivial..


# 1.80 30-Jan-2015 mrg

canonicalise the src dir to /usr/src, so it doesn't matter
where we run mknative.


Revision tags: netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.79 29-May-2014 skrll

Don't grab libstdc++-v3/config.h it's not used.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
# 1.78 02-Mar-2014 mrg

branches: 1.78.2;
don't collect gthr-default.h anymore.


# 1.77 02-Mar-2014 mrg

don't collect c++allocator.h. we copy it via G_ALLOCATOR_H we've
already pulled out, and the extra copy can confuse make when it
has an older timestamp than the copy in dist/libstdc++-v3/.


# 1.76 26-Feb-2014 mrg

prepare for moving GCC 4.5 into gcc.old:

- convert to using ${EXTERNAL_GCC_SUBDIR}
- define base-external-gpl3-gcc* subdir as GCC_SUBDIR
- use <bsd.init.mk> over <bsd.own.mk> for a bunch of places; mostly
because it arranges for ../Makefile.inc to be included earlier, and
don't bother including the latter if the former is already included.
- move all .PATH: settings after <bsd.{own,lib}.mk> so that all
valid variables are set before it is evaluated
- rename mknative-gcc* to match their subdir name.

XXX the relationship between the Makefile.inc/Makefile.gcc_path files
is kind of sketchy, it would be great if this was fixed.


# 1.75 16-Feb-2014 skrll

The mpfr sources moved down into a src directory - deal with this in
mknative.


# 1.74 28-Nov-2013 mrg

update to MPC 1.0.1.


# 1.73 20-Oct-2013 skrll

Deleted 1 line too many in previous commit.


# 1.72 20-Oct-2013 skrll

g/c gcc3 goop


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.71 28-Jun-2013 mrg

pass both NEWCONFIGDIR and NETBSDSRCDIR to mknative-gcc.


# 1.70 05-May-2013 skrll

Create a sanitise_includes function and use it everywhere it's needed.


# 1.69 25-Apr-2013 skrll

Avoid populating mknative output with gmp,mpfr, and mpc source
directories


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.68 25-Sep-2012 skrll

More tweaks. I didn't manage to complete a mknative from scratch run, but
this is a step in the right direction.


# 1.67 11-Aug-2012 skrll

branches: 1.67.2;
Grab CRTSTUFF_T_CFLAGS_S.

Gentlement start your mknative runs.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base
# 1.66 10-Jan-2012 skrll

Fix bootstrap-libgcc for gcc 4.5


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.65 13-Oct-2011 matt

branches: 1.65.2;
Fix PPC _SOFT_FLOAT


# 1.64 23-Sep-2011 mrg

since omp.h is part of libgomp, put it in the libgomp files not the
libstdc++ files.


# 1.63 21-Sep-2011 mrg

add libgomp support. needed by "cc -fopenmp", that koffice 2.3 wants to use.


# 1.62 17-Aug-2011 matt

Add an inline ex script to modify configargs.h for powerpc to auto-enable
-msoft-float.


# 1.61 03-Jul-2011 mrg

fix the previous


# 1.60 03-Jul-2011 mrg

-I$DESTDIR/usr/include is escaping into the generated files from
the native-gcc run. add some sed commands to remove them.


# 1.59 03-Jul-2011 mrg

copy sysroot-suffix.h as well, for sh3.


# 1.58 02-Jul-2011 mrg

also pull out LIB2ADD_ST for libgcc.


# 1.57 01-Jul-2011 mrg

avoid creating an unused directory.


# 1.56 01-Jul-2011 mrg

- call each ${MKNATIVE_CONFIG_TARGET_LIBS} target separately
- comment out maybe-all-target-libgcc
- cope with the special transformation needed for gtyp-input.list


# 1.55 30-Jun-2011 mrg

fix previous; they belong in _headers1


# 1.54 30-Jun-2011 mrg

also pull tr1_impl_headers parallel_headers and decimal_headers for libstdc++


# 1.53 29-Jun-2011 mrg

fix all-tree.def, and add gtyp-input.list


# 1.52 29-Jun-2011 mrg

fix the path for libdecnumber.


# 1.51 29-Jun-2011 mrg

get libdecnumber info out of GCC.


# 1.50 28-Jun-2011 mrg

also need bversion.h


# 1.49 28-Jun-2011 mrg

some more updates for GCC 4.5.


# 1.48 23-Jun-2011 mrg

output stuff to the right libiberty dir for gcc 4.5.


# 1.47 23-Jun-2011 mrg

get this some what working with GCC 4.5. i at least have managed to
get crtstuff and libgcc to build for amd64, and have linked and tested
/bin/sh with all these GCC 4.5 compiled part.


# 1.46 21-Jun-2011 mrg

initial port to HAVE_GCC = 45. mknative-gcc parts are from me
and are largely untested, most of the rest is from chuq.


Revision tags: cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.45 17-Dec-2009 uebayasi

branches: 1.45.4;
get_libgcc_new: Make previous work for digit only ABI names.


# 1.44 17-Dec-2009 uebayasi

get_libgcc_new: Teach multilib.


Revision tags: matt-premerge-20091211
# 1.43 01-Dec-2009 uebayasi

Skip parameters for multilib build for now.


# 1.42 01-Dec-2009 uebayasi

Handle cases where *.asm is listed in LIB2FUNCS_EXTRA (gcc/config/rs6000).


# 1.41 30-Nov-2009 uebayasi

Handle cases where database text files don't exist.


# 1.40 30-Nov-2009 uebayasi

Call "template sources" as "tmplsrcs", not "tmpsrcs". Requested by mrg@.


# 1.39 30-Nov-2009 uebayasi

Prefix per-library *.mk files with libs.*.


# 1.38 30-Nov-2009 uebayasi

Now that we know what sources are needed to build a given library, we need
the rules how to build those sources. Generate makefiles defining ${COPTS},
${CPPFLAGS}, and ${SRCS} (== template).

Note that ${CPPFLAGS} is actually dfined as _CPPFLAGS like
_CPPFLAGS.tmp___gcc_bcmp.c=-DL__gcc_bcmp
and used to generate wrapper files (e.g. tmp___gcc_bcmp.c). Otherwise it's
automagically passed to ${CC} by bsd.*.mk.


# 1.37 30-Nov-2009 uebayasi

For each library, generate a makefile of the list of template sources too.


# 1.36 30-Nov-2009 uebayasi

For each library, generate a list of sources (*.[cS]).

We create wrapper sources (tmp_*.[cS]) on-the-fly and compile them. For
example, __gcc_bcmp() is compiled using tmp___gcc_bcmp.c, which #define's
L__gcc_bcmp and #include's libgcc2.c.


# 1.35 30-Nov-2009 uebayasi

Move these analyzing functions into one place, get_libgcc_new_analyze().


# 1.34 30-Nov-2009 uebayasi

Typo.


# 1.33 30-Nov-2009 uebayasi

Generate lists of template sources ("tmpsrcs") for each libraries. We'll
need these to create wrappers of tmpsrcs and define correct dependencies.


# 1.32 30-Nov-2009 uebayasi

Generate *.o -> template *.[cS] ("tmpsrc") mapping.

Functions are built from a template (tmpsrc). We create wrapper sources
(src) and define necessary defines and #include tmpsrc.


# 1.31 30-Nov-2009 uebayasi

- Generate a list of CPP flags used to build *.o. Some files are build
repeatedly with different -DXXX to generate similar objects (e.g. different
type size).

- Generate a list of other CC options to build *.o.

(See my sed-fu using hold space in get_libgcc_list_objs_xflags().)


# 1.30 30-Nov-2009 uebayasi

- Generate a list of *.o -> lib*.{a,so} mapping. This is also known by
parsing dependency lines in libgcc.mk.

- Generate a list of *.o -> *.{c,S} mapping. *.S files are known as
${LIB1ASMFUNCS}. Assume other *.o files are built from *.c. This information
is needed to generated wrapper sources later.


# 1.29 30-Nov-2009 uebayasi

Generate lists of functions built in libgcc libraries. This is known by
pattern matching dependency lines in libgcc.mk.


# 1.28 30-Nov-2009 uebayasi

Generate a list of functions provided as *.S.


# 1.27 30-Nov-2009 uebayasi

Define paths of newly generated files.


# 1.26 30-Nov-2009 uebayasi

Start implementing the new style libgcc "mknative" converter which generates
BSD makefiles to build libgcc. The goal is to build all functions rather
than managing the set of functions in gnu/lib/libgcc/Makefile.in by hand.

Because of the complexity of the build procedure, I leave not only generated
makefiles but also intermediate, analyzed data so that people can verify that
the conversion is done correctly.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE jym-xensuspend-nbase netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2
# 1.25 11-Oct-2008 mrg

- add a i386/t-netbsd64 makefile fragment to build 32/64 bit
libgcc/multilib on amd64
- enable the 32/64 bit libgcc/multilib support on sparc64
- adapt mknative-gcc to grab multilib.h
- use --enable-multilib on amd64 and sparc64

none of this affects the installed tools yet, just the src/tools one.


# 1.24 19-Sep-2008 skrll

Grab libgcov stuff.


Revision tags: wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase hpcarm-cleanup-base
# 1.23 08-Feb-2008 skrll

Collect the libobjc config.h


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-4-base
# 1.22 25-Jun-2006 mrg

branches: 1.22.4; 1.22.10;
convert build/ggc-none.o to build-ggc-none.lo.


# 1.21 24-Jun-2006 mrg

also grab ${_extravars} for GCC4 in the get_gcc() function.


# 1.20 09-Jun-2006 skrll

Fixes for mknative runs on gcc3.

- get the information from a gcc3 .native
- don't get gcc4 variables
- put back the getvars for SHLIB_LINK SHLIB_MULTILIB as they work
on gcc3 and leave as XXX'd on gcc4.

I've re-arranged some of the variables to minimise the differences, but
didn't do them all.


# 1.19 02-Jun-2006 mrg

make this work for GCC3 one again.


# 1.18 23-May-2006 mrg

also grab ALL_OPT_FILES from gcc/Makefile for libobjc4.


# 1.17 15-May-2006 mrg

make sure that c++ headers work again.


# 1.16 12-May-2006 mrg

support GCC4:
- look in gnu/dist/gcc4
- don't build fortran
- use /usr/bin/env -i so that gmake works (XXX - breaks from MAKEFLAGS
in the build.sh generated makewrapper.)
- use gmake and Makefile.gmakehost
- update .native/.configure_done target


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-3-base
# 1.15 10-Dec-2004 mrg

mirror a fix from mknative-binutils:
>fix the sed expression that pulls VPATH out of the makefile to work
>with any number of tabs or spaces after the equal sign.


# 1.14 24-Aug-2004 thorpej

Add code to extract make vars for GCC crtstuff.


# 1.13 01-Jul-2004 skrll

Add some more variables used to build libgcc_s.

Part of the fix for PR 22452.


Revision tags: netbsd-2-0-base
# 1.12 10-Feb-2004 skrll

branches: 1.12.2;
Updates so that mknative gets the right things.

- Disable symbol versioning (for now)
- Make sure that libiberty knows its being configured with a
cross compiler.
- The CXX_* variables are no longer needed/used.
- LIB2FUNCS_EXTRA gets pulled in via LIB2ADD
- Get LIB1ASMFUNCS and LIB2ASMSRC
- MAYBE_USE_COLLECT2 got renamed to USE_COLLECT2 (but might not
be used)
- Get EXTRA_HEADERS so that we get generate the right paths for
CPPFLAGS
- Get some variables related to shared libgcc


# 1.11 02-Jan-2004 skrll

Move libgcc3/*.mk to libgcc3/arch.

Update mknative-gcc.


# 1.10 27-Nov-2003 mrg

fix a comment; normalise.


# 1.9 27-Nov-2003 mrg

use mknative.common


# 1.8 27-Nov-2003 mrg

be a little more verbose about what we're doing when running mknative.
also grab LIB2FUNCS_EXTRA for libgcc3 (old fix for m68000).


# 1.7 22-Aug-2003 mrg

don't want auto-build.h anymore


# 1.6 01-Aug-2003 mrg

we need config.h an another version of gthr-default.h


# 1.5 30-Jul-2003 mrg

fix a typo in previous


# 1.4 30-Jul-2003 mrg

libiberty/config.h needs to become per-arch.


# 1.3 28-Jul-2003 mrg

fix a bug in previous - two $'s are bad


# 1.2 28-Jul-2003 mrg

add another transform for libobjc3


# 1.1 25-Jul-2003 mrg

- build "binutils" and "gcc" separately if USE_TOOLS_TOOLCHAIN is not set
to "yes".
- adjust dbsym/mdsetimage to look in the correct place for libbfd.
- new mknative-gcc based in toolchain/mknative


# 1.90 04-Oct-2017 christos

use the variable for the source dir instead of duplicating it.


Revision tags: perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104
# 1.89 05-Oct-2016 christos

branches: 1.89.6;
revert our changes; softfloat removal is now done in libgcc/config.host


# 1.88 05-Oct-2016 christos

We provide our own soft-float implementation in libc, so elide the libgcc
sources for it.


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.87 17-Mar-2016 mrg

branches: 1.87.2;
set NETBSD_GCC_VERSION for GCC 5.3 separately.
don't collect crtstuff anymore.


# 1.86 16-Mar-2016 mrg

grab insn-modes.h, and do the libgcc bootstrap from gcc as well.


# 1.85 15-Mar-2016 mrg

- 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


# 1.84 15-Mar-2016 mrg

update for GCC 5.3 libgcov and libstdc++


# 1.83 15-Mar-2016 mrg

very first baby steps towards GCC 5.3 mknative.


# 1.82 24-Jan-2016 mrg

add a comment saying this is for GCC 4.8


# 1.81 31-Jan-2015 mrg

kill the -fPIC that m68000 ends up with, fixing it in the specs
is not trivial..


# 1.80 30-Jan-2015 mrg

canonicalise the src dir to /usr/src, so it doesn't matter
where we run mknative.


Revision tags: netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.79 29-May-2014 skrll

Don't grab libstdc++-v3/config.h it's not used.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
# 1.78 02-Mar-2014 mrg

branches: 1.78.2;
don't collect gthr-default.h anymore.


# 1.77 02-Mar-2014 mrg

don't collect c++allocator.h. we copy it via G_ALLOCATOR_H we've
already pulled out, and the extra copy can confuse make when it
has an older timestamp than the copy in dist/libstdc++-v3/.


# 1.76 26-Feb-2014 mrg

prepare for moving GCC 4.5 into gcc.old:

- convert to using ${EXTERNAL_GCC_SUBDIR}
- define base-external-gpl3-gcc* subdir as GCC_SUBDIR
- use <bsd.init.mk> over <bsd.own.mk> for a bunch of places; mostly
because it arranges for ../Makefile.inc to be included earlier, and
don't bother including the latter if the former is already included.
- move all .PATH: settings after <bsd.{own,lib}.mk> so that all
valid variables are set before it is evaluated
- rename mknative-gcc* to match their subdir name.

XXX the relationship between the Makefile.inc/Makefile.gcc_path files
is kind of sketchy, it would be great if this was fixed.


# 1.75 16-Feb-2014 skrll

The mpfr sources moved down into a src directory - deal with this in
mknative.


# 1.74 28-Nov-2013 mrg

update to MPC 1.0.1.


# 1.73 20-Oct-2013 skrll

Deleted 1 line too many in previous commit.


# 1.72 20-Oct-2013 skrll

g/c gcc3 goop


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.71 28-Jun-2013 mrg

pass both NEWCONFIGDIR and NETBSDSRCDIR to mknative-gcc.


# 1.70 05-May-2013 skrll

Create a sanitise_includes function and use it everywhere it's needed.


# 1.69 25-Apr-2013 skrll

Avoid populating mknative output with gmp,mpfr, and mpc source
directories


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.68 25-Sep-2012 skrll

More tweaks. I didn't manage to complete a mknative from scratch run, but
this is a step in the right direction.


# 1.67 11-Aug-2012 skrll

branches: 1.67.2;
Grab CRTSTUFF_T_CFLAGS_S.

Gentlement start your mknative runs.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base
# 1.66 10-Jan-2012 skrll

Fix bootstrap-libgcc for gcc 4.5


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.65 13-Oct-2011 matt

branches: 1.65.2;
Fix PPC _SOFT_FLOAT


# 1.64 23-Sep-2011 mrg

since omp.h is part of libgomp, put it in the libgomp files not the
libstdc++ files.


# 1.63 21-Sep-2011 mrg

add libgomp support. needed by "cc -fopenmp", that koffice 2.3 wants to use.


# 1.62 17-Aug-2011 matt

Add an inline ex script to modify configargs.h for powerpc to auto-enable
-msoft-float.


# 1.61 03-Jul-2011 mrg

fix the previous


# 1.60 03-Jul-2011 mrg

-I$DESTDIR/usr/include is escaping into the generated files from
the native-gcc run. add some sed commands to remove them.


# 1.59 03-Jul-2011 mrg

copy sysroot-suffix.h as well, for sh3.


# 1.58 02-Jul-2011 mrg

also pull out LIB2ADD_ST for libgcc.


# 1.57 01-Jul-2011 mrg

avoid creating an unused directory.


# 1.56 01-Jul-2011 mrg

- call each ${MKNATIVE_CONFIG_TARGET_LIBS} target separately
- comment out maybe-all-target-libgcc
- cope with the special transformation needed for gtyp-input.list


# 1.55 30-Jun-2011 mrg

fix previous; they belong in _headers1


# 1.54 30-Jun-2011 mrg

also pull tr1_impl_headers parallel_headers and decimal_headers for libstdc++


# 1.53 29-Jun-2011 mrg

fix all-tree.def, and add gtyp-input.list


# 1.52 29-Jun-2011 mrg

fix the path for libdecnumber.


# 1.51 29-Jun-2011 mrg

get libdecnumber info out of GCC.


# 1.50 28-Jun-2011 mrg

also need bversion.h


# 1.49 28-Jun-2011 mrg

some more updates for GCC 4.5.


# 1.48 23-Jun-2011 mrg

output stuff to the right libiberty dir for gcc 4.5.


# 1.47 23-Jun-2011 mrg

get this some what working with GCC 4.5. i at least have managed to
get crtstuff and libgcc to build for amd64, and have linked and tested
/bin/sh with all these GCC 4.5 compiled part.


# 1.46 21-Jun-2011 mrg

initial port to HAVE_GCC = 45. mknative-gcc parts are from me
and are largely untested, most of the rest is from chuq.


Revision tags: cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.45 17-Dec-2009 uebayasi

branches: 1.45.4;
get_libgcc_new: Make previous work for digit only ABI names.


# 1.44 17-Dec-2009 uebayasi

get_libgcc_new: Teach multilib.


Revision tags: matt-premerge-20091211
# 1.43 01-Dec-2009 uebayasi

Skip parameters for multilib build for now.


# 1.42 01-Dec-2009 uebayasi

Handle cases where *.asm is listed in LIB2FUNCS_EXTRA (gcc/config/rs6000).


# 1.41 30-Nov-2009 uebayasi

Handle cases where database text files don't exist.


# 1.40 30-Nov-2009 uebayasi

Call "template sources" as "tmplsrcs", not "tmpsrcs". Requested by mrg@.


# 1.39 30-Nov-2009 uebayasi

Prefix per-library *.mk files with libs.*.


# 1.38 30-Nov-2009 uebayasi

Now that we know what sources are needed to build a given library, we need
the rules how to build those sources. Generate makefiles defining ${COPTS},
${CPPFLAGS}, and ${SRCS} (== template).

Note that ${CPPFLAGS} is actually dfined as _CPPFLAGS like
_CPPFLAGS.tmp___gcc_bcmp.c=-DL__gcc_bcmp
and used to generate wrapper files (e.g. tmp___gcc_bcmp.c). Otherwise it's
automagically passed to ${CC} by bsd.*.mk.


# 1.37 30-Nov-2009 uebayasi

For each library, generate a makefile of the list of template sources too.


# 1.36 30-Nov-2009 uebayasi

For each library, generate a list of sources (*.[cS]).

We create wrapper sources (tmp_*.[cS]) on-the-fly and compile them. For
example, __gcc_bcmp() is compiled using tmp___gcc_bcmp.c, which #define's
L__gcc_bcmp and #include's libgcc2.c.


# 1.35 30-Nov-2009 uebayasi

Move these analyzing functions into one place, get_libgcc_new_analyze().


# 1.34 30-Nov-2009 uebayasi

Typo.


# 1.33 30-Nov-2009 uebayasi

Generate lists of template sources ("tmpsrcs") for each libraries. We'll
need these to create wrappers of tmpsrcs and define correct dependencies.


# 1.32 30-Nov-2009 uebayasi

Generate *.o -> template *.[cS] ("tmpsrc") mapping.

Functions are built from a template (tmpsrc). We create wrapper sources
(src) and define necessary defines and #include tmpsrc.


# 1.31 30-Nov-2009 uebayasi

- Generate a list of CPP flags used to build *.o. Some files are build
repeatedly with different -DXXX to generate similar objects (e.g. different
type size).

- Generate a list of other CC options to build *.o.

(See my sed-fu using hold space in get_libgcc_list_objs_xflags().)


# 1.30 30-Nov-2009 uebayasi

- Generate a list of *.o -> lib*.{a,so} mapping. This is also known by
parsing dependency lines in libgcc.mk.

- Generate a list of *.o -> *.{c,S} mapping. *.S files are known as
${LIB1ASMFUNCS}. Assume other *.o files are built from *.c. This information
is needed to generated wrapper sources later.


# 1.29 30-Nov-2009 uebayasi

Generate lists of functions built in libgcc libraries. This is known by
pattern matching dependency lines in libgcc.mk.


# 1.28 30-Nov-2009 uebayasi

Generate a list of functions provided as *.S.


# 1.27 30-Nov-2009 uebayasi

Define paths of newly generated files.


# 1.26 30-Nov-2009 uebayasi

Start implementing the new style libgcc "mknative" converter which generates
BSD makefiles to build libgcc. The goal is to build all functions rather
than managing the set of functions in gnu/lib/libgcc/Makefile.in by hand.

Because of the complexity of the build procedure, I leave not only generated
makefiles but also intermediate, analyzed data so that people can verify that
the conversion is done correctly.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE jym-xensuspend-nbase netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2
# 1.25 11-Oct-2008 mrg

- add a i386/t-netbsd64 makefile fragment to build 32/64 bit
libgcc/multilib on amd64
- enable the 32/64 bit libgcc/multilib support on sparc64
- adapt mknative-gcc to grab multilib.h
- use --enable-multilib on amd64 and sparc64

none of this affects the installed tools yet, just the src/tools one.


# 1.24 19-Sep-2008 skrll

Grab libgcov stuff.


Revision tags: wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase hpcarm-cleanup-base
# 1.23 08-Feb-2008 skrll

Collect the libobjc config.h


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-4-base
# 1.22 25-Jun-2006 mrg

branches: 1.22.4; 1.22.10;
convert build/ggc-none.o to build-ggc-none.lo.


# 1.21 24-Jun-2006 mrg

also grab ${_extravars} for GCC4 in the get_gcc() function.


# 1.20 09-Jun-2006 skrll

Fixes for mknative runs on gcc3.

- get the information from a gcc3 .native
- don't get gcc4 variables
- put back the getvars for SHLIB_LINK SHLIB_MULTILIB as they work
on gcc3 and leave as XXX'd on gcc4.

I've re-arranged some of the variables to minimise the differences, but
didn't do them all.


# 1.19 02-Jun-2006 mrg

make this work for GCC3 one again.


# 1.18 23-May-2006 mrg

also grab ALL_OPT_FILES from gcc/Makefile for libobjc4.


# 1.17 15-May-2006 mrg

make sure that c++ headers work again.


# 1.16 12-May-2006 mrg

support GCC4:
- look in gnu/dist/gcc4
- don't build fortran
- use /usr/bin/env -i so that gmake works (XXX - breaks from MAKEFLAGS
in the build.sh generated makewrapper.)
- use gmake and Makefile.gmakehost
- update .native/.configure_done target


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-3-base
# 1.15 10-Dec-2004 mrg

mirror a fix from mknative-binutils:
>fix the sed expression that pulls VPATH out of the makefile to work
>with any number of tabs or spaces after the equal sign.


# 1.14 24-Aug-2004 thorpej

Add code to extract make vars for GCC crtstuff.


# 1.13 01-Jul-2004 skrll

Add some more variables used to build libgcc_s.

Part of the fix for PR 22452.


Revision tags: netbsd-2-0-base
# 1.12 10-Feb-2004 skrll

branches: 1.12.2;
Updates so that mknative gets the right things.

- Disable symbol versioning (for now)
- Make sure that libiberty knows its being configured with a
cross compiler.
- The CXX_* variables are no longer needed/used.
- LIB2FUNCS_EXTRA gets pulled in via LIB2ADD
- Get LIB1ASMFUNCS and LIB2ASMSRC
- MAYBE_USE_COLLECT2 got renamed to USE_COLLECT2 (but might not
be used)
- Get EXTRA_HEADERS so that we get generate the right paths for
CPPFLAGS
- Get some variables related to shared libgcc


# 1.11 02-Jan-2004 skrll

Move libgcc3/*.mk to libgcc3/arch.

Update mknative-gcc.


# 1.10 27-Nov-2003 mrg

fix a comment; normalise.


# 1.9 27-Nov-2003 mrg

use mknative.common


# 1.8 27-Nov-2003 mrg

be a little more verbose about what we're doing when running mknative.
also grab LIB2FUNCS_EXTRA for libgcc3 (old fix for m68000).


# 1.7 22-Aug-2003 mrg

don't want auto-build.h anymore


# 1.6 01-Aug-2003 mrg

we need config.h an another version of gthr-default.h


# 1.5 30-Jul-2003 mrg

fix a typo in previous


# 1.4 30-Jul-2003 mrg

libiberty/config.h needs to become per-arch.


# 1.3 28-Jul-2003 mrg

fix a bug in previous - two $'s are bad


# 1.2 28-Jul-2003 mrg

add another transform for libobjc3


# 1.1 25-Jul-2003 mrg

- build "binutils" and "gcc" separately if USE_TOOLS_TOOLCHAIN is not set
to "yes".
- adjust dbsym/mdsetimage to look in the correct place for libbfd.
- new mknative-gcc based in toolchain/mknative


Revision tags: pgoyette-localcount-20161104
# 1.89 05-Oct-2016 christos

revert our changes; softfloat removal is now done in libgcc/config.host


# 1.88 05-Oct-2016 christos

We provide our own soft-float implementation in libc, so elide the libgcc
sources for it.


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.87 17-Mar-2016 mrg

branches: 1.87.2;
set NETBSD_GCC_VERSION for GCC 5.3 separately.
don't collect crtstuff anymore.


# 1.86 16-Mar-2016 mrg

grab insn-modes.h, and do the libgcc bootstrap from gcc as well.


# 1.85 15-Mar-2016 mrg

- 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


# 1.84 15-Mar-2016 mrg

update for GCC 5.3 libgcov and libstdc++


# 1.83 15-Mar-2016 mrg

very first baby steps towards GCC 5.3 mknative.


# 1.82 24-Jan-2016 mrg

add a comment saying this is for GCC 4.8


# 1.81 31-Jan-2015 mrg

kill the -fPIC that m68000 ends up with, fixing it in the specs
is not trivial..


# 1.80 30-Jan-2015 mrg

canonicalise the src dir to /usr/src, so it doesn't matter
where we run mknative.


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.79 29-May-2014 skrll

Don't grab libstdc++-v3/config.h it's not used.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
# 1.78 02-Mar-2014 mrg

branches: 1.78.2;
don't collect gthr-default.h anymore.


# 1.77 02-Mar-2014 mrg

don't collect c++allocator.h. we copy it via G_ALLOCATOR_H we've
already pulled out, and the extra copy can confuse make when it
has an older timestamp than the copy in dist/libstdc++-v3/.


# 1.76 26-Feb-2014 mrg

prepare for moving GCC 4.5 into gcc.old:

- convert to using ${EXTERNAL_GCC_SUBDIR}
- define base-external-gpl3-gcc* subdir as GCC_SUBDIR
- use <bsd.init.mk> over <bsd.own.mk> for a bunch of places; mostly
because it arranges for ../Makefile.inc to be included earlier, and
don't bother including the latter if the former is already included.
- move all .PATH: settings after <bsd.{own,lib}.mk> so that all
valid variables are set before it is evaluated
- rename mknative-gcc* to match their subdir name.

XXX the relationship between the Makefile.inc/Makefile.gcc_path files
is kind of sketchy, it would be great if this was fixed.


# 1.75 16-Feb-2014 skrll

The mpfr sources moved down into a src directory - deal with this in
mknative.


# 1.74 28-Nov-2013 mrg

update to MPC 1.0.1.


# 1.73 20-Oct-2013 skrll

Deleted 1 line too many in previous commit.


# 1.72 20-Oct-2013 skrll

g/c gcc3 goop


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.71 28-Jun-2013 mrg

pass both NEWCONFIGDIR and NETBSDSRCDIR to mknative-gcc.


# 1.70 05-May-2013 skrll

Create a sanitise_includes function and use it everywhere it's needed.


# 1.69 25-Apr-2013 skrll

Avoid populating mknative output with gmp,mpfr, and mpc source
directories


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.68 25-Sep-2012 skrll

More tweaks. I didn't manage to complete a mknative from scratch run, but
this is a step in the right direction.


# 1.67 11-Aug-2012 skrll

branches: 1.67.2;
Grab CRTSTUFF_T_CFLAGS_S.

Gentlement start your mknative runs.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base
# 1.66 10-Jan-2012 skrll

Fix bootstrap-libgcc for gcc 4.5


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.65 13-Oct-2011 matt

branches: 1.65.2;
Fix PPC _SOFT_FLOAT


# 1.64 23-Sep-2011 mrg

since omp.h is part of libgomp, put it in the libgomp files not the
libstdc++ files.


# 1.63 21-Sep-2011 mrg

add libgomp support. needed by "cc -fopenmp", that koffice 2.3 wants to use.


# 1.62 17-Aug-2011 matt

Add an inline ex script to modify configargs.h for powerpc to auto-enable
-msoft-float.


# 1.61 03-Jul-2011 mrg

fix the previous


# 1.60 03-Jul-2011 mrg

-I$DESTDIR/usr/include is escaping into the generated files from
the native-gcc run. add some sed commands to remove them.


# 1.59 03-Jul-2011 mrg

copy sysroot-suffix.h as well, for sh3.


# 1.58 02-Jul-2011 mrg

also pull out LIB2ADD_ST for libgcc.


# 1.57 01-Jul-2011 mrg

avoid creating an unused directory.


# 1.56 01-Jul-2011 mrg

- call each ${MKNATIVE_CONFIG_TARGET_LIBS} target separately
- comment out maybe-all-target-libgcc
- cope with the special transformation needed for gtyp-input.list


# 1.55 30-Jun-2011 mrg

fix previous; they belong in _headers1


# 1.54 30-Jun-2011 mrg

also pull tr1_impl_headers parallel_headers and decimal_headers for libstdc++


# 1.53 29-Jun-2011 mrg

fix all-tree.def, and add gtyp-input.list


# 1.52 29-Jun-2011 mrg

fix the path for libdecnumber.


# 1.51 29-Jun-2011 mrg

get libdecnumber info out of GCC.


# 1.50 28-Jun-2011 mrg

also need bversion.h


# 1.49 28-Jun-2011 mrg

some more updates for GCC 4.5.


# 1.48 23-Jun-2011 mrg

output stuff to the right libiberty dir for gcc 4.5.


# 1.47 23-Jun-2011 mrg

get this some what working with GCC 4.5. i at least have managed to
get crtstuff and libgcc to build for amd64, and have linked and tested
/bin/sh with all these GCC 4.5 compiled part.


# 1.46 21-Jun-2011 mrg

initial port to HAVE_GCC = 45. mknative-gcc parts are from me
and are largely untested, most of the rest is from chuq.


Revision tags: cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.45 17-Dec-2009 uebayasi

branches: 1.45.4;
get_libgcc_new: Make previous work for digit only ABI names.


# 1.44 17-Dec-2009 uebayasi

get_libgcc_new: Teach multilib.


Revision tags: matt-premerge-20091211
# 1.43 01-Dec-2009 uebayasi

Skip parameters for multilib build for now.


# 1.42 01-Dec-2009 uebayasi

Handle cases where *.asm is listed in LIB2FUNCS_EXTRA (gcc/config/rs6000).


# 1.41 30-Nov-2009 uebayasi

Handle cases where database text files don't exist.


# 1.40 30-Nov-2009 uebayasi

Call "template sources" as "tmplsrcs", not "tmpsrcs". Requested by mrg@.


# 1.39 30-Nov-2009 uebayasi

Prefix per-library *.mk files with libs.*.


# 1.38 30-Nov-2009 uebayasi

Now that we know what sources are needed to build a given library, we need
the rules how to build those sources. Generate makefiles defining ${COPTS},
${CPPFLAGS}, and ${SRCS} (== template).

Note that ${CPPFLAGS} is actually dfined as _CPPFLAGS like
_CPPFLAGS.tmp___gcc_bcmp.c=-DL__gcc_bcmp
and used to generate wrapper files (e.g. tmp___gcc_bcmp.c). Otherwise it's
automagically passed to ${CC} by bsd.*.mk.


# 1.37 30-Nov-2009 uebayasi

For each library, generate a makefile of the list of template sources too.


# 1.36 30-Nov-2009 uebayasi

For each library, generate a list of sources (*.[cS]).

We create wrapper sources (tmp_*.[cS]) on-the-fly and compile them. For
example, __gcc_bcmp() is compiled using tmp___gcc_bcmp.c, which #define's
L__gcc_bcmp and #include's libgcc2.c.


# 1.35 30-Nov-2009 uebayasi

Move these analyzing functions into one place, get_libgcc_new_analyze().


# 1.34 30-Nov-2009 uebayasi

Typo.


# 1.33 30-Nov-2009 uebayasi

Generate lists of template sources ("tmpsrcs") for each libraries. We'll
need these to create wrappers of tmpsrcs and define correct dependencies.


# 1.32 30-Nov-2009 uebayasi

Generate *.o -> template *.[cS] ("tmpsrc") mapping.

Functions are built from a template (tmpsrc). We create wrapper sources
(src) and define necessary defines and #include tmpsrc.


# 1.31 30-Nov-2009 uebayasi

- Generate a list of CPP flags used to build *.o. Some files are build
repeatedly with different -DXXX to generate similar objects (e.g. different
type size).

- Generate a list of other CC options to build *.o.

(See my sed-fu using hold space in get_libgcc_list_objs_xflags().)


# 1.30 30-Nov-2009 uebayasi

- Generate a list of *.o -> lib*.{a,so} mapping. This is also known by
parsing dependency lines in libgcc.mk.

- Generate a list of *.o -> *.{c,S} mapping. *.S files are known as
${LIB1ASMFUNCS}. Assume other *.o files are built from *.c. This information
is needed to generated wrapper sources later.


# 1.29 30-Nov-2009 uebayasi

Generate lists of functions built in libgcc libraries. This is known by
pattern matching dependency lines in libgcc.mk.


# 1.28 30-Nov-2009 uebayasi

Generate a list of functions provided as *.S.


# 1.27 30-Nov-2009 uebayasi

Define paths of newly generated files.


# 1.26 30-Nov-2009 uebayasi

Start implementing the new style libgcc "mknative" converter which generates
BSD makefiles to build libgcc. The goal is to build all functions rather
than managing the set of functions in gnu/lib/libgcc/Makefile.in by hand.

Because of the complexity of the build procedure, I leave not only generated
makefiles but also intermediate, analyzed data so that people can verify that
the conversion is done correctly.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE jym-xensuspend-nbase netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2
# 1.25 11-Oct-2008 mrg

- add a i386/t-netbsd64 makefile fragment to build 32/64 bit
libgcc/multilib on amd64
- enable the 32/64 bit libgcc/multilib support on sparc64
- adapt mknative-gcc to grab multilib.h
- use --enable-multilib on amd64 and sparc64

none of this affects the installed tools yet, just the src/tools one.


# 1.24 19-Sep-2008 skrll

Grab libgcov stuff.


Revision tags: wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase hpcarm-cleanup-base
# 1.23 08-Feb-2008 skrll

Collect the libobjc config.h


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-4-base
# 1.22 25-Jun-2006 mrg

branches: 1.22.4; 1.22.10;
convert build/ggc-none.o to build-ggc-none.lo.


# 1.21 24-Jun-2006 mrg

also grab ${_extravars} for GCC4 in the get_gcc() function.


# 1.20 09-Jun-2006 skrll

Fixes for mknative runs on gcc3.

- get the information from a gcc3 .native
- don't get gcc4 variables
- put back the getvars for SHLIB_LINK SHLIB_MULTILIB as they work
on gcc3 and leave as XXX'd on gcc4.

I've re-arranged some of the variables to minimise the differences, but
didn't do them all.


# 1.19 02-Jun-2006 mrg

make this work for GCC3 one again.


# 1.18 23-May-2006 mrg

also grab ALL_OPT_FILES from gcc/Makefile for libobjc4.


# 1.17 15-May-2006 mrg

make sure that c++ headers work again.


# 1.16 12-May-2006 mrg

support GCC4:
- look in gnu/dist/gcc4
- don't build fortran
- use /usr/bin/env -i so that gmake works (XXX - breaks from MAKEFLAGS
in the build.sh generated makewrapper.)
- use gmake and Makefile.gmakehost
- update .native/.configure_done target


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-3-base
# 1.15 10-Dec-2004 mrg

mirror a fix from mknative-binutils:
>fix the sed expression that pulls VPATH out of the makefile to work
>with any number of tabs or spaces after the equal sign.


# 1.14 24-Aug-2004 thorpej

Add code to extract make vars for GCC crtstuff.


# 1.13 01-Jul-2004 skrll

Add some more variables used to build libgcc_s.

Part of the fix for PR 22452.


Revision tags: netbsd-2-0-base
# 1.12 10-Feb-2004 skrll

branches: 1.12.2;
Updates so that mknative gets the right things.

- Disable symbol versioning (for now)
- Make sure that libiberty knows its being configured with a
cross compiler.
- The CXX_* variables are no longer needed/used.
- LIB2FUNCS_EXTRA gets pulled in via LIB2ADD
- Get LIB1ASMFUNCS and LIB2ASMSRC
- MAYBE_USE_COLLECT2 got renamed to USE_COLLECT2 (but might not
be used)
- Get EXTRA_HEADERS so that we get generate the right paths for
CPPFLAGS
- Get some variables related to shared libgcc


# 1.11 02-Jan-2004 skrll

Move libgcc3/*.mk to libgcc3/arch.

Update mknative-gcc.


# 1.10 27-Nov-2003 mrg

fix a comment; normalise.


# 1.9 27-Nov-2003 mrg

use mknative.common


# 1.8 27-Nov-2003 mrg

be a little more verbose about what we're doing when running mknative.
also grab LIB2FUNCS_EXTRA for libgcc3 (old fix for m68000).


# 1.7 22-Aug-2003 mrg

don't want auto-build.h anymore


# 1.6 01-Aug-2003 mrg

we need config.h an another version of gthr-default.h


# 1.5 30-Jul-2003 mrg

fix a typo in previous


# 1.4 30-Jul-2003 mrg

libiberty/config.h needs to become per-arch.


# 1.3 28-Jul-2003 mrg

fix a bug in previous - two $'s are bad


# 1.2 28-Jul-2003 mrg

add another transform for libobjc3


# 1.1 25-Jul-2003 mrg

- build "binutils" and "gcc" separately if USE_TOOLS_TOOLCHAIN is not set
to "yes".
- adjust dbsym/mdsetimage to look in the correct place for libbfd.
- new mknative-gcc based in toolchain/mknative