public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 1 of 1] arch/x86: fix x86 kernel arch
  2010-01-10 16:55 [PATCH 0 of 1] Fix problem with x86 arch Richard Strand
@ 2010-01-10 16:55 ` Richard Strand
  2010-01-10 17:13   ` Yann E. MORIN
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Strand @ 2010-01-10 16:55 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: crossgcc

# HG changeset patch
# User Richard Strand <richard.strand@icomera.com>
# Date 1263142235 0
# Node ID 3a92c1b8f3f5c0cbb927fed7918676790b1da825
# Parent  5d693a13c84abf6a00275dfb1413834056e000c0
arch/x86: fix x86 kernel arch

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.

Signed-off-by: Richard Strand <richard.strand@icomera.com>

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
     fi
 }

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 0 of 1] Fix problem with x86 arch
@ 2010-01-10 16:55 Richard Strand
  2010-01-10 16:55 ` [PATCH 1 of 1] arch/x86: fix x86 kernel arch Richard Strand
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Strand @ 2010-01-10 16:55 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: crossgcc

Hi Yann, All,

This is a small patch which fixes compilation when CT_ARCH is set to x86.
It looks like changeset 5d1936ad5ba8 introduced this problem.

Regards,

Richard Strand

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1 of 1] arch/x86: fix x86 kernel arch
  2010-01-10 16:55 ` [PATCH 1 of 1] arch/x86: fix x86 kernel arch Richard Strand
@ 2010-01-10 17:13   ` Yann E. MORIN
  2010-01-10 17:43     ` Richard Strand
  0 siblings, 1 reply; 4+ messages in thread
From: Yann E. MORIN @ 2010-01-10 17:13 UTC (permalink / raw)
  To: Richard Strand; +Cc: crossgcc

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1 of 1] arch/x86: fix x86 kernel arch
  2010-01-10 17:13   ` Yann E. MORIN
@ 2010-01-10 17:43     ` Richard Strand
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Strand @ 2010-01-10 17:43 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: crossgcc

Yann E. MORIN wrote:
> 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.
>   
Ok, that makes sense - I was unsure of the implications of changing the 
variable so I just changed it to a setting I knew worked.

> 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
>   
That fix looks good.

> I haven't checked yet, but maybe other C libs may require a similar fix.
>   
I'll let you know if I run into any more problems!

Regards,

Richard Strand


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-01-10 17:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-10 16:55 [PATCH 0 of 1] Fix problem with x86 arch Richard Strand
2010-01-10 16:55 ` [PATCH 1 of 1] arch/x86: fix x86 kernel arch Richard Strand
2010-01-10 17:13   ` Yann E. MORIN
2010-01-10 17:43     ` Richard Strand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).