Patchwork [09/10] x86 tune inc files: add x32 abi tune parameters

login
register
mail settings
Submitter Nitin A Kamble
Date Aug. 4, 2011, 3:01 p.m.
Message ID <2c351319afd13acfca1283104172729925cfb696.1312469790.git.nitin.a.kamble@intel.com>
Download mbox | patch
Permalink /patch/9335/
State New, archived
Headers show

Comments

Nitin A Kamble - Aug. 4, 2011, 3:01 p.m.
From: Nitin A Kamble <nitin.a.kamble@intel.com>

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
---
 meta/conf/machine/include/ia32/arch-ia32.inc |   23 ++++++++++++++++++++---
 meta/conf/machine/include/tune-core2.inc     |    4 ++++
 meta/conf/machine/include/tune-x86_64.inc    |    2 +-
 3 files changed, 25 insertions(+), 4 deletions(-)
Phil Blundell - Aug. 4, 2011, 9:57 p.m.
On Thu, 2011-08-04 at 08:01 -0700, nitin.a.kamble@intel.com wrote:
>  # ELF32 ABI
>  TUNEVALID[m32] = "IA32 ELF32 standard ABI"
> -TUNECONFLICTS[m32] = "m64"
> +TUNECONFLICTS[m32] = "m64 mx32"
>  TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "m32", "${X86ARCH32}", "" ,d)}"
> +ABIEXTENSION .= "${@bb.utils.contains("TUNE_FEATURES", "m32", "32", "" ,d)}"
>  TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "m32", "-m32", "", d)}"

This is going to cause TARGET_OS to change for everyone using the i586
ABI, right?  That doesn't seem like it is either necessary or desirable,
and it isn't mentioned in the checkin comment either.

>  # ELF64 ABI
>  TUNEVALID[m64] = "IA32e (x86_64) ELF64 standard ABI"
> -TUNECONFLICT[m64] = "m32"
> +TUNECONFLICT[m64] = "m32 mx32"
>  TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "m64", "${X86ARCH64}", "" ,d)}"
> +ABIEXTENSION .= "${@bb.utils.contains("TUNE_FEATURES", "m64", "64", "" ,d)}"
>  TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "m64", "-m64", "", d)}"

... and likewise this for anybody using the x86-64 ABI.

> -PACKAGE_EXTRA_ARCHS_tune-x86-64 = "x86_64"
> +PACKAGE_EXTRA_ARCHS_tune-x86-64 = "x86-64"

That change might well be fine, but again it isn't mentioned in the
checkin message.

> diff --git a/meta/conf/machine/include/tune-x86_64.inc b/meta/conf/machine/include/tune-x86_64.inc
> index 04b0f96..50f20ba 100644
> --- a/meta/conf/machine/include/tune-x86_64.inc
> +++ b/meta/conf/machine/include/tune-x86_64.inc
> @@ -1,3 +1,3 @@
>  require conf/machine/include/ia32/arch-ia32.inc
>  
> -DEFAULTTUNE = "x86-64"
> +DEFAULTTUNE ?= "x86-64"

This one is also not mentioned in the checkin message and looks a bit
more dubious to me.  Why is this required?

p.
Nitin A Kamble - Aug. 4, 2011, 10:18 p.m.
> -----Original Message-----
> From: openembedded-core-bounces@lists.openembedded.org
> [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of
> Phil Blundell
> Sent: Thursday, August 04, 2011 2:57 PM
> To: Patches and discussions about the oe-core layer
> Subject: Re: [OE-core] [PATCH 09/10] x86 tune inc files: add x32 abi
> tune parameters
> 
> On Thu, 2011-08-04 at 08:01 -0700, nitin.a.kamble@intel.com wrote:
> >  # ELF32 ABI
> >  TUNEVALID[m32] = "IA32 ELF32 standard ABI"
> > -TUNECONFLICTS[m32] = "m64"
> > +TUNECONFLICTS[m32] = "m64 mx32"
> >  TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "m32",
> "${X86ARCH32}", "" ,d)}"
> > +ABIEXTENSION .= "${@bb.utils.contains("TUNE_FEATURES", "m32", "32",
> "" ,d)}"
> >  TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "m32", "-m32",
> "", d)}"
> 
> This is going to cause TARGET_OS to change for everyone using the i586
> ABI, right?  That doesn't seem like it is either necessary or
> desirable,
> and it isn't mentioned in the checkin comment either.

Correct, this will change the TARGET_OS from linux_gnu to linux_gnu32. And it is also applicable for x86-64 machine set with x86 tune. This change is be needed if multiple tunes are built from the same build directory. If such situation is not important then the ABIEXTENSION part can be dropped.

> 
> >  # ELF64 ABI 
> >  TUNEVALID[m64] = "IA32e (x86_64) ELF64 standard ABI"
> > -TUNECONFLICT[m64] = "m32"
> > +TUNECONFLICT[m64] = "m32 mx32"
> >  TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "m64",
> "${X86ARCH64}", "" ,d)}"
> > +ABIEXTENSION .= "${@bb.utils.contains("TUNE_FEATURES", "m64", "64",
> "" ,d)}"
> >  TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "m64", "-m64",
> "", d)}"
> 
> ... and likewise this for anybody using the x86-64 ABI.
This is similar to above.

> 
> > -PACKAGE_EXTRA_ARCHS_tune-x86-64 = "x86_64"
> > +PACKAGE_EXTRA_ARCHS_tune-x86-64 = "x86-64"
> 
> That change might well be fine, but again it isn't mentioned in the
> checkin message.
This is making this consistent with other PACKAGE_EXTRA_ARCHS_tune convention elsewhere. I will update the commit message for this.

> 
> > diff --git a/meta/conf/machine/include/tune-x86_64.inc
> b/meta/conf/machine/include/tune-x86_64.inc
> > index 04b0f96..50f20ba 100644
> > --- a/meta/conf/machine/include/tune-x86_64.inc
> > +++ b/meta/conf/machine/include/tune-x86_64.inc
> > @@ -1,3 +1,3 @@
> >  require conf/machine/include/ia32/arch-ia32.inc
> >
> > -DEFAULTTUNE = "x86-64"
> > +DEFAULTTUNE ?= "x86-64"
> 
> This one is also not mentioned in the checkin message and looks a bit
> more dubious to me.  Why is this required?
> 
It was required at one point when multilist support was quiet unstable. The reason it is done because the arch-ia32.inc file is included for both x86, tune-core, & x86-64 and setting this hard assignment, was breaking x86 or x32 targets. Not sure if it is still needed, I will check it.

