Le 08/10/2014 23:23, Christer Solskogen a écrit :
On 06.10.2014 13:06, Pierre Labastie wrote:
Since we do not want libgcc2 to containing any code which requires libc
support, we pass --with-newlib --without-headers (equivalent to
--with-headers=no). And this is needed!
Show me where that will be a problem.
You'd rather show us that our current LFS build would work without the
switch, and specifically, that no code from the host glibc gets into
libgcc. We have a very special set-up (not documented, but it has been
working for our purpose since 2006 or so), where we first build a fake
cross-compiler, that we use then as a native one to build binutils- and
gcc-pass2. When you truly build for a foreign architecture, you have to
build gcc three times (see
http://www.cross-lfs.org/view/CLFS-3.0.0-RC1-SYSTEMD/ for example). If
you want to stay with native compilers all along, you have to build it
three times too, because there is no way to prevent host's glibc to get
into the first pass of gcc. Our setting saves one compilation, without
sacrificing host insulation.
I've created (stage1) cross-compilers like this multiple times, on
multiple linux distros without any problems:
${SRCDIR}/bin/gcc/configure --prefix=${TOOLS} --target=${CROSS_TARGET}
--disable-shared --disable-threads --without-headers
--disable-decimal-float --disable-multilib --enable-languages=c
--disable-libquadmath --disable-libssp --disable-libgomp
--disable-libatomic --disable-libmudflap --libexecdir=${TOOLS}/lib
--disable-nls
Don't you use sysroot? Try that and you'll see what happens with your
instructions. Using sysroot is very important to achieve host
insulation. If you do not use sysroot, libgcc pass 1 uses host's glibc
headers, which we do not want...
Pierre
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page
Do not top post on this list.
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
http://en.wikipedia.org/wiki/Posting_style