On 3/26/06, Andrew Benton <[EMAIL PROTECTED]> wrote:
> Hello World.
>
> # link to /tools/lib
> cp gcc/config/sh/linux.h{,.orig}
> sed 's,r /l,r /tools/l,g' gcc/config/sh/linux.h.orig > gcc/config/sh/linux.h
> cp gcc/config/i386/gnu.h{,.orig}
> sed 's,r /l,r /tools/l,g' gcc/config/i386/gnu.h.orig > gcc/config/i386/gnu.h
> cp gcc/config/i386/linux.h{,.orig}
> sed 's,R "/l,R "/tools/l,g' gcc/config/i386/linux.h.orig >
> gcc/config/i386/linux.h
> # Remove /usr/include from the end of the include search path.
> cat >> gcc/config/linux.h << "EOF"
> #undef STANDARD_INCLUDE_DIR
> #define STANDARD_INCLUDE_DIR 0
> EOF
>
> Works for me anyway.
> I prefer sed and cat to patches as it seems clearer what is being changed.

I prefer the sed as well, but I believe you've made more of it than
needs be.  Certainly we don't need to adjust i386/gnu.h unless this
project is being converted to "Hurd from Scratch". :-) DIY has been
using this for as long as I've been around:

sed -i.bak \
        "s@/lib/[EMAIL PROTECTED]&@" gcc/config/i386/linux.h

Which is also awesome for the case where you don't actually use
/tools.  I think the specs patch is the one part of the LFS book that
forces you to use /tools.

--
Dan
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to