> p.
> 
> 
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Nitin A Kamble - Aug. 4, 2011, 10:29 p.m.
> >
> > On Thu, 2011-08-04 at 08:01 -0700, nitin.a.kamble@intel.com wrote:
> > >  # ELF32 ABI
> > >  TUNEVALID[m32] = "IA32 ELF32 standard ABI"
> > > -TUNECONFLICTS[m32] = "m64"
> > > +TUNECONFLICTS[m32] = "m64 mx32"
> > >  TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "m32",
> > "${X86ARCH32}", "" ,d)}"
> > > +ABIEXTENSION .= "${@bb.utils.contains("TUNE_FEATURES", "m32",
> "32",
> > "" ,d)}"
> > >  TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "m32", "-
> m32",
> > "", d)}"
> >
> > This is going to cause TARGET_OS to change for everyone using the
> i586
> > ABI, right?  That doesn't seem like it is either necessary or
> > desirable,
> > and it isn't mentioned in the checkin comment either.
> 
> Correct, this will change the TARGET_OS from linux_gnu to linux_gnu32.
> And it is also applicable for x86-64 machine set with x86 tune. This
> change is be needed if multiple tunes are built from the same build
> directory. If such situation is not important then the ABIEXTENSION
> part can be dropped.
> 
> >
> > >  # ELF64 ABI
> > >  TUNEVALID[m64] = "IA32e (x86_64) ELF64 standard ABI"
> > > -TUNECONFLICT[m64] = "m32"
> > > +TUNECONFLICT[m64] = "m32 mx32"
> > >  TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "m64",
> > "${X86ARCH64}", "" ,d)}"
> > > +ABIEXTENSION .= "${@bb.utils.contains("TUNE_FEATURES", "m64",
> "64",
> > "" ,d)}"
> > >  TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "m64", "-
> m64",
> > "", d)}"
> >
> > ... and likewise this for anybody using the x86-64 ABI.
> This is similar to above.
> 
> >
> > > -PACKAGE_EXTRA_ARCHS_tune-x86-64 = "x86_64"
> > > +PACKAGE_EXTRA_ARCHS_tune-x86-64 = "x86-64"
> >
> > That change might well be fine, but again it isn't mentioned in the
> > checkin message.
> This is making this consistent with other PACKAGE_EXTRA_ARCHS_tune
> convention elsewhere. I will update the commit message for this.
> 
> >
> > > diff --git a/meta/conf/machine/include/tune-x86_64.inc
> > b/meta/conf/machine/include/tune-x86_64.inc
> > > index 04b0f96..50f20ba 100644
> > > --- a/meta/conf/machine/include/tune-x86_64.inc
> > > +++ b/meta/conf/machine/include/tune-x86_64.inc
> > > @@ -1,3 +1,3 @@
> > >  require conf/machine/include/ia32/arch-ia32.inc
> > >
> > > -DEFAULTTUNE = "x86-64"
> > > +DEFAULTTUNE ?= "x86-64"
> >
> > This one is also not mentioned in the checkin message and looks a bit
> > more dubious to me.  Why is this required?
> >
> It was required at one point when multilist support was quiet unstable.
> The reason it is done because the arch-ia32.inc file is included for
> both x86, tune-core, & x86-64 and setting this hard assignment, was
> breaking x86 or x32 targets. Not sure if it is still needed, I will
> check it.
Just checked, this is needed, when qemux86-64 machine is configured with x32 abi, when a different default tune is used.
Nitin

> 
> > p.
> >
> >
> >
> > _______________________________________________
> > Openembedded-core mailing list
> > Openembedded-core@lists.openembedded.org
> > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Phil Blundell - Aug. 5, 2011, 7:50 a.m.
On Thu, 2011-08-04 at 15:18 -0700, Kamble, Nitin A wrote:
> 
> > -----Original Message-----
> > From: openembedded-core-bounces@lists.openembedded.org
> > [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of
> > Phil Blundell
> > Sent: Thursday, August 04, 2011 2:57 PM
> > To: Patches and discussions about the oe-core layer
> > Subject: Re: [OE-core] [PATCH 09/10] x86 tune inc files: add x32 abi
> > tune parameters
> > 
> > On Thu, 2011-08-04 at 08:01 -0700, nitin.a.kamble@intel.com wrote:
> > >  # ELF32 ABI
> > >  TUNEVALID[m32] = "IA32 ELF32 standard ABI"
> > > -TUNECONFLICTS[m32] = "m64"
> > > +TUNECONFLICTS[m32] = "m64 mx32"
> > >  TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "m32",
> > "${X86ARCH32}", "" ,d)}"
> > > +ABIEXTENSION .= "${@bb.utils.contains("TUNE_FEATURES", "m32", "32",
> > "" ,d)}"
> > >  TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "m32", "-m32",
> > "", d)}"
> > 
> > This is going to cause TARGET_OS to change for everyone using the i586
> > ABI, right?  That doesn't seem like it is either necessary or
> > desirable,
> > and it isn't mentioned in the checkin comment either.
> 
> Correct, this will change the TARGET_OS from linux_gnu to linux_gnu32. And it is also applicable for x86-64 machine set with x86 tune. This change is be needed if multiple tunes are built from the same build directory. If such situation is not important then the ABIEXTENSION part can be dropped.

Well, if you build i686 and x32 in the same tree they will already be
disambiguated through TARGET_ARCH.  Likewise i686 and x86-64 already
works for the same reason.  So, the only possible conflict is between
x86-64 and x32, and setting ABIEXTENSION for x32 (only) would be
sufficient to avoid that.

Though, I do wonder whether x32 ought to just have its own TARGET_ARCH
value rather than trying to disambiguate it through TARGET_OS hackery.

