From 7a4de3f6cf775fcafb05764e17cc1f78471d078c Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Mon, 02 Jan 2012 01:05:45 -0500 Subject: 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. --- (limited to 'bootstrap-system-build-procedure.txt') 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 + -- cgit v0.9.1