summaryrefslogtreecommitdiffstats
path: root/bootstrap-system-build-procedure.txt
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2011-12-31 02:13:50 (EST)
committer P. J. McDermott <pjm@nac.net>2011-12-31 02:13:50 (EST)
commit01a8e65473b540bbbbb1383d59b5ee0b268796b5 (patch)
treeae54228f56098dbda8a9bec88a84b060ee7af46d /bootstrap-system-build-procedure.txt
parenta7563c9ecaba8ca0b813b8f185b5c20881565f5f (diff)
Add build cleanup and GCC specs editing notes.
Diffstat (limited to 'bootstrap-system-build-procedure.txt')
-rw-r--r--bootstrap-system-build-procedure.txt23
1 files changed, 20 insertions, 3 deletions
diff --git a/bootstrap-system-build-procedure.txt b/bootstrap-system-build-procedure.txt
index b21cdd2..9844385 100644
--- a/bootstrap-system-build-procedure.txt
+++ b/bootstrap-system-build-procedure.txt
@@ -83,9 +83,10 @@ Configure and build a cross-compiling GNU Binutils.
> ;;
> esac
$ make install
+ $ cd ..
+ $ rm -Rf binutils-build
Configure and build a cross-compiling GCC.
- $ cd ..
$ mv gmp-5.0.2/ gcc-4.6.2/gmp
$ mv mpfr-3.1.0/ gcc-4.6.2/mpfr
$ mv mpc-0.9/ gcc-4.6.2/mpc
@@ -101,15 +102,17 @@ Configure and build a cross-compiling GCC.
$ make install
$ ln -sv libgcc.a $(${BBLL_TARGET}-gcc -print-libgcc-file-name | \
> sed 's/libgcc/&_eh/')
+ $ cd ..
+ $ rm -Rf gcc-build
Install Linux's headers for use by EGLIBC.
- $ cd ../linux-3.1.6
+ $ cd linux-3.1.6
$ make mrproper
$ make headers_check
$ make INSTALL_HDR_PATH=/tools/usr headers_install
+ $ cd ..
Configure and build a cross-compiling EGLIBC.
- $ cd ..
$ mkdir eglibc-build
$ cd eglibc-build
$ case $(uname -m) in
@@ -123,3 +126,17 @@ Configure and build a cross-compiling EGLIBC.
> libc_cv_forced_unwind=yes libc_cv_c_cleanup=yes libc_cv_ssp=no
$ make -j 4
$ make install
+ $ cd ..
+ $ rm -Rf eglibc-build
+
+Edit GCC's specs file to point to the newly-compiled dynamic linker instead of
+the host system's dynamic linker, then build a test program to make sure
+everything works.
+ $ SPECS=$(dirname $(${BBLL_TARGET}-gcc -print-libgcc-file-name))/specs
+ $ ${BBLL_TARGET}-gcc -dumpspecs | sed -e 's@/lib\(64\)\?/ld@/tools/usr&@g' \
+ > -e '/^\*cpp:$/{n;s,$, -isystem /tools/usr/include,}' > ${SPECS}
+ $ unset SPECS
+ $ echo 'int main(){return 0;}' > test.c
+ $ ${BBLL_TARGET}-gcc -B/tools/usr/lib test.c
+ $ readelf -l a.out | grep ': /tools/usr'
+ $ rm -v test.c a.out