p.
Nitin A Kamble - Aug. 5, 2011, 3:37 p.m.
> -----Original Message-----
> From: openembedded-core-bounces@lists.openembedded.org
> [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of
> Phil Blundell
> Sent: Friday, August 05, 2011 12:51 AM
> To: Patches and discussions about the oe-core layer
> Subject: Re: [OE-core] [PATCH 09/10] x86 tune inc files: add x32 abi
> tune parameters
> 
> On Thu, 2011-08-04 at 15:18 -0700, Kamble, Nitin A wrote:
> >
> > > -----Original Message-----
> > > From: openembedded-core-bounces@lists.openembedded.org
> > > [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf
> Of
> > > Phil Blundell
> > > Sent: Thursday, August 04, 2011 2:57 PM
> > > To: Patches and discussions about the oe-core layer
> > > Subject: Re: [OE-core] [PATCH 09/10] x86 tune inc files: add x32
> abi
> > > tune parameters
> > >
> > > On Thu, 2011-08-04 at 08:01 -0700, nitin.a.kamble@intel.com wrote:
> > > >  # ELF32 ABI
> > > >  TUNEVALID[m32] = "IA32 ELF32 standard ABI"
> > > > -TUNECONFLICTS[m32] = "m64"
> > > > +TUNECONFLICTS[m32] = "m64 mx32"
> > > >  TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "m32",
> > > "${X86ARCH32}", "" ,d)}"
> > > > +ABIEXTENSION .= "${@bb.utils.contains("TUNE_FEATURES", "m32",
> "32",
> > > "" ,d)}"
> > > >  TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "m32", "-
> m32",
> > > "", d)}"
> > >
> > > This is going to cause TARGET_OS to change for everyone using the
> i586
> > > ABI, right?  That doesn't seem like it is either necessary or
> > > desirable,
> > > and it isn't mentioned in the checkin comment either.
> >
> > Correct, this will change the TARGET_OS from linux_gnu to
> linux_gnu32. And it is also applicable for x86-64 machine set with x86
> tune. This change is be needed if multiple tunes are built from the
> same build directory. If such situation is not important then the
> ABIEXTENSION part can be dropped.
> 
> Well, if you build i686 and x32 in the same tree they will already be
> disambiguated through TARGET_ARCH.  Likewise i686 and x86-64 already
> works for the same reason.  So, the only possible conflict is between
> x86-64 and x32, and setting ABIEXTENSION for x32 (only) would be
> sufficient to avoid that.
> 
Now for TARGET_ARCH=x86_64 there are multiple targets, one is 64bit, another 
is x32 and yet another is 32. This is new addition due to multilib changes. 
To distinguish the these different ABI target, TARGET_OS is appended with 
the ABIEXTENSION.

> Though, I do wonder whether x32 ought to just have its own TARGET_ARCH
> value rather than trying to disambiguate it through TARGET_OS hackery.


Changing TARGET_ARCH is not correct way to handle it. Because HW/ARCH is 
not different, the difference is in the ABI of the OS. And also changing 
TARGET_ARCH would bring lot of other changes in recipes and classes in the 
Tree.

Thanks,
Nitin

> 
> p.
> 
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Phil Blundell - Aug. 5, 2011, 3:41 p.m.
On Fri, 2011-08-05 at 08:37 -0700, Kamble, Nitin A wrote:
> Changing TARGET_ARCH is not correct way to handle it. Because HW/ARCH is 
> not different, the difference is in the ABI of the OS. 

Well, I'm not entirely sure I agree with what you're saying here.  There
are at least a few precedents for encoding ABI details (eg hardfloat
parameter passing, endianness) into TARGET_ARCH, and it seems to me that
they belong there more naturally than in TARGET_OS.

p.
Richard Purdie - Aug. 5, 2011, 3:44 p.m.
On Fri, 2011-08-05 at 16:41 +0100, Phil Blundell wrote:
> On Fri, 2011-08-05 at 08:37 -0700, Kamble, Nitin A wrote:
> > Changing TARGET_ARCH is not correct way to handle it. Because HW/ARCH is 
> > not different, the difference is in the ABI of the OS. 
> 
> Well, I'm not entirely sure I agree with what you're saying here.  There
> are at least a few precedents for encoding ABI details (eg hardfloat
> parameter passing, endianness) into TARGET_ARCH, and it seems to me that
> they belong there more naturally than in TARGET_OS.

Equally, there are several precedents for encoding ABI into TARGET_OS,
arm-gnueabi springs to mind...

It really comes down to the formats that the various magic files accept
and whilst its the regexps are lax on arm, they are less lax on x86 and
I suspect the TARGET_OS path is the one of less resistance in this case.

Even so, it shouldn't be necessary to change the default TARGET_OS.

Cheers,

Richard
Phil Blundell - Aug. 5, 2011, 3:49 p.m.
On Fri, 2011-08-05 at 16:44 +0100, Richard Purdie wrote:
> Equally, there are several precedents for encoding ABI into TARGET_OS,
> arm-gnueabi springs to mind...
> 
> It really comes down to the formats that the various magic files accept
> and whilst its the regexps are lax on arm, they are less lax on x86 and
> I suspect the TARGET_OS path is the one of less resistance in this case.
> 
> Even so, it shouldn't be necessary to change the default TARGET_OS.

Yeah, fair enough.  I'm not terribly bothered either way about what
happens in the multilib case, but I would much prefer not to end up with
"i686-linux32" sort of things for a plain, non-multilibbed i686 build.

