diff options
author | P. J. McDermott <pjm@nac.net> | 2012-01-02 01:05:45 (EST) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2012-01-02 01:05:45 (EST) |
commit | 7a4de3f6cf775fcafb05764e17cc1f78471d078c (patch) | |
tree | c2bf97b184a37f75b2f342d2275cbdd28801ba5d | |
parent | 2921528e54507addc3d54e60d13a9c01687ba78d (diff) |
Add more notes to old bootstrap builder procedure.
NOTE: This procedure DOES NOT WORK. I tried to avoid some ugly patches
and build system modifications that LFS uses by doing a sysroot build.
I messed up by not configuring GNU Binutils for a sysroot setup. But
this procedure is still kind of ugly anyway, so we'll be following a new
one based on Cross Linux From Scratch - Sysroot.
-rw-r--r-- | bootstrap-system-build-procedure.txt | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/bootstrap-system-build-procedure.txt b/bootstrap-system-build-procedure.txt index 0fdfef8..8e53991 100644 --- a/bootstrap-system-build-procedure.txt +++ b/bootstrap-system-build-procedure.txt @@ -161,3 +161,28 @@ Cross-compile a native GNU Binutils. > --prefix=/tools/usr --disable-nls --with-lib-path=/tools/usr/lib $ make -j 4 $ make install + $ make -C ld clean + $ make -C ld LIB_PATH=/usr/lib:/lib + $ cp -v ld/ld-new /tools/usr/bin + $ cd .. + $ rm -Rf binutils-build + +Prepare GCC for a native build, disabling the fixincludes script and adding the +'-fomit-frame-pointer' flag that is missing from non-bootstrapped GCC builds. +Note that the syntax in the cp command lines is a non-standard feature of GNU +Bash; this may not work on other shells. + $ cd gcc-4.6.2 + $ cp -v gcc/Makefile.in{,.orig} + $ sed 's@\./fixinc\.sh@-c true@' gcc/Makefile.in.orig > gcc/Makefile.in + $ cp -v gcc/Makefile.in{,.tmp} + $ sed 's/^T_CFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in.tmp > \ + > gcc/Makefile.in + $ for file in $(find gcc/config -name linux64.h -o -name linux.h -o -name sysv4.h); do cp -uv ${file}{,.orig}; sed -e 's@/lib\(64\)\?\(32\)\?/ld@/tools/usr&@g' -e 's@/usr@/tools&@g' ${file}.orig > ${file}; touch ${file}.orig; done + $ case $(uname -m) in x86_64) for file in $(find gcc/config -name t-linux64); do cp -v ${file}{,.orig}; sed '/MULTILIB_OSDIRNAMES/d' ${file}.orig > ${file}; done ;; esac + $ cd .. + +Cross-comile a native GCC. + $ mkdir gcc-build + $ cd gcc-build + $ CC="${BBLL_TARGET}-gcc -B/tools/usr/lib" AR=${BBLL_TARGET}-ar RANLIB=${BBLL_TARGET}-ranlib ../gcc-4.6.2/configure --prefix=/tools/usr --with-local-prefix=/tools/usr --with-sysroot="${BBLL}" --with-build-sysroot="${BBLL}" --enable-clocale=gnu --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-languages=c,c++ --disable-libstdcxx-pch --disable-multilib --disable-bootstrap --disable-libgomp --without-ppl --without-cloog --with-mpfr-include=$(pwd)/../gcc-4.6.2/mpfr/src --with-mpfr-lib=$(pwd)/mpfr/src/.libs + |