new gcc patches

Robert Connolly robert at linuxfromscratch.org
Sun May 23 14:32:03 PDT 2004


Hello. I modified the nofixinclude and specs patches so gcc only needs to be 
unpacked once, and can be read-only, usefull maybe if you want to build from 
a cdrom source tree. They work for me, feedback would be nice.

Use them in place of their lfs counterparts. The nofixinclude patch will check 
if gcc/DONOTFIXINCLUDES exists, if it does it will be skipped. The specs 
patch uses gcc/lfsdefs.h to check if _USE_TOOLSDIR is defined, if it is 
then /tools will be used in the specs for linking.

In gcc-build/
Chap5
Gcc pass 1
Apply patches, configure and make normally.
Gcc pass 2
configure
touch gcc/DONOTFIXINCLUDES
echo "#define _USE_TOOLSDIR 1" >> gcc/lfsdefs.h
make

Chap6
Gcc
configure
touch gcc/DONOTFIXINCLUDES
make

I could have made a configure option but the above way is more simple and 
easier to maintain. I feel the best method for this patch would be to use an 
sed-like C function in gcc/gcc.c on LINK_SPECS to replace '/usr/lib' and '/
lib' with '/tools', but I don't yet know how to do that. That method would be 
portable to all platforms and would be the smallest and easiest to maintain.

If these attached patches are tested enough I think they will be preferred to 
the ones we have now.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc-3.3.3-ro-nofixincludes-1.patch
Type: text/x-diff
Size: 1825 bytes
Desc: not available
URL: <http://lists.linuxfromscratch.org/pipermail/hlfs-dev/attachments/20040523/484ac03d/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc-3.3.3-ro-specs-1.patch
Type: text/x-diff
Size: 17253 bytes
Desc: not available
URL: <http://lists.linuxfromscratch.org/pipermail/hlfs-dev/attachments/20040523/484ac03d/attachment-0001.patch>


More information about the hlfs-dev mailing list