p.
Richard Purdie - Aug. 5, 2011, 4:04 p.m.
On Thu, 2011-08-04 at 08:01 -0700, nitin.a.kamble@intel.com wrote:
> From: Nitin A Kamble <nitin.a.kamble@intel.com>
> 
> Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
> ---
>  meta/conf/machine/include/ia32/arch-ia32.inc |   23 ++++++++++++++++++++---
>  meta/conf/machine/include/tune-core2.inc     |    4 ++++
>  meta/conf/machine/include/tune-x86_64.inc    |    2 +-
>  3 files changed, 25 insertions(+), 4 deletions(-)
> 
> diff --git a/meta/conf/machine/include/ia32/arch-ia32.inc b/meta/conf/machine/include/ia32/arch-ia32.inc
> index 2709440..fb527da 100644
> --- a/meta/conf/machine/include/ia32/arch-ia32.inc
> +++ b/meta/conf/machine/include/ia32/arch-ia32.inc
> @@ -6,17 +6,29 @@ DEFAULTTUNE ?= "x86"
>  TARGET_FPU ?= ""
>  X86ARCH32 ?= "i586"
>  X86ARCH64 ?= "x86_64"
> +X86ARCHX32 ?= "x86_64"
>  
>  # ELF32 ABI
>  TUNEVALID[m32] = "IA32 ELF32 standard ABI"
> -TUNECONFLICTS[m32] = "m64"
> +TUNECONFLICTS[m32] = "m64 mx32"
>  TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "m32", "${X86ARCH32}", "" ,d)}"
> +ABIEXTENSION .= "${@bb.utils.contains("TUNE_FEATURES", "m32", "32", "" ,d)}"

Please drop the above line. There is no need to change that.

>  TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "m32", "-m32", "", d)}"
>  
> +# x32 ABI
> +TUNEVALID[mx32] = "IA32e (x86_64) ELF32 standard ABI"
> +TUNECONFLICTS[mx32] = "m64 m32"
> +TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "mx32", "${X86ARCHX32}", "" ,d)}"
> +ABIEXTENSION .= "${@bb.utils.contains("TUNE_FEATURES", "mx32", "x32", "" ,d)}"
> +TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-mx32", "", d)}"
> +TUNE_LDARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-m elf32_x86_64", "", d)}"
> +TUNE_ASARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-x32", "", d)}"
> +

These are fine.

>  # ELF64 ABI
>  TUNEVALID[m64] = "IA32e (x86_64) ELF64 standard ABI"
> -TUNECONFLICT[m64] = "m32"
> +TUNECONFLICT[m64] = "m32 mx32"
>  TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "m64", "${X86ARCH64}", "" ,d)}"
> +ABIEXTENSION .= "${@bb.utils.contains("TUNE_FEATURES", "m64", "64", "" ,d)}"

Again, please drop the above line.

>  TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "m64", "-m64", "", d)}"
>  
>  TUNE_PKGARCH ?= "${@bb.utils.contains("TUNE_FEATURES", "m32", "x86", "x86_64", d)}"
> @@ -30,4 +42,9 @@ PACKAGE_EXTRA_ARCHS_tune-x86 = "x86"
>  AVAILTUNES += "x86-64"
>  TUNE_FEATURES_tune-x86-64 ?= "m64"
>  BASE_LIB_tune-x86-64 ?= "lib64"
> -PACKAGE_EXTRA_ARCHS_tune-x86-64 = "x86_64"
> +PACKAGE_EXTRA_ARCHS_tune-x86-64 = "x86-64"

That is likely wrong, please drop this piece.

> +
> +AVAILTUNES += "x86-64-x32"
> +TUNE_FEATURES_tune-x86-64-x32 ?= "mx32"
> +BASE_LIB_tune-x86-64-x32 ?= "lib"
> +PACKAGE_EXTRA_ARCHS_tune-x86-64-x32 = "x86-64-x32"

And this is wrong too.

You really want:

TUNE_PKGARCH .= "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-x32", "", d)}"
PACKAGE_EXTRA_ARCHS_tune-x86-64-x32 = "x86_64-x32"

> diff --git a/meta/conf/machine/include/tune-core2.inc b/meta/conf/machine/include/tune-core2.inc
> index 25c2226..8a4de3e 100644
> --- a/meta/conf/machine/include/tune-core2.inc
> +++ b/meta/conf/machine/include/tune-core2.inc
> @@ -18,3 +18,7 @@ TUNE_FEATURES_tune-core2-64 ?= "${TUNE_FEATURES_tune-x86-64} core2"
>  BASE_LIB_tune-core2-64 ?= "lib64"
>  PACKAGE_EXTRA_ARCHS_tune-core2-64 = "${PACKAGE_EXTRA_ARCHS_tune-x86-64} core2-64"
>  
> +AVAILTUNES += "core2-x32"
> +TUNE_FEATURES_tune-core2-x32 ?= "${TUNE_FEATURES_tune-x86-64-x32} core2"
> +BASE_LIB_tune-core2-x32 ?= "lib"
> +PACKAGE_EXTRA_ARCHS_tune-core2-x32 = "${PACKAGE_EXTRA_ARCHS_tune-x86-64-x32} core2-x32"

PACKAGE_EXTRA_ARCHS_tune-core2-x32 = "${PACKAGE_EXTRA_ARCHS_tune-x86-64-x32} core2-64-x32"

Cheers,

