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: [PATCH 1 of 1] arch/x86: fix x86 kernel arch


Hello Richard, All,

On Sunday 10 January 2010 17:55:18 Richard Strand wrote:
> Fix the x86 CT_KERNEL_ARCH variable. Without this nptl and kernel compilation
> is broken when the CT_ARCH is x86. This fixes a regression caused by change
> 5d1936ad5ba8.

This commit (and the adjacent ones) were meant to somehow mimic the Linux
kernel wrt. arch merging (eg. powerpc and powerpc64 merged as powerpc, i386
and x86_64 merged as x86, and so on...). I can't fully test every change,
so, yes: I've overlooked some (corner-)cases...

> diff -r 5d693a13c84a -r 3a92c1b8f3f5 scripts/build/arch/x86.sh
> --- a/scripts/build/arch/x86.sh	Fri Jan 08 18:48:21 2010 +0000
> +++ b/scripts/build/arch/x86.sh	Sun Jan 10 16:50:35 2010 +0000
> @@ -7,6 +7,7 @@
>      # Override the architecture part of the tuple:
>      if [ "${CT_ARCH_64}" = "y" ]; then
>          CT_TARGET_ARCH=x86_64
> +        CT_KERNEL_ARCH=x86_64
>      else
>          arch="${CT_ARCH_ARCH}"
>          [ -z "${arch}" ] && arch="${CT_ARCH_TUNE}"
> @@ -18,5 +19,6 @@
>              pentiumpro|pentium*|athlon*)  CT_TARGET_ARCH=i686;;
>              *)                            CT_TARGET_ARCH=i586;;
>          esac
> +        CT_KERNEL_ARCH=i386

Starting with linux-2.6.24, the two architectures i386 and x86_64 got merged
into x86. crosstool-NG does not support using kernel below 2.6.27.x, so we're
safe using x86 as kernel arch.

The issue with NPTL is that glibc still considers it to be two different
architectures, and it is the responsibility of the glibc build script to
correctly handle the case.

The correct fix should now be in the mercurial repository:
http://ymorin.is-a-geek.org/hg/crosstool-ng/rev/5c0d326c2cea

I haven't checked yet, but maybe other C libs may require a similar fix.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
`------------------------------^-------^------------------^--------------------'



--
For unsubscribe information see http://sourceware.org/lists.html#faq


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