Skip to contentSkip to conversation

new x86 ABI x32 V2 patch series

PATCH Applied [email protected] 3 participants 7 messages Aug 6, 2011 – Aug 10, 2011

lore
Share & tools
lore
#0 lore raw

cover new x86 ABI x32 V2 patch series

From: Nitin A Kamble <[email protected]>

These are the commits for the new x86_64 ABI named x32. These are changed as per the feedback received on the mailing list.

The kernel related commits are dropped from this series as Bruce is pushing them directly.

The following changes since commit da321ee54b26b11e2bd36c889c5568ae62b17ffd:

linux-yocto: pass KMACHINE to updateme, not MACHINE (2011-08-05 10:00:33 -0700)

are available in the git repository at:
git://git.pokylinux.org/poky-contrib nitin/x32.rebased
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=nitin/x32.rebased

Nitin A Kamble (3):
siteinfo.bbclass: add entries for new x86_64 ABI x32 target insane.bbclass: add entries for linux-gnux32
x86 tune inc files: add x32 abi tune parameters

 meta/classes/insane.bbclass                  |    3 +++
 meta/classes/siteinfo.bbclass                |   12 +++++++++++-
 meta/conf/machine/include/ia32/arch-ia32.inc |   19 +++++++++++++++++--
 meta/conf/machine/include/tune-core2.inc     |    4 ++++
 meta/conf/machine/include/tune-x86_64.inc    |    2 +-
 5 files changed, 36 insertions(+), 4 deletions(-)
Signature · 1 line
1.7.6
#1 lore raw

PATCH 1/3 siteinfo.bbclass: add entries for new x86_64 ABI x32 target

From: Nitin A Kamble <[email protected]>

---
 meta/classes/siteinfo.bbclass |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)
meta/classes/siteinfo.bbclass +11 -1
index 9dacd58..a61b5e5 100644
@@ -42,12 +42,14 @@ def siteinfo_data(d):
         "sh4": "endian-little bit-32 sh-common",
         "sparc": "endian-big bit-32",
         "viac3": "endian-little bit-32 ix86-common",
-        "x86_64": "endian-little bit-64",
+        "x86_64": "endian-little", # bitinfo specified in targetinfo
     }
     osinfo = {
         "darwin": "common-darwin",
         "darwin9": "common-darwin",
         "linux": "common-linux common-glibc",
+        "linux-gnu": "common-linux common-glibc",
+        "linux-gnux32": "common-linux common-glibc",
         "linux-gnueabi": "common-linux common-glibc",
         "linux-gnuspe": "common-linux common-glibc",
         "linux-uclibc": "common-linux common-uclibc",
@@ -68,6 +70,14 @@ def siteinfo_data(d):
         "powerpc-linux-uclibcspe": "powerpc-linux powerpc32-linux powerpc-linux-uclibc",
         "powerpc64-linux-gnuspe": "powerpc-linux powerpc64-linux",
         "powerpc64-linux": "powerpc-linux",
+        "x86_64-cygwin": "bit-64",
+        "x86_64-darwin": "bit-64",
+        "x86_64-darwin9": "bit-64",
+        "x86_64-linux": "bit-64",
+        "x86_64-linux-uclibc": "bit-64",
+        "x86_64-linux-gnu": "bit-64 x86_64-linux",
+        "x86_64-linux-gnux32": "bit-32 ix86-common",
+        "x86_64-mingw32": "bit-64",
     }
 
     hostarch = d.getVar("HOST_ARCH", True)
Signature · 1 line
1.7.6
#2 lore raw

PATCH 2/3 insane.bbclass: add entries for linux-gnux32

From: Nitin A Kamble <[email protected]>

For x86_64 new ABI : x32, there is a new
name for the TARGET_OS: linux-gnux32

---
 meta/classes/insane.bbclass |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
meta/classes/insane.bbclass +3 -0
index 5fb0d98..0267fad 100644
@@ -90,6 +90,9 @@ def package_qa_get_machine_dict():
                         "microblaze":   (47787,  0,    0,          False,         32),
                         "microblazeel": (47787,  0,    0,          True,          32),
                       },
+            "linux-gnux32" :       {
+                        "x86_64":     (62,     0,    0,          True,          32),
+                      },
        }
 
 
Signature · 1 line
1.7.6
#3 lore raw

PATCH 3/3 x86 tune inc files: add x32 abi tune parameters

In reply to [email protected]

From: Nitin A Kamble <[email protected]>

---
 meta/conf/machine/include/ia32/arch-ia32.inc |   19 +++++++++++++++++--
 meta/conf/machine/include/tune-core2.inc     |    4 ++++
 meta/conf/machine/include/tune-x86_64.inc    |    2 +-
 3 files changed, 22 insertions(+), 3 deletions(-)