Richard
Nitin A Kamble - Aug. 5, 2011, 6:07 p.m.
> -----Original Message-----
> From: openembedded-core-bounces@lists.openembedded.org
> [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of
> Richard Purdie
> Sent: Friday, August 05, 2011 9:04 AM
> To: Patches and discussions about the oe-core layer
> Subject: Re: [OE-core] [PATCH 09/10] x86 tune inc files: add x32 abi
> tune parameters
> 
> On Thu, 2011-08-04 at 08:01 -0700, nitin.a.kamble@intel.com wrote:
> > From: Nitin A Kamble <nitin.a.kamble@intel.com>
> >
> > Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
> > ---
> >  meta/conf/machine/include/ia32/arch-ia32.inc |   23
> ++++++++++++++++++++---
> >  meta/conf/machine/include/tune-core2.inc     |    4 ++++
> >  meta/conf/machine/include/tune-x86_64.inc    |    2 +-
> >  3 files changed, 25 insertions(+), 4 deletions(-)
> >
> > diff --git a/meta/conf/machine/include/ia32/arch-ia32.inc
> b/meta/conf/machine/include/ia32/arch-ia32.inc
> > index 2709440..fb527da 100644
> > --- a/meta/conf/machine/include/ia32/arch-ia32.inc
> > +++ b/meta/conf/machine/include/ia32/arch-ia32.inc
> > @@ -6,17 +6,29 @@ DEFAULTTUNE ?= "x86"
> >  TARGET_FPU ?= ""
> >  X86ARCH32 ?= "i586"
> >  X86ARCH64 ?= "x86_64"
> > +X86ARCHX32 ?= "x86_64"
> >
> >  # ELF32 ABI
> >  TUNEVALID[m32] = "IA32 ELF32 standard ABI"
> > -TUNECONFLICTS[m32] = "m64"
> > +TUNECONFLICTS[m32] = "m64 mx32"
> >  TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "m32",
> "${X86ARCH32}", "" ,d)}"
> > +ABIEXTENSION .= "${@bb.utils.contains("TUNE_FEATURES", "m32", "32",
> "" ,d)}"
> 
> Please drop the above line. There is no need to change that.
> 
> >  TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "m32", "-m32",
> "", d)}"
> >
> > +# x32 ABI
> > +TUNEVALID[mx32] = "IA32e (x86_64) ELF32 standard ABI"
> > +TUNECONFLICTS[mx32] = "m64 m32"
> > +TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "mx32",
> "${X86ARCHX32}", "" ,d)}"
> > +ABIEXTENSION .= "${@bb.utils.contains("TUNE_FEATURES", "mx32",
> "x32", "" ,d)}"
> > +TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-
> mx32", "", d)}"
> > +TUNE_LDARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-m
> elf32_x86_64", "", d)}"
> > +TUNE_ASARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-
> x32", "", d)}"
> > +
> 
> These are fine.
> 
> >  # ELF64 ABI
> >  TUNEVALID[m64] = "IA32e (x86_64) ELF64 standard ABI"
> > -TUNECONFLICT[m64] = "m32"
> > +TUNECONFLICT[m64] = "m32 mx32"
> >  TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "m64",
> "${X86ARCH64}", "" ,d)}"
> > +ABIEXTENSION .= "${@bb.utils.contains("TUNE_FEATURES", "m64", "64",
> "" ,d)}"
> 
> Again, please drop the above line.
> 
> >  TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "m64", "-m64",
> "", d)}"
> >
> >  TUNE_PKGARCH ?= "${@bb.utils.contains("TUNE_FEATURES", "m32", "x86",
> "x86_64", d)}"
> > @@ -30,4 +42,9 @@ PACKAGE_EXTRA_ARCHS_tune-x86 = "x86"
> >  AVAILTUNES += "x86-64"
> >  TUNE_FEATURES_tune-x86-64 ?= "m64"
> >  BASE_LIB_tune-x86-64 ?= "lib64"
> > -PACKAGE_EXTRA_ARCHS_tune-x86-64 = "x86_64"
> > +PACKAGE_EXTRA_ARCHS_tune-x86-64 = "x86-64"
> 
> That is likely wrong, please drop this piece.
> 
> > +
> > +AVAILTUNES += "x86-64-x32"
> > +TUNE_FEATURES_tune-x86-64-x32 ?= "mx32"
> > +BASE_LIB_tune-x86-64-x32 ?= "lib"
> > +PACKAGE_EXTRA_ARCHS_tune-x86-64-x32 = "x86-64-x32"
> 
> And this is wrong too.
> 
> You really want:
> 
> TUNE_PKGARCH .= "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-x32",
> "", d)}"
> PACKAGE_EXTRA_ARCHS_tune-x86-64-x32 = "x86_64-x32"
> 
> > diff --git a/meta/conf/machine/include/tune-core2.inc
> b/meta/conf/machine/include/tune-core2.inc
> > index 25c2226..8a4de3e 100644
> > --- a/meta/conf/machine/include/tune-core2.inc
> > +++ b/meta/conf/machine/include/tune-core2.inc
> > @@ -18,3 +18,7 @@ TUNE_FEATURES_tune-core2-64 ?=
> "${TUNE_FEATURES_tune-x86-64} core2"
> >  BASE_LIB_tune-core2-64 ?= "lib64"
> >  PACKAGE_EXTRA_ARCHS_tune-core2-64 = "${PACKAGE_EXTRA_ARCHS_tune-x86-
> 64} core2-64"
> >
> > +AVAILTUNES += "core2-x32"
> > +TUNE_FEATURES_tune-core2-x32 ?= "${TUNE_FEATURES_tune-x86-64-x32}
> core2"
> > +BASE_LIB_tune-core2-x32 ?= "lib"
> > +PACKAGE_EXTRA_ARCHS_tune-core2-x32 = "${PACKAGE_EXTRA_ARCHS_tune-
> x86-64-x32} core2-x32"
> 
> PACKAGE_EXTRA_ARCHS_tune-core2-x32 = "${PACKAGE_EXTRA_ARCHS_tune-x86-
> 64-x32} core2-64-x32"
> 
> Cheers,
> 
> Richard
> 
> 

Richard,
  Changed the commits according to the comments, please pull/cherry-pick again.

