Tue Sep 25 11:12:16 2012 UTC ()
No need to do "obj includes" twice.


(skrll)
diff -r1.11 -r1.12 src/tools/gcc/README.mknative

cvs diff -r1.11 -r1.12 src/tools/gcc/README.mknative (switch to unified diff)

--- src/tools/gcc/README.mknative 2012/09/25 06:55:10 1.11
+++ src/tools/gcc/README.mknative 2012/09/25 11:12:16 1.12
@@ -1,81 +1,81 @@ @@ -1,81 +1,81 @@
1$NetBSD: README.mknative,v 1.11 2012/09/25 06:55:10 skrll Exp $ 1$NetBSD: README.mknative,v 1.12 2012/09/25 11:12:16 skrll Exp $
2 2
3This file describes how to bootstrap the native toolchain on a new NetBSD 3This file describes how to bootstrap the native toolchain on a new NetBSD
4platform (and how to update the new toolchain files, if needed). These 4platform (and how to update the new toolchain files, if needed). These
5files may be generated on a cross-compile host without problems. 5files may be generated on a cross-compile host without problems.
6 6
7NOTE: DO NOT RUN "mknative" BY HAND! It requires the Makefile in this 7NOTE: DO NOT RUN "mknative" BY HAND! It requires the Makefile in this
8directory to set up certain environments first. 8directory to set up certain environments first.
9 9
10Since libc's features change over time, the config.h files can change as a 10Since libc's features change over time, the config.h files can change as a
11result; thus the instructions below are the same no matter whether 11result; thus the instructions below are the same no matter whether
12bootstrapping on a cross or native host. This is important: even on a 12bootstrapping on a cross or native host. This is important: even on a
13"native" host, you should bootstrap the toolchain by building from an 13"native" host, you should bootstrap the toolchain by building from an
14up-to-date source tree to a $DESTDIR using the exact same instructions. 14up-to-date source tree to a $DESTDIR using the exact same instructions.
15 15
16In these notes, MACHINE is the $MACHINE of the target. These files can be 16In these notes, MACHINE is the $MACHINE of the target. These files can be
17cross-generated. Though a $MACHINE_ARCH all uses the same config files, you 17cross-generated. Though a $MACHINE_ARCH all uses the same config files, you
18must pick a specific $MACHINE so that building the requisite bits below will 18must pick a specific $MACHINE so that building the requisite bits below will
19work. 19work.
20 20
211. Set MKMAINTAINERTOOLS=yes in mk.conf. (Needed so that src/tools/gettext 211. Set MKMAINTAINERTOOLS=yes in mk.conf. (Needed so that src/tools/gettext
22 gets built, eliciting proper HAVE_*GETTEXT* defns in config.h files.) 22 gets built, eliciting proper HAVE_*GETTEXT* defns in config.h files.)
23 23
242. Build and install a cross toolchain (via "build.sh -m MACHINE tools"). 242. Build and install a cross toolchain (via "build.sh -m MACHINE tools").
25 25
263. In src/tools/gcc, do "nbmake-MACHINE bootstrap-libgcc". 263. In src/tools/gcc, do "nbmake-MACHINE bootstrap-libgcc".
27 27
28 This will create just enough glue in src/external/gpl3/gcc/lib/libgcc/arch 28 This will create just enough glue in src/external/gpl3/gcc/lib/libgcc/arch
29 to make it possible to build, based on the toolchain built in 29 to make it possible to build, based on the toolchain built in
30 ${.OBJDIR}/build. 30 ${.OBJDIR}/build.
31 Because the files generated in this step contain things like 31 Because the files generated in this step contain things like
32 -DCROSS_COMPILE, they are not suitable for committing. Step 8 below 32 -DCROSS_COMPILE, they are not suitable for committing. Step 8 below
33 will regenerate the "proper" libgcc config files. 33 will regenerate the "proper" libgcc config files.
34 34
354. At top level, do 354. At top level, do
36 "nbmake-MACHINE obj do-distrib-dirs includes MKGCC=no MKBINUTILS=no". 36 "nbmake-MACHINE obj do-distrib-dirs includes MKGCC=no MKBINUTILS=no".
37 37
385. In src/external/gpl3/gcc/lib/libgcc, do 385. In src/external/gpl3/gcc/lib/libgcc, do
39 "nbmake-MACHINE obj includes dependall install MKPIC=no". 39 "nbmake-MACHINE obj includes dependall install MKPIC=no".
40 40
416. If the platform sets USE_COMPILERCRTSTUFF=yes, then in 416. If the platform sets USE_COMPILERCRTSTUFF=yes, then in
42 src/external/gpl3/gcc/lib/crtstuff/ do 42 src/external/gpl3/gcc/lib/crtstuff/ do
43 "nbmake-MACHINE obj dependall install" 43 "nbmake-MACHINE obj dependall install"
44 44
457. In src/lib/csu, do 457. In src/lib/csu, do
46 "nbmake-MACHINE obj includes dependall install". 46 "nbmake-MACHINE obj includes dependall install".
47 47
488. In each of src/external/lgpl3/gmp/lib/libgmp, 488. In each of src/external/lgpl3/gmp/lib/libgmp,
49 src/external/lgpl3/mpfr/lib/libmpfr, src/external/lgpl2/mpc/lib/libmpc 49 src/external/lgpl3/mpfr/lib/libmpfr, src/external/lgpl2/mpc/lib/libmpc
50 do "nbmake-MACHINE obj includes LIBISPRIVATE=no", and 50 do "nbmake-MACHINE obj includes LIBISPRIVATE=no", and
51 "nbmake-MACHINE obj includes dependall install". 51 "nbmake-MACHINE dependall install".
52 52
53 It is important to have LIBISPRIVATE=no while doing includes as this 53 It is important to have LIBISPRIVATE=no while doing includes as this
54 installs a header file that is not part of standard build. 54 installs a header file that is not part of standard build.
55 55
569. In src/lib, do 569. In src/lib, do
57 "nbmake-MACHINE obj includes dependall install MKGCC=no". 57 "nbmake-MACHINE obj includes dependall install MKGCC=no".
58 58
59 Optionally, all of the following may be set in the environment to reduce 59 Optionally, all of the following may be set in the environment to reduce
60 the amount of code needed to build at this step. Basically, it must be 60 the amount of code needed to build at this step. Basically, it must be
61 possible for static binaries to build and base system libs to exist so 61 possible for static binaries to build and base system libs to exist so
62 that "configure" can do its job for the target--these MK* options omit 62 that "configure" can do its job for the target--these MK* options omit
63 the rest for this stage of the build.  63 the rest for this stage of the build.
64 64
65 MKCRYPTO=no 65 MKCRYPTO=no
66 MKLINT=no 66 MKLINT=no
67 MKPROFILE=no 67 MKPROFILE=no
68 MKSHARE=no 68 MKSHARE=no
69 69
7010. In src/tools/gcc, do "nbmake-MACHINE native-gcc". 7010. In src/tools/gcc, do "nbmake-MACHINE native-gcc".
71 71
72 This will do a full configury in ${.OBJDIR}/.native that is a "Canadian" 72 This will do a full configury in ${.OBJDIR}/.native that is a "Canadian"
73 cross toolchain (--build reflects the host platform, but --host and 73 cross toolchain (--build reflects the host platform, but --host and
74 --target are the target). The result is a tree that would build a 74 --target are the target). The result is a tree that would build a
75 native-to-NetBSD compiler on a cross host, and mknative pulls glue data 75 native-to-NetBSD compiler on a cross host, and mknative pulls glue data
76 from this. 76 from this.
77 77
7811. Try out a full build using "nbmake-MACHINE"; the result should include 7811. Try out a full build using "nbmake-MACHINE"; the result should include
79 a native compiler. 79 a native compiler.
80 80
8112. If all is well, commit the glue files added to src/gnu/{lib,usr.bin}/*. 8112. If all is well, commit the glue files added to src/gnu/{lib,usr.bin}/*.