Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tools/gcc More tweaks. I didn't manage to complete a mknativ...



details:   https://anonhg.NetBSD.org/src/rev/063ebe6f79aa
branches:  trunk
changeset: 781718:063ebe6f79aa
user:      skrll <skrll%NetBSD.org@localhost>
date:      Tue Sep 25 06:55:10 2012 +0000

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

diffstat:

 tools/gcc/README.mknative |  35 ++++++++++++++++++++++-------------
 tools/gcc/mknative-gcc    |  13 +++++++++++--
 2 files changed, 33 insertions(+), 15 deletions(-)

diffs (108 lines):

diff -r 4eb8066c5f6d -r 063ebe6f79aa tools/gcc/README.mknative
--- a/tools/gcc/README.mknative Tue Sep 25 06:31:44 2012 +0000
+++ b/tools/gcc/README.mknative Tue Sep 25 06:55:10 2012 +0000
@@ -1,4 +1,4 @@
-$NetBSD: README.mknative,v 1.10 2012/09/16 15:09:55 skrll Exp $
+$NetBSD: README.mknative,v 1.11 2012/09/25 06:55:10 skrll Exp $
 
 This file describes how to bootstrap the native toolchain on a new NetBSD
 platform (and how to update the new toolchain files, if needed).  These
@@ -33,32 +33,41 @@
    will regenerate the "proper" libgcc config files.
 
 4. At top level, do
-   "nbmake-MACHINE do-distrib-dirs obj includes MKGCC=no MKBINUTILS=no".
+   "nbmake-MACHINE obj do-distrib-dirs includes MKGCC=no MKBINUTILS=no".
 
-5. In src/external/gpl3/gcc/lib/libgcc, do "nbmake-MACHINE obj includes".
+5. In src/external/gpl3/gcc/lib/libgcc, do
+   "nbmake-MACHINE obj includes dependall install MKPIC=no".
 
 6. If the platform sets USE_COMPILERCRTSTUFF=yes, then in
-   src/external/gpl3/gcc/lib/crtstuff/ do "nbmake-MACHINE dependall install"
+   src/external/gpl3/gcc/lib/crtstuff/ do
+   "nbmake-MACHINE obj dependall install"
+
+7. In src/lib/csu, do
+   "nbmake-MACHINE obj includes dependall install".
 
-7. In each of src/lib/csu, src/external/gpl3/gcc/lib/libgcc,
-   src/external/lgpl3/gmp/lib/libgmp,  src/external/lgpl3/mpfr/lib/libmpfr,
-   src/external/lgpl2/mpc/lib/libmpc and src/lib,
-   do "nbmake-MACHINE includes dependall install".
+8. In each of src/external/lgpl3/gmp/lib/libgmp,
+   src/external/lgpl3/mpfr/lib/libmpfr, src/external/lgpl2/mpc/lib/libmpc
+   do "nbmake-MACHINE obj includes LIBISPRIVATE=no", and
+   "nbmake-MACHINE obj includes dependall install".
 
-   It is important to have LIBISPRIVATE=no while doing src/external/lgpl[23]/*
+   It is important to have LIBISPRIVATE=no while doing includes as this
+   installs a header file that is not part of standard build.
+
+9. In src/lib, do
+   "nbmake-MACHINE obj includes dependall install MKGCC=no".
 
    Optionally, all of the following may be set in the environment to reduce
    the amount of code needed to build at this step.  Basically, it must be
    possible for static binaries to build and base system libs to exist so
    that "configure" can do its job for the target--these MK* options omit
-   the rest for this stage of the build.
+   the rest for this stage of the build. 
 
    MKCRYPTO=no
    MKLINT=no
    MKPROFILE=no
    MKSHARE=no
 
-8. In src/tools/gcc, do "nbmake-MACHINE native-gcc".
+10. In src/tools/gcc, do "nbmake-MACHINE native-gcc".
 
    This will do a full configury in ${.OBJDIR}/.native that is a "Canadian"
    cross toolchain (--build reflects the host platform, but --host and
@@ -66,7 +75,7 @@
    native-to-NetBSD compiler on a cross host, and mknative pulls glue data
    from this.
 
-9. Try out a full build using "nbmake-MACHINE"; the result should include
+11. Try out a full build using "nbmake-MACHINE"; the result should include
    a native compiler.
 
-10. If all is well, commit the glue files added to src/gnu/{lib,usr.bin}/*.
+12. If all is well, commit the glue files added to src/gnu/{lib,usr.bin}/*.
diff -r 4eb8066c5f6d -r 063ebe6f79aa tools/gcc/mknative-gcc
--- a/tools/gcc/mknative-gcc    Tue Sep 25 06:31:44 2012 +0000
+++ b/tools/gcc/mknative-gcc    Tue Sep 25 06:55:10 2012 +0000
@@ -1,8 +1,8 @@
 #!/bin/sh
-#      $NetBSD: mknative-gcc,v 1.67 2012/08/11 16:05:01 skrll Exp $
+#      $NetBSD: mknative-gcc,v 1.68 2012/09/25 06:55:10 skrll Exp $
 #
 # Shell script for generating all the constants needed for a native
-# platform build of src/gnu/dist/gcc.
+# platform build of gcc.
 #
 
 # initialise
@@ -548,6 +548,14 @@
 
 ##### gnu/usr.bin/gcc3 #####
 
+get_gcc_bootstrap () {
+       _subdir="$1"
+       mkdir -p $_OUTDIR/usr.bin/$_subdir/arch/$MACHINE_ARCH
+       for f in auto-host tm config gthr-default; do
+               write_c $_OUTDIRBASE/usr.bin/$_subdir/arch/$MACHINE_ARCH/$f.h <$_TMPDIR/gcc/$f.h
+       done
+}
+
 get_gcc () {
        _subdir="$1"
        mkdir -p $_OUTDIR/usr.bin/$_subdir/arch/$MACHINE_ARCH
@@ -697,6 +705,7 @@
        get_libgcc gcc
        get_crtstuff crtstuff
        get_libgcov gcc
+       get_gcc_bootstrap gcc
        exit 0
        ;;
 



Home | Main Index | Thread Index | Old Index