Thanks,
Nitin
Saul Wold - Aug. 5, 2011, 9:23 p.m.
On 08/05/2011 11:07 AM, Kamble, Nitin A wrote:
>
>
>> -----Original Message-----
>> From: openembedded-core-bounces@lists.openembedded.org
>> [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of
>> Richard Purdie
>> Sent: Friday, August 05, 2011 9:04 AM
>> To: Patches and discussions about the oe-core layer
>> Subject: Re: [OE-core] [PATCH 09/10] x86 tune inc files: add x32 abi
>> tune parameters
>>
>> On Thu, 2011-08-04 at 08:01 -0700, nitin.a.kamble@intel.com wrote:
>>> From: Nitin A Kamble<nitin.a.kamble@intel.com>
>>>
>>> Signed-off-by: Nitin A Kamble<nitin.a.kamble@intel.com>
>>> ---
>>>   meta/conf/machine/include/ia32/arch-ia32.inc |   23
>> ++++++++++++++++++++---
>>>   meta/conf/machine/include/tune-core2.inc     |    4 ++++
>>>   meta/conf/machine/include/tune-x86_64.inc    |    2 +-
>>>   3 files changed, 25 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/meta/conf/machine/include/ia32/arch-ia32.inc
>> b/meta/conf/machine/include/ia32/arch-ia32.inc
>>> index 2709440..fb527da 100644
>>> --- a/meta/conf/machine/include/ia32/arch-ia32.inc
>>> +++ b/meta/conf/machine/include/ia32/arch-ia32.inc
>>> @@ -6,17 +6,29 @@ DEFAULTTUNE ?= "x86"
>>>   TARGET_FPU ?= ""
>>>   X86ARCH32 ?= "i586"
>>>   X86ARCH64 ?= "x86_64"
>>> +X86ARCHX32 ?= "x86_64"
>>>
>>>   # ELF32 ABI
>>>   TUNEVALID[m32] = "IA32 ELF32 standard ABI"
>>> -TUNECONFLICTS[m32] = "m64"
>>> +TUNECONFLICTS[m32] = "m64 mx32"
>>>   TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "m32",
>> "${X86ARCH32}", "" ,d)}"
>>> +ABIEXTENSION .= "${@bb.utils.contains("TUNE_FEATURES", "m32", "32",
>> "" ,d)}"
>>
>> Please drop the above line. There is no need to change that.
>>
>>>   TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "m32", "-m32",
>> "", d)}"
>>>
>>> +# x32 ABI
>>> +TUNEVALID[mx32] = "IA32e (x86_64) ELF32 standard ABI"
>>> +TUNECONFLICTS[mx32] = "m64 m32"
>>> +TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "mx32",
>> "${X86ARCHX32}", "" ,d)}"
>>> +ABIEXTENSION .= "${@bb.utils.contains("TUNE_FEATURES", "mx32",
>> "x32", "" ,d)}"
>>> +TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-
>> mx32", "", d)}"
>>> +TUNE_LDARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-m
>> elf32_x86_64", "", d)}"
>>> +TUNE_ASARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-
>> x32", "", d)}"
>>> +
>>
>> These are fine.
>>
>>>   # ELF64 ABI
>>>   TUNEVALID[m64] = "IA32e (x86_64) ELF64 standard ABI"
>>> -TUNECONFLICT[m64] = "m32"
>>> +TUNECONFLICT[m64] = "m32 mx32"
>>>   TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "m64",
>> "${X86ARCH64}", "" ,d)}"
>>> +ABIEXTENSION .= "${@bb.utils.contains("TUNE_FEATURES", "m64", "64",
>> "" ,d)}"
>>
>> Again, please drop the above line.
>>
>>>   TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "m64", "-m64",
>> "", d)}"
>>>
>>>   TUNE_PKGARCH ?= "${@bb.utils.contains("TUNE_FEATURES", "m32", "x86",
>> "x86_64", d)}"
>>> @@ -30,4 +42,9 @@ PACKAGE_EXTRA_ARCHS_tune-x86 = "x86"
>>>   AVAILTUNES += "x86-64"
>>>   TUNE_FEATURES_tune-x86-64 ?= "m64"
>>>   BASE_LIB_tune-x86-64 ?= "lib64"
>>> -PACKAGE_EXTRA_ARCHS_tune-x86-64 = "x86_64"
>>> +PACKAGE_EXTRA_ARCHS_tune-x86-64 = "x86-64"
>>
>> That is likely wrong, please drop this piece.
>>
>>> +
>>> +AVAILTUNES += "x86-64-x32"
>>> +TUNE_FEATURES_tune-x86-64-x32 ?= "mx32"
>>> +BASE_LIB_tune-x86-64-x32 ?= "lib"
>>> +PACKAGE_EXTRA_ARCHS_tune-x86-64-x32 = "x86-64-x32"
>>
>> And this is wrong too.
>>
>> You really want:
>>
>> TUNE_PKGARCH .= "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-x32",
>> "", d)}"
>> PACKAGE_EXTRA_ARCHS_tune-x86-64-x32 = "x86_64-x32"
>>
>>> diff --git a/meta/conf/machine/include/tune-core2.inc
>> b/meta/conf/machine/include/tune-core2.inc
>>> index 25c2226..8a4de3e 100644
>>> --- a/meta/conf/machine/include/tune-core2.inc
>>> +++ b/meta/conf/machine/include/tune-core2.inc
>>> @@ -18,3 +18,7 @@ TUNE_FEATURES_tune-core2-64 ?=
>> "${TUNE_FEATURES_tune-x86-64} core2"
>>>   BASE_LIB_tune-core2-64 ?= "lib64"
>>>   PACKAGE_EXTRA_ARCHS_tune-core2-64 = "${PACKAGE_EXTRA_ARCHS_tune-x86-
>> 64} core2-64"
>>>
>>> +AVAILTUNES += "core2-x32"
>>> +TUNE_FEATURES_tune-core2-x32 ?= "${TUNE_FEATURES_tune-x86-64-x32}
>> core2"
>>> +BASE_LIB_tune-core2-x32 ?= "lib"
>>> +PACKAGE_EXTRA_ARCHS_tune-core2-x32 = "${PACKAGE_EXTRA_ARCHS_tune-
>> x86-64-x32} core2-x32"
>>
>> PACKAGE_EXTRA_ARCHS_tune-core2-x32 = "${PACKAGE_EXTRA_ARCHS_tune-x86-
>> 64-x32} core2-64-x32"
>>
>> Cheers,
>>
>> Richard
>>
>>
>
> Richard,
>    Changed the commits according to the comments, please pull/cherry-pick again.
>
It might be best to rebase against master and resend a V2 patch set so 
it's clear to RP and other in the community what you changed.

BTW, for the layer, do you really need to pull glibc back in?  Or can 
you use eglibc from oe-core with the correct settings for x32?


Sau!

