This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: what is the purpose of "--enable-kernel" in configuring glibc?


On Sat, 17 Dec 2005, Dan Kegel wrote:

> On 12/17/05, Robert P. J. Day <rpjday@mindspring.com> wrote:
> >   just out of curiosity, i modified the standard build script and,
> > in the glibc configure stage, i changed "--enable-kernel=2.4.3" to
> > 2.6.0, and bad things happened when i was trying to build for
> > linuxthreads.
> >
> >   what is the purpose of that option, and should i be able to change
> > it to 2.6.0?
>
> R, as they say, TFM:
> http://www.gnu.org/software/libc/manual/html_node/Configuring-and-compiling.html

oh, i'm well aware of what the words *say*, i'm just not sure what
they *mean* in terms of actual code generation or how one should
choose that value.

for instance, in building the glibc library, crosstool-0.38 uses a
value of "--enable-kernel=2.4.3" for what are apparently historical
reasons.  ok, fine.

after i applied my recently-submitted patches to handle gcc-4.0.2 and
glibc-2.3.6, i tried to build an SH3eb toolchain after setting
"--enable-kernel=2.6.0" just for fun.  that didn't work well at all:

==============================================
...
/home/rpjday/ct/crosstool-0.38/build/sh3eb-unknown-linux-gnu/gcc-4.0.2-glibc-2.3.6/gcc-core-prefix/lib/gcc/sh3eb-unknown-linux-gnu/4.0.2/../../../../sh3eb-unknown-linux-gnu/bin/ld:
/home/rpjday/ct/crosstool-0.38/build/sh3eb-unknown-linux-gnu/gcc-4.0.2-glibc-2.3.6/build-glibc/rt/librt_pic.a(clock_nanosleep.os)(.text):
unresolvable relocation against symbol
`__librt_multiple_threads@@GLIBC_PRIVATE'
/home/rpjday/ct/crosstool-0.38/build/sh3eb-unknown-linux-gnu/gcc-4.0.2-glibc-2.3.6/gcc-core-prefix/lib/gcc/sh3eb-unknown-linux-gnu/4.0.2/../../../../sh3eb-unknown-linux-gnu/bin/ld:
final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status
make[2]: ***
[/home/rpjday/ct/crosstool-0.38/build/sh3eb-unknown-linux-gnu/gcc-4.0.2-glibc-2.3.6/build-glibc/rt/librt.so]
Error 1
make[2]: Leaving directory
`/home/rpjday/ct/crosstool-0.38/build/sh3eb-unknown-linux-gnu/gcc-4.0.2-glibc-2.3.6/glibc-2.3.6/rt'
make[1]: *** [rt/install-lib] Error 2
make[1]: Leaving directory
`/home/rpjday/ct/crosstool-0.38/build/sh3eb-unknown-linux-gnu/gcc-4.0.2-glibc-2.3.6/glibc-2.3.6'
make: *** [install-lib-all] Error 2
...
==============================================

  on the other hand, when i used my mini script to build the same
toolchain with NPTL instead of linuxthreads, it seemed to work just
fine.  i'm just about to take a closer look at this, but is there any
reason that suddenly changing that glibc configuration value should
make crosstool fail?

  would anyone else like to take a working configuration for
crosstool-0.38 and try to build it again after setting
"--enable-kernel=2.6.0" and see what happens?

rday


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]