Opened 15 years ago

Closed 15 years ago

#2543 closed task (fixed)

explanation for variables passed to glibc's configure in ch5 inadequate

Reported by: ken@… Owned by: lfs-book@…
Priority: normal Milestone: 6.6
Component: Book Version: SVN
Severity: normal Keywords:
Cc:

Description (last modified by bdubbs@…)

With the "new build method", we pass

libc_cv_forced_unwind=yes libc_cv_c_cleanup=yes

and then for the first of these we say

libc_cv_forced_unwind=yes
The build requires support for forced unwind, but because 
it is being cross compiled, it cannot auto detect it. 
Setting this variable on the command line explicitly tells 
the configure script that support is available.

We certainly need to pass this variable, but the explanation is simplistic. Sure, configure and config.log will report that TLS support is required, but if you look in config.log what is actually happening is that the cross-ld program cannot be used because it can't (yet) find crt1.o (which will installed by glibc).

So, I think our explanation (configure cannot auto-detect this) is misleading and sidesteps the real issue (ld doesn't work until crt1.o is in place).

Change History (8)

comment:1 by bdubbs@…, 15 years ago

Description: modified (diff)

How about changing the first sentence to:

Because Glibc is being cross compiled and crt1.o is not yet in place, support for forced unwind cannot be autodetected.

comment:2 by ken@…, 15 years ago

I'm having difficulty finding the right terms here, but what I'd like to concentrate on is the new cross-ld. At this point it doesn't work. At all. For forced unwind, that causes the test to error. (I didn't look at the detail for the other _cv_ variable).

We go out of our way to explain things, in this case I don't think that autodetecting forced unwind is the real thing to explain. Perhaps something like "because the new cross-ld doesn't work until glibc has been installed, some of the configure tests error unless we side-step them by telling configure not to attempt them."

comment:3 by Matthew Burgess, 15 years ago

How about:

The linker installed during 'Binutils-2.20 - Pass 1' was cross-compiled and as such cannot be used until Glibc has been installed.  This means that the configure test for forced-unwind support will fail, as it relies on a working linker.  The libc_cv_forced_unwind=yes variable is passed in order to inform ./configure that forced-unwind support is available without it having to run the test.

comment:4 by Matthew Burgess, 15 years ago

And now with correct WikiFormatting!

The linker installed during 'Binutils-2.20 - Pass 1' was cross-compiled and as such cannot be used until Glibc has been installed. This means that the configure test for forced-unwind support will fail, as it relies on a working linker. The libc_cv_forced_unwind=yes variable is passed in order to inform ./configure that forced-unwind support is available without it having to run the test.

comment:5 by ken@…, 15 years ago

I like that. And similarly for the C cleanup handling ?

comment:6 by Matthew Burgess, 15 years ago

I don't think the C cleanup handling one has to be as verbose. Maybe something like:

As with forced unwind support, the configure test for C cleanup handling relies on a working linker. As this isn't present yet, we pass libc_cv_c_cleanup=yes through to the configure script so that the test is skipped and C cleanup handling support is configured.

comment:7 by ken@…, 15 years ago

Or even replace your suggested "As with forced unwind ... As this isn't present yet" with "Similarly", i.e. "Similarly, we pass libc_cv_c_cleanup=yes thtough to ..."

I'm ok with either, thanks for the suggestions.

comment:8 by Matthew Burgess, 15 years ago

Resolution: fixed
Status: newclosed

Thanks Ken, I went with your shortened version. Fixed in r9163.

Note: See TracTickets for help on using tickets.