> Thanks,
> Nitin
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
Nitin A Kamble - Aug. 5, 2011, 11:25 p.m.
> -----Original Message-----
> From: openembedded-core-bounces@lists.openembedded.org
> [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of
> Saul Wold
> Sent: Friday, August 05, 2011 2:24 PM
> To: Patches and discussions about the oe-core layer
> Subject: Re: [OE-core] [PATCH 09/10] x86 tune inc files: add x32 abi
> tune parameters
> 
> On 08/05/2011 11:07 AM, Kamble, Nitin A wrote:
> >
> >
> >> -----Original Message-----
> >> From: openembedded-core-bounces@lists.openembedded.org
> >> [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf
> Of
> >> Richard Purdie
> >> Sent: Friday, August 05, 2011 9:04 AM
> >> To: Patches and discussions about the oe-core layer
> >> Subject: Re: [OE-core] [PATCH 09/10] x86 tune inc files: add x32 abi
> >> tune parameters
> >>
> >> On Thu, 2011-08-04 at 08:01 -0700, nitin.a.kamble@intel.com wrote:
> >>> From: Nitin A Kamble<nitin.a.kamble@intel.com>
> >>>
> >>> Signed-off-by: Nitin A Kamble<nitin.a.kamble@intel.com>
> >>> ---
> >>>   meta/conf/machine/include/ia32/arch-ia32.inc |   23
> >> ++++++++++++++++++++---
> >>>   meta/conf/machine/include/tune-core2.inc     |    4 ++++
> >>>   meta/conf/machine/include/tune-x86_64.inc    |    2 +-
> >>>   3 files changed, 25 insertions(+), 4 deletions(-)
> >>>
> >>> diff --git a/meta/conf/machine/include/ia32/arch-ia32.inc
> >> b/meta/conf/machine/include/ia32/arch-ia32.inc
> >>> index 2709440..fb527da 100644
> >>> --- a/meta/conf/machine/include/ia32/arch-ia32.inc
> >>> +++ b/meta/conf/machine/include/ia32/arch-ia32.inc
> >>> @@ -6,17 +6,29 @@ DEFAULTTUNE ?= "x86"
> >>>   TARGET_FPU ?= ""
> >>>   X86ARCH32 ?= "i586"
> >>>   X86ARCH64 ?= "x86_64"
> >>> +X86ARCHX32 ?= "x86_64"
> >>>
> >>>   # ELF32 ABI
> >>>   TUNEVALID[m32] = "IA32 ELF32 standard ABI"
> >>> -TUNECONFLICTS[m32] = "m64"
> >>> +TUNECONFLICTS[m32] = "m64 mx32"
> >>>   TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "m32",
> >> "${X86ARCH32}", "" ,d)}"
> >>> +ABIEXTENSION .= "${@bb.utils.contains("TUNE_FEATURES", "m32",
> "32",
> >> "" ,d)}"
> >>
> >> Please drop the above line. There is no need to change that.
> >>
> >>>   TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "m32", "-
> m32",
> >> "", d)}"
> >>>
> >>> +# x32 ABI
> >>> +TUNEVALID[mx32] = "IA32e (x86_64) ELF32 standard ABI"
> >>> +TUNECONFLICTS[mx32] = "m64 m32"
> >>> +TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "mx32",
> >> "${X86ARCHX32}", "" ,d)}"
> >>> +ABIEXTENSION .= "${@bb.utils.contains("TUNE_FEATURES", "mx32",
> >> "x32", "" ,d)}"
> >>> +TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-
> >> mx32", "", d)}"
> >>> +TUNE_LDARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-m
> >> elf32_x86_64", "", d)}"
> >>> +TUNE_ASARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-
> >> x32", "", d)}"
> >>> +
> >>
> >> These are fine.
> >>
> >>>   # ELF64 ABI
> >>>   TUNEVALID[m64] = "IA32e (x86_64) ELF64 standard ABI"
> >>> -TUNECONFLICT[m64] = "m32"
> >>> +TUNECONFLICT[m64] = "m32 mx32"
> >>>   TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "m64",
> >> "${X86ARCH64}", "" ,d)}"
> >>> +ABIEXTENSION .= "${@bb.utils.contains("TUNE_FEATURES", "m64",
> "64",
> >> "" ,d)}"
> >>
> >> Again, please drop the above line.
> >>
> >>>   TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "m64", "-
> m64",
> >> "", d)}"
> >>>
> >>>   TUNE_PKGARCH ?= "${@bb.utils.contains("TUNE_FEATURES", "m32",
> "x86",
> >> "x86_64", d)}"
> >>> @@ -30,4 +42,9 @@ PACKAGE_EXTRA_ARCHS_tune-x86 = "x86"
> >>>   AVAILTUNES += "x86-64"
> >>>   TUNE_FEATURES_tune-x86-64 ?= "m64"
> >>>   BASE_LIB_tune-x86-64 ?= "lib64"
> >>> -PACKAGE_EXTRA_ARCHS_tune-x86-64 = "x86_64"
> >>> +PACKAGE_EXTRA_ARCHS_tune-x86-64 = "x86-64"
> >>
> >> That is likely wrong, please drop this piece.
> >>
> >>> +
> >>> +AVAILTUNES += "x86-64-x32"
> >>> +TUNE_FEATURES_tune-x86-64-x32 ?= "mx32"
> >>> +BASE_LIB_tune-x86-64-x32 ?= "lib"
> >>> +PACKAGE_EXTRA_ARCHS_tune-x86-64-x32 = "x86-64-x32"
> >>
> >> And this is wrong too.
> >>
> >> You really want:
> >>
> >> TUNE_PKGARCH .= "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-
> x32",
> >> "", d)}"
> >> PACKAGE_EXTRA_ARCHS_tune-x86-64-x32 = "x86_64-x32"
> >>
> >>> diff --git a/meta/conf/machine/include/tune-core2.inc
> >> b/meta/conf/machine/include/tune-core2.inc
> >>> index 25c2226..8a4de3e 100644
> >>> --- a/meta/conf/machine/include/tune-core2.inc
> >>> +++ b/meta/conf/machine/include/tune-core2.inc
> >>> @@ -18,3 +18,7 @@ TUNE_FEATURES_tune-core2-64 ?=
> >> "${TUNE_FEATURES_tune-x86-64} core2"
> >>>   BASE_LIB_tune-core2-64 ?= "lib64"
> >>>   PACKAGE_EXTRA_ARCHS_tune-core2-64 = "${PACKAGE_EXTRA_ARCHS_tune-
> x86-
> >> 64} core2-64"
> >>>
> >>> +AVAILTUNES += "core2-x32"
> >>> +TUNE_FEATURES_tune-core2-x32 ?= "${TUNE_FEATURES_tune-x86-64-x32}
> >> core2"
> >>> +BASE_LIB_tune-core2-x32 ?= "lib"
> >>> +PACKAGE_EXTRA_ARCHS_tune-core2-x32 = "${PACKAGE_EXTRA_ARCHS_tune-
> >> x86-64-x32} core2-x32"
> >>
> >> PACKAGE_EXTRA_ARCHS_tune-core2-x32 = "${PACKAGE_EXTRA_ARCHS_tune-
> x86-
> >> 64-x32} core2-64-x32"
> >>
> >> Cheers,
> >>
> >> Richard
> >>
> >>
> >
> > Richard,
> >    Changed the commits according to the comments, please pull/cherry-
> pick again.
> >
> It might be best to rebase against master and resend a V2 patch set so
> it's clear to RP and other in the community what you changed.