meta/conf/machine/include/ia32/arch-ia32.inc +17 -2
index 2709440..96980d2 100644
@@ -9,13 +9,22 @@ X86ARCH64 ?= "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)}"
 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", "${X86ARCH64}", "" ,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)}"
 TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "m64", "-m64", "", d)}"
 
@@ -31,3 +40,9 @@ AVAILTUNES += "x86-64"
 TUNE_FEATURES_tune-x86-64 ?= "m64"
 BASE_LIB_tune-x86-64 ?= "lib64"
 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"
+TUNE_PKGARCH .= "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-x32", "", d)}"
meta/conf/machine/include/tune-core2.inc +4 -0
index 25c2226..78f8f4d 100644
@@ -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-64-x32"
+TUNE_FEATURES_tune-core2-64-x32 ?= "${TUNE_FEATURES_tune-x86-64-x32} core2"
+BASE_LIB_tune-core2-64-x32 ?= "lib"
+PACKAGE_EXTRA_ARCHS_tune-core2-64-x32 = "${PACKAGE_EXTRA_ARCHS_tune-x86-64-x32} core2-64-x32"
meta/conf/machine/include/tune-x86_64.inc +1 -1
index 04b0f96..50f20ba 100644
@@ -1,3 +1,3 @@
 require conf/machine/include/ia32/arch-ia32.inc
 
-DEFAULTTUNE = "x86-64"
+DEFAULTTUNE ?= "x86-64"
Signature · 1 line
1.7.6
#4 lore raw

Re: [PATCH 3/3] x86 tune inc files: add x32 abi tune parameters

[email protected] wrote on 2011-08-06:

Quoted 72 lines

From: Nitin A Kamble <[email protected]>

---
 meta/conf/machine/include/ia32/arch-ia32.inc |   19 +++++++++++++++++--
 meta/conf/machine/include/tune-core2.inc     |    4 ++++
 meta/conf/machine/include/tune-x86_64.inc    |    2 +-
 3 files changed, 22 insertions(+), 3 deletions(-)
(quoted diff) +0 -0

b/meta/conf/machine/include/ia32/arch-ia32.inc index 2709440..96980d2 100644 --- a/meta/conf/machine/include/ia32/arch-ia32.inc +++ b/meta/conf/machine/include/ia32/arch-ia32.inc @@ -9,13 +9,22 @@ X86ARCH64 ?= "x86_64"

# ELF32 ABI
TUNEVALID[m32] = "IA32 ELF32 standard ABI"

(quoted diff) +1 -1
-TUNECONFLICTS[m32] = "m64"
+TUNECONFLICTS[m32] = "m64 mx32"
 TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "m32",
 "${X86ARCH32}", "" ,d)}" TUNE_CCARGS +=
 "${@bb.utils.contains("TUNE_FEATURES", "m32", "-m32",

"", d)}"

meta/conf/machine/include/ia32/arch-ia32.inc +4 -0
+# x32 ABI
+TUNEVALID[mx32] = "IA32e (x86_64) ELF32 standard ABI"
+TUNECONFLICTS[mx32] = "m64 m32"
+TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "mx32",

"${X86ARCH64}", "" ,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)}"

meta/conf/machine/include/ia32/arch-ia32.inc +2 -1
+
 # 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)}" TUNE_CCARGS +=
 "${@bb.utils.contains("TUNE_FEATURES", "m64", "-m64",

"", d)}"

meta/conf/machine/include/ia32/arch-ia32.inc +2 -0
@@ -31,3 +40,9 @@ AVAILTUNES += "x86-64"
 TUNE_FEATURES_tune-x86-64 ?= "m64"
 BASE_LIB_tune-x86-64 ?= "lib64"
 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" +TUNE_PKGARCH .= "${@bb.utils.contains("TUNE_FEATURES", "mx32", +"-x32", "", d)}" diff --git a/meta/conf/machine/include/tune-core2.inc b/meta/conf/machine/include/tune-core2.inc index 25c2226..78f8f4d 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-64-x32" +TUNE_FEATURES_tune-core2-64-x32 ?= "${TUNE_FEATURES_tune-x86-64-x32} core2" +BASE_LIB_tune-core2-64-x32 ?= "lib" +PACKAGE_EXTRA_ARCHS_tune-core2-64-x32 = "${PACKAGE_EXTRA_ARCHS_tune-x86-64-x32} core2-64-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

meta/conf/machine/include/tune-x86_64.inc line 3

Quoted 2 lines
meta/conf/machine/include/tune-x86_64.inc +1 -1
-DEFAULTTUNE = "x86-64"
+DEFAULTTUNE ?= "x86-64"

