Module Name:    src
Committed By:   skrll
Date:           Tue Sep 25 06:55:10 UTC 2012

Modified Files:
        src/tools/gcc: README.mknative mknative-gcc

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


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/tools/gcc/README.mknative
cvs rdiff -u -r1.67 -r1.68 src/tools/gcc/mknative-gcc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tools/gcc/README.mknative
diff -u src/tools/gcc/README.mknative:1.10 src/tools/gcc/README.mknative:1.11
--- src/tools/gcc/README.mknative:1.10	Sun Sep 16 15:09:55 2012
+++ src/tools/gcc/README.mknative	Tue Sep 25 06:55:10 2012
@@ -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 @@ work.
    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 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".
+7. In src/lib/csu, do
+   "nbmake-MACHINE obj includes dependall install".
 
-   It is important to have LIBISPRIVATE=no while doing src/external/lgpl[23]/*
+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 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 @@ work.
    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}/*.

Index: src/tools/gcc/mknative-gcc
diff -u src/tools/gcc/mknative-gcc:1.67 src/tools/gcc/mknative-gcc:1.68
--- src/tools/gcc/mknative-gcc:1.67	Sat Aug 11 16:05:01 2012
+++ src/tools/gcc/mknative-gcc	Tue Sep 25 06:55:10 2012
@@ -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 @@ get_libstdcxx_v3 () {
 
 ##### 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 @@ libgcc45)
 	get_libgcc gcc
 	get_crtstuff crtstuff
 	get_libgcov gcc
+	get_gcc_bootstrap gcc
 	exit 0
 	;;
 

Reply via email to