Home | History | Annotate | Download | only in gcc
History log of /src/tools/gcc/mknative-gcc
RevisionDateAuthorComments
 1.121  17-Sep-2025  mrg fetch ALL_OPT_URL_FILES as well for GCC 14.
 1.120  16-Sep-2025  mrg pull out more libstdc++ sources.
 1.119  16-Sep-2025  mrg adjust these so mknative-gcc.old is for gcc 12 and mknative-gcc
is for gcc 14.
 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.
 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.
 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.
 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.
 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
 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
 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.)
 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.
 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.
 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.
 1.79  29-May-2014  skrll Don't grab libstdc++-v3/config.h it's not used.
 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
 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
 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.
 1.66  10-Jan-2012  skrll Fix bootstrap-libgcc for gcc 4.5
 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.
 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.
 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.
 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.
 1.23  08-Feb-2008  skrll Collect the libobjc config.h
 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
 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.
 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.12.2.1  16-Jul-2004  he Pull up revision 1.13 (requested by skrll in ticket #668):
Do the same thing as stock gcc, by using the symbol
versioning script to remove certain symbols from the
dynamic symbol table, and pull in libgcc_pic in the
-shared-libgcc case for the millicode platforms.
Fixes PR#22452.
 1.22.10.1  23-Mar-2008  matt sync with HEAD
 1.22.4.1  07-Nov-2008  snj Pull up following revision(s) (requested by mrg in ticket #1228):
tools/gcc/mknative-gcc: revision 1.23
Collect the libobjc config.h
 1.45.4.1  23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.65.2.3  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.65.2.2  30-Oct-2012  yamt sync with head
 1.65.2.1  17-Apr-2012  yamt sync with head
 1.67.2.3  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.67.2.2  23-Jun-2013  tls resync from head
 1.67.2.1  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.78.2.1  10-Aug-2014  tls Rebase.
 1.87.2.1  04-Nov-2016  pgoyette Sync with HEAD
 1.89.6.3  05-Sep-2018  martin Pull up following revision(s) (requested by mrg in ticket #1008):

tools/gcc/mknative-gcc: revision 1.94

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.89.6.2  05-Sep-2018  martin Pull up following revision(s) (requested by mrg in ticket #1008):

tools/gcc/gcc-version.mk: revision 1.11
tools/gcc/mknative-gcc: revision 1.93
external/gpl3/gcc/dist/config/tls.m4: revision 1.2
external/gpl3/gcc/dist/libgcc/configure: revision 1.5

Correct extra parens, regen configure (selectively)
Fixes root cause of PR toolchain/53567

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.)

remove GCC 5 marker. this is now nb3 20180905.
 1.89.6.1  09-Oct-2017  snj Apply patch (requested by christos in ticket #312):
disable dual libstdc++ abi
 1.92.4.2  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.92.4.1  10-Jun-2019  christos Sync with HEAD
 1.92.2.2  26-Jan-2019  pgoyette Sync with HEAD
 1.92.2.1  06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.101.2.1  14-Aug-2020  martin Pull up following revision(s) (requested by mrg in ticket #1049):

tools/gcc/mknative-gcc: revision 1.104
tools/gcc/mknative-gcc: revision 1.105
tools/gcc/gcc-version.mk: revision 1.19
share/mk/bsd.own.mk: revision 1.1203
tools/gcc/Makefile: revision 1.98
tools/gcc/mknative-gcc.old: revision 1.7
tools/gcc/mknative-gcc.old: revision 1.8

First pass at mknative for GCC 7.5.0

RSS XML Feed