Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 76322 - USE="nptl" is effective only if CHOST is set to >i386
Summary: USE="nptl" is effective only if CHOST is set to >i386
Status: RESOLVED FIXED
Alias: None
Product: [OLD] Docs-user
Classification: Unclassified
Component: Gentoo Linux x86 Installation Guide (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Sven Vermeulen (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-01 10:04 UTC by Qian Qiao
Modified: 2005-09-22 07:15 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Qian Qiao 2005-01-01 10:04:58 UTC
The nptl use flag will not give a glibc that's capable of nptl if the CHOST is set to i386-pc-linux-gnu. And this should be mentioned in the installation documentation and the kernel 2.6 guides.

Reproducible: Always
Steps to Reproduce:
1. Set CHOST to i386-pc-linux-gnu
2. Set USE='nptl'
3. emerge --update --deep --newuse world
4. getconf GNU_LIBPTHREAD_VERSION

Actual Results:  
linuxthreads-0.10

Expected Results:  
There shall either be a warning telling the user that the CHOST value will not 
produce a NPTL glibc, or this should be mentioned in the documentations.
Comment 1 Sven Vermeulen (RETIRED) gentoo-dev 2005-01-01 11:32:46 UTC
Do you happen to have a reference for this? 
Comment 2 SpanKY gentoo-dev 2005-01-01 11:48:42 UTC
we have an internal check in the ebuild ...

when USE=x86, we make sure CHOST is 486 or better
Comment 3 Qian Qiao 2005-01-01 12:10:47 UTC
I am afraid that I cannot find any documentation saying NPTL won't work for i386. It looks like it is expected to work rather.

However, I was able to reproduce the behavior on 3 different systems:

System 1: P4 3.06GHz with HT
System 2: Athlon-xp 2000+
System 3: Mobile Pentium II 333MHz

Whenever the set the CHOST flag on those systems to 1386-pc-linux-gnu. The compiled glibc has no NPTL support (with USE="nptl" or USE="nptlonly").

And if I change the CHOST flag to i686-pc-linux-gnu (as it should be). Redo a bootstrap, it gives me NPTL.

Originally, I think this may be a lack of documentation, but after knowing that NPTL is expected to work under i386, I am starting to feel that it may not just be a lack of documentation.

I shall continue searching for information, and I'll keep you updated.
Comment 4 Qian Qiao 2005-01-01 12:22:13 UTC
I see, thanks SpanKY.

I don't know if I am the only one not realising that I shall set CHOST to >i486.

The people initially build the system left CHOST to i386. I was then asked to give the system NPTL capability. I then went into all those trouble.

Would it be better if these issue is documented in the handbook and 2.6 kernel guide.

Thanks for the help. Really quick response times.
Comment 5 SpanKY gentoo-dev 2005-01-01 12:30:21 UTC
if you build a system with CHOST=i386 but use CFLAGS that target i686 or better, then your system has a good chance of being screwed up

as for whether nptl is *supposed* to work on i386 systems, i have no idea, i havent researched this myself, i just looked at the glibc ebuild
Comment 6 Sven Vermeulen (RETIRED) gentoo-dev 2005-01-11 09:16:17 UTC
I've updated the documentation to inform the users to use i586 or higher.
Comment 7 SpanKY gentoo-dev 2005-09-22 07:15:25 UTC
(In reply to comment #5)
> as for whether nptl is *supposed* to work on i386 systems, i have no idea, i
havent researched this myself, i just looked at the glibc ebuild

ok, just looked this up and indeed, the tls code requires instructions that are
available in i486+