Well, it seems this "?=" has no effect here because DEFAULTTUNE is already "?="ed in arch-ia32.inc. Now machine qemux86-64 has the incorrect TUNE_ARCH of i586.

Best Regards,
-Lianhao

#5 lore raw

Re: [PATCH 3/3] x86 tune inc files: add x32 abi tune parameters

Quoted 64 lines · Lianhao

[email protected] wrote on 2011-08-06:

Quoted 63 lines

From: Nitin A Kamble <[email protected]>

---
 meta/conf/machine/include/ia32/arch-ia32.inc |   19 +++++++++++++++++--
 meta/conf/machine/include/tune-core2.inc     |    4 ++++
 meta/conf/machine/include/tune-x86_64.inc    |    2 +-
 3 files changed, 22 insertions(+), 3 deletions(-)
(quoted diff) +0 -0

b/meta/conf/machine/include/ia32/arch-ia32.inc index 2709440..96980d2 100644 --- a/meta/conf/machine/include/ia32/arch-ia32.inc +++ b/meta/conf/machine/include/ia32/arch-ia32.inc @@ -9,13 +9,22 @@ X86ARCH64 ?= "x86_64"

# ELF32 ABI
TUNEVALID[m32] = "IA32 ELF32 standard ABI"

(quoted diff) +1 -1
-TUNECONFLICTS[m32] = "m64"
+TUNECONFLICTS[m32] = "m64 mx32"
 TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "m32",
 "${X86ARCH32}", "" ,d)}" TUNE_CCARGS +=
 "${@bb.utils.contains("TUNE_FEATURES", "m32", "-m32",

"", d)}"

meta/conf/machine/include/ia32/arch-ia32.inc +4 -0
+# x32 ABI
+TUNEVALID[mx32] = "IA32e (x86_64) ELF32 standard ABI"
+TUNECONFLICTS[mx32] = "m64 m32"
+TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "mx32",

"${X86ARCH64}", "" ,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)}"

meta/conf/machine/include/ia32/arch-ia32.inc +2 -1
+
 # 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)}" TUNE_CCARGS +=
 "${@bb.utils.contains("TUNE_FEATURES", "m64", "-m64",

"", d)}"

meta/conf/machine/include/ia32/arch-ia32.inc +2 -0
@@ -31,3 +40,9 @@ AVAILTUNES += "x86-64"
 TUNE_FEATURES_tune-x86-64 ?= "m64"
 BASE_LIB_tune-x86-64 ?= "lib64"
 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" +TUNE_PKGARCH .= "${@bb.utils.contains("TUNE_FEATURES", "mx32", +"-x32", "", d)}" diff --git a/meta/conf/machine/include/tune-core2.inc b/meta/conf/machine/include/tune-core2.inc index 25c2226..78f8f4d 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"

Quoted 13 lines

meta/conf/machine/include/tune-x86_64.inc line 3

Quoted 11 lines

+AVAILTUNES += "core2-64-x32" +TUNE_FEATURES_tune-core2-64-x32 ?= "${TUNE_FEATURES_tune-x86-64-x32} core2" +BASE_LIB_tune-core2-64-x32 ?= "lib" +PACKAGE_EXTRA_ARCHS_tune-core2-64-x32 = "${PACKAGE_EXTRA_ARCHS_tune-x86-64-x32} core2-64-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

meta/conf/machine/include/tune-x86_64.inc +1 -1
-DEFAULTTUNE = "x86-64"
+DEFAULTTUNE ?= "x86-64"

Well, it seems this "?=" has no effect here because DEFAULTTUNE is already "?="ed in arch-ia32.inc. Now machine qemux86-64 has the incorrect TUNE_ARCH of i586.

Good catch, it should be *before* the require too (like many of the other similar files). I'll fix this.

Cheers,

Richard

#6 lore raw
In reply to [email protected]
Quoted 12 lines · On Fri, 2011-08-05 at 10:42 -0700, [email protected] wrote:

From: Nitin A Kamble <[email protected]>

These are the commits for the new x86_64 ABI named x32. These are changed as per the feedback received on the mailing list.

The kernel related commits are dropped from this series as Bruce is pushing them directly.

The following changes since commit da321ee54b26b11e2bd36c889c5568ae62b17ffd:

linux-yocto: pass KMACHINE to updateme, not MACHINE (2011-08-05 10:00:33 -0700)

Quoted 8 lines

are available in the git repository at:
git://git.pokylinux.org/poky-contrib nitin/x32.rebased
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=nitin/x32.rebased

Nitin A Kamble (3):
siteinfo.bbclass: add entries for new x86_64 ABI x32 target insane.bbclass: add entries for linux-gnux32
x86 tune inc files: add x32 abi tune parameters

Merged to master, thanks.

Richard