On Tue, 30 Sep 2014 13:50:52 +0200 Pierre Labastie <[email protected]> wrote:
> Le 29/09/2014 23:53, Hazel Russman a écrit : > > On Sat, 27 Sep 2014 15:24:44 -0500 > > Bruce Dubbs <[email protected]> wrote: > > > >> Hazel Russman wrote: > >>> In the Chapter 5 build of glibc, three configuration tests are > >>> bypassed because "The linker installed during Section 5.4... was > >>> cross-compiled and as such cannot be used until Glibc has been > >>> installed. This means that the configure test... will fail, as it > >>> relies on a working linker." > >>> > >>> Out of curiosity, I ran ldd on both the static and the dynamic > >>> linkers from the first pass binutils build. They are linked to the > >>> host glibc (and a few other host libraries as well). Why would they > >>> not work? > >>> > >>> I usually find the explanations in the book very enlightening but > >>> this one puzzles me. > >> IIRC it really depends on the host. Some libraries and programs are not > >> yet built, but the host's glibc would be used in this case. > >> > >> -- Bruce > > I was still puzzled so I did a bit of browsing on cross-compiling glibc. > > The sites I looked at gave a different and much simpler explanation for > > bypassing those tests. They involve compiling and running a test program; > > if it was cross-compiled, it wouldn't run on the build system and the > > configuration would error out. > > > > It occurred to me that this wouldn't apply to LFS, where the target and > > build systems are deliberately made compatible. So, just as an experiment, > > I made a fresh partition, mounted it on $LFS and repeated the first stages > > of chapter 5. This time I configured glibc *without* those three options, > > just to see what would happen. > > > > It configured OK and when I checked config.log, all three of those > > variables had been set to "yes" just as if I'd set them by hand. > Thanks for investigating, > Are you sure the test programs were run? ISTR that when cross compiling, > running the test programs is not done, even if the systems are > compatible (configure does not know that the systems are compatible). > > I made and installed it and ran the sanity test and it worked. > > > > As a further check, I did the second pass builds of binutils and gcc and > > repeated the sanity test and that was OK too. > > > > So it looks as if the libc_cv options aren't necessary after all. Of course > > the only way to prove it conclusively would be to continue through the > > whole of chapter 5 and chapter 6, build a kernel and see if it would boot. > > That's a heck of a lot of work just to prove a point! > > > More than that, it may be different for different versions of host > glibc, so you have to test on several distros... > OTOH, I guess diffing the results of "readelf -a > /tools/lib/libc-2.20.so" with and without the switches would help > proving your point without going to the end of LFS. > Even diffing config.log could be enough (you'd see what changes). > But still, you'd have to prove that you get the same results whatever > the (recent enough) distro... I don't have the logs anymore because I always remove my build directories immediately after installing. But I've just diffed the two compiled libraries and they're identical! -- Hazel Russman <[email protected]> -- 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
