From 01a8e65473b540bbbbb1383d59b5ee0b268796b5 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sat, 31 Dec 2011 02:13:50 -0500 Subject: Add build cleanup and GCC specs editing notes. --- (limited to 'bootstrap-system-build-procedure.txt') 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 -- cgit v0.9.1