Andrew Benton wrote:
Hello World.
The gcc-specs patch seems to patch a lot of files that are architecture
specific. It seems to me that most of these archs are covered by
cross-LFS and LFS focuses mainly on i386. For i386 the gcc specs patch
can be replaced with these commands
# 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.
For me, patches are clearer. Or you intentionally obfuscated the seds. It is
not clear why we should change some magic string "r /l" to "r /tools/l". In
the patch, it is clear that the path to the interpreter ic being changed.
Also if we do use seds, we should state in the pre-requisites that the
reader knows all options of sed. A typical newbie doesn't know how to
replace strings with "sed", but may still read the patch.
--
Alexander E. Patrakov
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page