> To: [email protected] > From: Christer Solskogen <[email protected]> > Date: Thu, 09 Oct 2014 12:35:55 +0200 > Subject: Re: [lfs-support] Where to find the newlib source when compiling > GCC pass 1? > > On 09.10.2014 11:51, Pierre Labastie wrote: > > 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. > > > > But you are already installing a cross compiler. As long as --target= is > different from --host= it is a cross compiler. > > >> 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... > > > > No reason for sysroot in a stage1 compiler. >
Seems like there's an apples'n'pears situation here. Christer: are you saying that any of the ch.5/6/... LFS instructions should be changed; and if so, changed to what, explicitly and literally? I know and understand what you're saying in your posts: but what, explicitly and literally, are you saying, if anything, should be changed in LFS? Could you e.g. send a diff/patch of the src xml? Such code often helps greatly in clarifying such things. Thanks, Akhiezer -- -- 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
