diff --git a/chapter05/gcc-exp.xml b/chapter05/gcc-exp.xml index b38c62086..1aeecadff 100644 --- a/chapter05/gcc-exp.xml +++ b/chapter05/gcc-exp.xml @@ -1,11 +1,15 @@ Command explanations -patch -Np1 -i ../gcc-&gcc-patch-version;.patch : +patch -Np1 -i ../gcc-&gcc-patch-version;.patch: This new patch deals with incorrect handling of weak symbols, the over-optimization of calls to those weak symbols, an atexit issue and the __dso_handle symbol required for atexit's proper function. +make BOOT_LDFLAGS=-static: +This is the equivalent to make LDFLAGS=-static as we use with other +packages to compile them statically. + --prefix=/usr: This is NOT a typo. GCC hard codes some paths while compiling and so we need to pass /usr as the prefix during ./configure. We pass the real install prefix during the diff --git a/chapter05/gcc-inst.xml b/chapter05/gcc-inst.xml index a1b88c8f9..649e1b32b 100644 --- a/chapter05/gcc-inst.xml +++ b/chapter05/gcc-inst.xml @@ -9,7 +9,7 @@ ../gcc-&gcc-version;/configure --prefix=/usr \    --enable-languages=c,c++ --disable-nls \    --disable-shared && -make -e LDFLAGS=-static bootstrap && +make BOOT_LDFLAGS=-static bootstrap && make prefix=$LFS/usr install && cd $LFS/lib && ln -sf ../usr/bin/cpp &&