Ok, second patch set coming soon.
> 
> BTW, for the layer, do you really need to pull glibc back in?  Or can
> you use eglibc from oe-core with the correct settings for x32?
I will stay with glibc in the meta-x32 for now.

Thanks,
Nitin

> 
> 
> Sau!
> 
> > Thanks,
> > Nitin
> >
> >
> >
> > _______________________________________________
> > Openembedded-core mailing list
> > Openembedded-core@lists.openembedded.org
> > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
> >
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Patch

diff --git a/meta/conf/machine/include/ia32/arch-ia32.inc b/meta/conf/machine/include/ia32/arch-ia32.inc
index 2709440..fb527da 100644
--- a/meta/conf/machine/include/ia32/arch-ia32.inc
+++ b/meta/conf/machine/include/ia32/arch-ia32.inc
@@ -6,17 +6,29 @@  DEFAULTTUNE ?= "x86"
 TARGET_FPU ?= ""
 X86ARCH32 ?= "i586"
 X86ARCH64 ?= "x86_64"
+X86ARCHX32 ?= "x86_64"
 
 # ELF32 ABI
 TUNEVALID[m32] = "IA32 ELF32 standard ABI"
-TUNECONFLICTS[m32] = "m64"
+TUNECONFLICTS[m32] = "m64 mx32"
 TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "m32", "${X86ARCH32}", "" ,d)}"
+ABIEXTENSION .= "${@bb.utils.contains("TUNE_FEATURES", "m32", "32", "" ,d)}"
 TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "m32", "-m32", "", d)}"
 
+# x32 ABI
+TUNEVALID[mx32] = "IA32e (x86_64) ELF32 standard ABI"
+TUNECONFLICTS[mx32] = "m64 m32"
+TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "mx32", "${X86ARCHX32}", "" ,d)}"
+ABIEXTENSION .= "${@bb.utils.contains("TUNE_FEATURES", "mx32", "x32", "" ,d)}"
+TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-mx32", "", d)}"
+TUNE_LDARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-m elf32_x86_64", "", d)}"
+TUNE_ASARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-x32", "", d)}"
+
 # ELF64 ABI
 TUNEVALID[m64] = "IA32e (x86_64) ELF64 standard ABI"
-TUNECONFLICT[m64] = "m32"
+TUNECONFLICT[m64] = "m32 mx32"
 TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "m64", "${X86ARCH64}", "" ,d)}"
+ABIEXTENSION .= "${@bb.utils.contains("TUNE_FEATURES", "m64", "64", "" ,d)}"
 TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "m64", "-m64", "", d)}"
 
 TUNE_PKGARCH ?= "${@bb.utils.contains("TUNE_FEATURES", "m32", "x86", "x86_64", d)}"
@@ -30,4 +42,9 @@  PACKAGE_EXTRA_ARCHS_tune-x86 = "x86"
 AVAILTUNES += "x86-64"
 TUNE_FEATURES_tune-x86-64 ?= "m64"
 BASE_LIB_tune-x86-64 ?= "lib64"
-PACKAGE_EXTRA_ARCHS_tune-x86-64 = "x86_64"
+PACKAGE_EXTRA_ARCHS_tune-x86-64 = "x86-64"
+
+AVAILTUNES += "x86-64-x32"
+TUNE_FEATURES_tune-x86-64-x32 ?= "mx32"
+BASE_LIB_tune-x86-64-x32 ?= "lib"
+PACKAGE_EXTRA_ARCHS_tune-x86-64-x32 = "x86-64-x32"
diff --git a/meta/conf/machine/include/tune-core2.inc b/meta/conf/machine/include/tune-core2.inc
index 25c2226..8a4de3e 100644
--- a/meta/conf/machine/include/tune-core2.inc
+++ b/meta/conf/machine/include/tune-core2.inc
@@ -18,3 +18,7 @@  TUNE_FEATURES_tune-core2-64 ?= "${TUNE_FEATURES_tune-x86-64} core2"
 BASE_LIB_tune-core2-64 ?= "lib64"
 PACKAGE_EXTRA_ARCHS_tune-core2-64 = "${PACKAGE_EXTRA_ARCHS_tune-x86-64} core2-64"
 
+AVAILTUNES += "core2-x32"
+TUNE_FEATURES_tune-core2-x32 ?= "${TUNE_FEATURES_tune-x86-64-x32} core2"
+BASE_LIB_tune-core2-x32 ?= "lib"
+PACKAGE_EXTRA_ARCHS_tune-core2-x32 = "${PACKAGE_EXTRA_ARCHS_tune-x86-64-x32} core2-x32"
diff --git a/meta/conf/machine/include/tune-x86_64.inc b/meta/conf/machine/include/tune-x86_64.inc
index 04b0f96..50f20ba 100644
--- a/meta/conf/machine/include/tune-x86_64.inc
+++ b/meta/conf/machine/include/tune-x86_64.inc
@@ -1,3 +1,3 @@ 
 require conf/machine/include/ia32/arch-ia32.inc
 
-DEFAULTTUNE = "x86-64"
+DEFAULTTUNE ?= "x86-64"