* [PATCH 01/10] arch-ia32: rearrange tune configuration
2012-02-22 6:37 [PATCH 00/10] Enable multilib for target gcc nitin.a.kamble
@ 2012-02-22 6:37 ` nitin.a.kamble
2012-02-22 6:37 ` [PATCH 02/10] arch-ia32.inc: restructure TUNE_ARCH definition nitin.a.kamble
` (8 subsequent siblings)
9 siblings, 0 replies; 13+ messages in thread
From: nitin.a.kamble @ 2012-02-22 6:37 UTC (permalink / raw)
To: openembedded-core
From: Nitin A Kamble <nitin.a.kamble@intel.com>
This makes tune names arch specific.
there is no functional change here.
This is done for multilib enabling of gcc recipe.
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
---
meta/conf/machine/include/ia32/arch-ia32.inc | 45 ++++++++++++++------------
1 files changed, 24 insertions(+), 21 deletions(-)
diff --git a/meta/conf/machine/include/ia32/arch-ia32.inc b/meta/conf/machine/include/ia32/arch-ia32.inc
index 0931c26..ced9dbe 100644
--- a/meta/conf/machine/include/ia32/arch-ia32.inc
+++ b/meta/conf/machine/include/ia32/arch-ia32.inc
@@ -8,42 +8,45 @@ X86ARCH32 ?= "i586"
X86ARCH64 ?= "x86_64"
# ELF32 ABI
-TUNEVALID[m32] = "IA32 ELF32 standard ABI"
-TUNECONFLICTS[m32] = "m64 mx32"
-TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "m32", "${X86ARCH32}", "" ,d)}"
-TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "m32", "-m32", "", d)}"
-MACHINEOVERRIDES .= "${@bb.utils.contains("TUNE_FEATURES", "m32", ":x86", "" ,d)}"
+TUNEVALID[x86-m32] = "IA32 ELF32 standard ABI"
+TUNECONFLICTS[x86-m32] = "x86-64-m64 x86-64-mx32"
+TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "x86-m32", "${X86ARCH32}", "" ,d)}"
+TUNE_FEATURE_CCARGS-x86-m32 ?= "-m32"
+TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "x86-m32", "${TUNE_FEATURE_CCARGS-x86-m32}", "", d)}"
+MACHINEOVERRIDES .= "${@bb.utils.contains("TUNE_FEATURES", "x86-m32", ":x86", "" ,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)}"
+TUNEVALID[x86-64-mx32] = "IA32e (x86_64) ELF32 standard ABI"
+TUNECONFLICTS[x86-64-mx32] = "x86-64-m64 x86-m32"
+TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "x86-64-mx32", "${X86ARCH64}", "" ,d)}"
+ABIEXTENSION .= "${@bb.utils.contains("TUNE_FEATURES", "x86-64-mx32", "x32", "" ,d)}"
+TUNE_FEATURE_CCARGS-x86-64-mx32 ?= "-mx32"
+TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "x86-64-mx32", "${TUNE_FEATURE_CCARGS-x86-64-mx32}", "", d)}"
+TUNE_LDARGS += "${@bb.utils.contains("TUNE_FEATURES", "x86-64-mx32", "-m elf32_x86_64", "", d)}"
+TUNE_ASARGS += "${@bb.utils.contains("TUNE_FEATURES", "x86-64-mx32", "-x32", "", d)}"
# ELF64 ABI
-TUNEVALID[m64] = "IA32e (x86_64) ELF64 standard ABI"
-TUNECONFLICT[m64] = "m32 mx32"
-TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "m64", "${X86ARCH64}", "" ,d)}"
-TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "m64", "-m64", "", d)}"
+TUNEVALID[x86-64-m64] = "IA32e (x86_64) ELF64 standard ABI"
+TUNECONFLICT[x86-64-m64] = "x86-m32 x86-64-mx32"
+TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "x86-64-m64", "${X86ARCH64}", "" ,d)}"
+TUNE_FEATURE_CCARGS-x86-64-m64 ?= "-m64"
+TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "x86-64-m64", "${TUNE_FEATURE_CCARGS-x86-64-m64}", "", d)}"
-TUNE_PKGARCH ?= "${@bb.utils.contains("TUNE_FEATURES", "m32", "x86", "x86_64", d)}"
+TUNE_PKGARCH ?= "${@bb.utils.contains("TUNE_FEATURES", "x86-m32", "x86", "x86_64", d)}"
# Default Tune configurations
AVAILTUNES += "x86"
-TUNE_FEATURES_tune-x86 ?= "m32"
+TUNE_FEATURES_tune-x86 ?= "x86-m32"
BASE_LIB_tune-x86 ?= "lib"
PACKAGE_EXTRA_ARCHS_tune-x86 = "x86"
AVAILTUNES += "x86-64"
-TUNE_FEATURES_tune-x86-64 ?= "m64"
+TUNE_FEATURES_tune-x86-64 ?= "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"
+TUNE_FEATURES_tune-x86-64-x32 ?= "x86-64-mx32"
BASE_LIB_tune-x86-64-x32 ?= "libx32"
PACKAGE_EXTRA_ARCHS_tune-x86-64-x32 = "x86_64_x32"
-TUNE_PKGARCH .= "${@bb.utils.contains("TUNE_FEATURES", "mx32", "_x32", "", d)}"
+TUNE_PKGARCH .= "${@bb.utils.contains("TUNE_FEATURES", "x86-64-mx32", "_x32", "", d)}"
--
1.7.6.4
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH 02/10] arch-ia32.inc: restructure TUNE_ARCH definition
2012-02-22 6:37 [PATCH 00/10] Enable multilib for target gcc nitin.a.kamble
2012-02-22 6:37 ` [PATCH 01/10] arch-ia32: rearrange tune configuration nitin.a.kamble
@ 2012-02-22 6:37 ` nitin.a.kamble
2012-02-22 6:37 ` [PATCH 03/10] arch-mips.inc: rearrange for gcc-multilib nitin.a.kamble
` (7 subsequent siblings)
9 siblings, 0 replies; 13+ messages in thread
From: nitin.a.kamble @ 2012-02-22 6:37 UTC (permalink / raw)
To: openembedded-core
From: Nitin A Kamble <nitin.a.kamble@intel.com>
So that multilib code can find out TUNE_ARCH for any tune.
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
---
meta/conf/machine/include/ia32/arch-ia32.inc | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/meta/conf/machine/include/ia32/arch-ia32.inc b/meta/conf/machine/include/ia32/arch-ia32.inc
index ced9dbe..aff3b88 100644
--- a/meta/conf/machine/include/ia32/arch-ia32.inc
+++ b/meta/conf/machine/include/ia32/arch-ia32.inc
@@ -4,13 +4,12 @@
DEFAULTTUNE ?= "x86"
TARGET_FPU ?= ""
-X86ARCH32 ?= "i586"
-X86ARCH64 ?= "x86_64"
# ELF32 ABI
TUNEVALID[x86-m32] = "IA32 ELF32 standard ABI"
TUNECONFLICTS[x86-m32] = "x86-64-m64 x86-64-mx32"
-TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "x86-m32", "${X86ARCH32}", "" ,d)}"
+TUNE_FEATURE_ARCH-x86-m32 = "i586"
+TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "x86-m32", "${TUNE_FEATURE_ARCH-x86-m32}", "" ,d)}"
TUNE_FEATURE_CCARGS-x86-m32 ?= "-m32"
TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "x86-m32", "${TUNE_FEATURE_CCARGS-x86-m32}", "", d)}"
MACHINEOVERRIDES .= "${@bb.utils.contains("TUNE_FEATURES", "x86-m32", ":x86", "" ,d)}"
@@ -18,7 +17,8 @@ MACHINEOVERRIDES .= "${@bb.utils.contains("TUNE_FEATURES", "x86-m32", ":x86", ""
# x32 ABI
TUNEVALID[x86-64-mx32] = "IA32e (x86_64) ELF32 standard ABI"
TUNECONFLICTS[x86-64-mx32] = "x86-64-m64 x86-m32"
-TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "x86-64-mx32", "${X86ARCH64}", "" ,d)}"
+TUNE_FEATURE_ARCH-x86-64-mx32 = "x86_64"
+TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "x86-64-mx32", "${TUNE_FEATURE_ARCH-x86-64-mx32}", "" ,d)}"
ABIEXTENSION .= "${@bb.utils.contains("TUNE_FEATURES", "x86-64-mx32", "x32", "" ,d)}"
TUNE_FEATURE_CCARGS-x86-64-mx32 ?= "-mx32"
TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "x86-64-mx32", "${TUNE_FEATURE_CCARGS-x86-64-mx32}", "", d)}"
@@ -28,7 +28,8 @@ TUNE_ASARGS += "${@bb.utils.contains("TUNE_FEATURES", "x86-64-mx32", "-x32", "",
# ELF64 ABI
TUNEVALID[x86-64-m64] = "IA32e (x86_64) ELF64 standard ABI"
TUNECONFLICT[x86-64-m64] = "x86-m32 x86-64-mx32"
-TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "x86-64-m64", "${X86ARCH64}", "" ,d)}"
+TUNE_FEATURE_ARCH-x86-64-m64 = "x86_64"
+TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "x86-64-m64", "${TUNE_FEATURE_ARCH-x86-64-m64}", "" ,d)}"
TUNE_FEATURE_CCARGS-x86-64-m64 ?= "-m64"
TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "x86-64-m64", "${TUNE_FEATURE_CCARGS-x86-64-m64}", "", d)}"
--
1.7.6.4
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH 03/10] arch-mips.inc: rearrange for gcc-multilib
2012-02-22 6:37 [PATCH 00/10] Enable multilib for target gcc nitin.a.kamble
2012-02-22 6:37 ` [PATCH 01/10] arch-ia32: rearrange tune configuration nitin.a.kamble
2012-02-22 6:37 ` [PATCH 02/10] arch-ia32.inc: restructure TUNE_ARCH definition nitin.a.kamble
@ 2012-02-22 6:37 ` nitin.a.kamble
2012-02-22 6:37 ` [PATCH 04/10] arch-mips.inc: define TUNE_FEATURE_ARCH vars for multilib tunes nitin.a.kamble
` (6 subsequent siblings)
9 siblings, 0 replies; 13+ messages in thread
From: nitin.a.kamble @ 2012-02-22 6:37 UTC (permalink / raw)
To: openembedded-core
From: Nitin A Kamble <nitin.a.kamble@intel.com>
make tune feature names mips specific
no functional changes here
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
---
meta/conf/machine/include/mips/arch-mips.inc | 65 +++++++++++++------------
1 files changed, 34 insertions(+), 31 deletions(-)
diff --git a/meta/conf/machine/include/mips/arch-mips.inc b/meta/conf/machine/include/mips/arch-mips.inc
index b7ded76..b674d66 100644
--- a/meta/conf/machine/include/mips/arch-mips.inc
+++ b/meta/conf/machine/include/mips/arch-mips.inc
@@ -7,61 +7,64 @@
DEFAULTTUNE ?= "mips"
# Endianess
-TUNEVALID[bigendian] = "Enable big-endian mode"
-TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "bigendian", "-meb", "-mel", d)}"
+TUNEVALID[mips-bigendian] = "Enable big-endian mode"
+TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "mips-bigendian", "-meb", "-mel", d)}"
# ABI flags
-TUNEVALID[o32] = "MIPS o32 ABI"
-TUNECONFLICT[o32] = "n32 n64"
-TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "o32", "-mabi=32", "", d)}"
+TUNEVALID[mips-o32] = "MIPS o32 ABI"
+TUNECONFLICT[mips-o32] = "mips-n32 mips-n64"
+TUNE_FEATURE_CCARGS-mips-o32 ?= "-mabi=32"
+TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "mips-o32", "${TUNE_FEATURE_CCARGS-mips-o32}", "", d)}"
-TUNEVALID[n32] = "MIPS64 n32 ABI"
-TUNECONFLICT[n32] = "o32 n64"
-TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "n32", "-mabi=n32", "", d)}"
+TUNEVALID[mips-n32] = "MIPS64 n32 ABI"
+TUNECONFLICT[mips-n32] = "mips-o32 mips-n64"
+TUNE_FEATURE_CCARGS-mips-n32 ?= "-mabi=n32"
+TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "mips-n32", "${TUNE_FEATURE_CCARGS-mips-n32}", "", d)}"
-TUNEVALID[n64] = "MIPS64 n64 ABI"
-TUNECONFLICT[n64] = "o32 n32"
-TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "n64", "-mabi=64", "", d)}"
+TUNEVALID[mips-n64] = "MIPS64 n64 ABI"
+TUNECONFLICT[mips-n64] = "mips-o32 mips-n32"
+TUNE_FEATURE_CCARGS-mips-n64 ?= "-mabi=64"
+TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "mips-n64", "${TUNE_FEATURE_CCARGS-mips-n64}", "", d)}"
# Floating point
-TUNEVALID[fpu-hard] = "Use hardware FPU"
-TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "fpu-hard", "-mhard-float", "-msoft-float", d)}"
-TARGET_FPU = "${@bb.utils.contains("TUNE_FEATURES", "fpu-hard", "", "soft", d)}"
+TUNEVALID[mips-fpu-hard] = "Use hardware FPU"
+TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "mips-fpu-hard", "-mhard-float", "-msoft-float", d)}"
+TARGET_FPU = "${@bb.utils.contains("TUNE_FEATURES", "mips-fpu-hard", "", "soft", d)}"
# Package naming
-MIPSPKGSFX_ENDIAN = "${@bb.utils.contains("TUNE_FEATURES", "bigendian", "", "el", d)}"
-MIPSPKGSFX_BYTE = "${@bb.utils.contains("TUNE_FEATURES", "n64" , "64", "", d)}"
-MIPSPKGSFX_BYTE .= "${@bb.utils.contains("TUNE_FEATURES", "n32" , "64", "", d)}"
-MIPSPKGSFX_FPU = "${@bb.utils.contains("TUNE_FEATURES", "fpu-hard" , "", "-nf", d)}"
-MIPSPKGSFX_ABI = "${@bb.utils.contains("TUNE_FEATURES", "n32", "-n32", "", d)}"
+MIPSPKGSFX_ENDIAN = "${@bb.utils.contains("TUNE_FEATURES", "mips-bigendian", "", "el", d)}"
+MIPSPKGSFX_BYTE = "${@bb.utils.contains("TUNE_FEATURES", "mips-n64" , "64", "", d)}"
+MIPSPKGSFX_BYTE .= "${@bb.utils.contains("TUNE_FEATURES", "mips-n32" , "64", "", d)}"
+MIPSPKGSFX_FPU = "${@bb.utils.contains("TUNE_FEATURES", "mips-fpu-hard" , "", "-nf", d)}"
+MIPSPKGSFX_ABI = "${@bb.utils.contains("TUNE_FEATURES", "mips-n32", "-n32", "", d)}"
TUNE_ARCH = "mips${MIPSPKGSFX_BYTE}${MIPSPKGSFX_ENDIAN}"
TUNE_PKGARCH ?= "${TUNE_ARCH}${MIPSPKGSFX_FPU}${MIPSPKGSFX_ABI}"
# Base tunes
AVAILTUNES += "mips mips64-n32 mips64 mipsel mips64el-n32 mips64el mips-nf mips64-nf-n32 mips64-nf mipsel-nf mips64el-nf-n32 mips64el-nf"
-TUNE_FEATURES_tune-mips = "o32 bigendian fpu-hard"
+TUNE_FEATURES_tune-mips = "mips-o32 mips-bigendian mips-fpu-hard"
BASE_LIB_tune-mips = "lib"
-TUNE_FEATURES_tune-mips64-n32 = "n32 bigendian fpu-hard"
+TUNE_FEATURES_tune-mips64-n32 = "mips-n32 mips-bigendian mips-fpu-hard"
BASE_LIB_tune-mips64-n32 = "lib32"
-TUNE_FEATURES_tune-mips64 = "n64 bigendian fpu-hard"
+TUNE_FEATURES_tune-mips64 = "mips-n64 mips-bigendian mips-fpu-hard"
BASE_LIB_tune-mips64 = "lib64"
-TUNE_FEATURES_tune-mipsel = "o32 fpu-hard"
+TUNE_FEATURES_tune-mipsel = "mips-o32 mips-fpu-hard"
BASE_LIB_tune-mipsel = "lib"
-TUNE_FEATURES_tune-mips64el-n32 = "n32 fpu-hard"
+TUNE_FEATURES_tune-mips64el-n32 = "mips-n32 mips-fpu-hard"
BASE_LIB_tune-mips64el-n32 = "lib32"
-TUNE_FEATURES_tune-mips64el = "n64 fpu-hard"
+TUNE_FEATURES_tune-mips64el = "mips-n64 mips-fpu-hard"
BASE_LIB_tune-mips64el = "lib64"
-TUNE_FEATURES_tune-mips-nf = "o32 bigendian"
+TUNE_FEATURES_tune-mips-nf = "mips-o32 mips-bigendian"
BASE_LIB_tune-mips-nf = "lib"
-TUNE_FEATURES_tune-mips64-nf-n32 = "n32 bigendian"
+TUNE_FEATURES_tune-mips64-nf-n32 = "mips-n32 mips-bigendian"
BASE_LIB_tune-mips64-nf-n32 = "lib32"
-TUNE_FEATURES_tune-mips64-nf = "n64 bigendian"
+TUNE_FEATURES_tune-mips64-nf = "mips-n64 mips-bigendian"
BASE_LIB_tune-mips64-nf = "lib64"
-TUNE_FEATURES_tune-mipsel-nf = "o32"
+TUNE_FEATURES_tune-mipsel-nf = "mips-o32"
BASE_LIB_tune-mipsel-nf = "lib"
-TUNE_FEATURES_tune-mips64el-nf-n32 = "n32"
+TUNE_FEATURES_tune-mips64el-nf-n32 = "mips-n32"
BASE_LIB_tune-mips64el-nf-n32 = "lib32"
-TUNE_FEATURES_tune-mips64el-nf = "n64"
+TUNE_FEATURES_tune-mips64el-nf = "mips-n64"
BASE_LIB_tune-mips64el-nf = "lib64"
--
1.7.6.4
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH 04/10] arch-mips.inc: define TUNE_FEATURE_ARCH vars for multilib tunes
2012-02-22 6:37 [PATCH 00/10] Enable multilib for target gcc nitin.a.kamble
` (2 preceding siblings ...)
2012-02-22 6:37 ` [PATCH 03/10] arch-mips.inc: rearrange for gcc-multilib nitin.a.kamble
@ 2012-02-22 6:37 ` nitin.a.kamble
2012-02-22 6:37 ` [PATCH 05/10] arch-powerpc*.inc: rearrange for gcc-multilib nitin.a.kamble
` (5 subsequent siblings)
9 siblings, 0 replies; 13+ messages in thread
From: nitin.a.kamble @ 2012-02-22 6:37 UTC (permalink / raw)
To: openembedded-core
From: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
---
meta/conf/machine/include/mips/arch-mips.inc | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/meta/conf/machine/include/mips/arch-mips.inc b/meta/conf/machine/include/mips/arch-mips.inc
index b674d66..f081cd8 100644
--- a/meta/conf/machine/include/mips/arch-mips.inc
+++ b/meta/conf/machine/include/mips/arch-mips.inc
@@ -15,16 +15,19 @@ TUNEVALID[mips-o32] = "MIPS o32 ABI"
TUNECONFLICT[mips-o32] = "mips-n32 mips-n64"
TUNE_FEATURE_CCARGS-mips-o32 ?= "-mabi=32"
TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "mips-o32", "${TUNE_FEATURE_CCARGS-mips-o32}", "", d)}"
+TUNE_FEATURE_ARCH-mips-o32 = "mips${MIPSPKGSFX_BYTE}${MIPSPKGSFX_ENDIAN}"
TUNEVALID[mips-n32] = "MIPS64 n32 ABI"
TUNECONFLICT[mips-n32] = "mips-o32 mips-n64"
TUNE_FEATURE_CCARGS-mips-n32 ?= "-mabi=n32"
TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "mips-n32", "${TUNE_FEATURE_CCARGS-mips-n32}", "", d)}"
+TUNE_FEATURE_ARCH-mips-n32 = "mips${MIPSPKGSFX_BYTE}${MIPSPKGSFX_ENDIAN}"
TUNEVALID[mips-n64] = "MIPS64 n64 ABI"
TUNECONFLICT[mips-n64] = "mips-o32 mips-n32"
TUNE_FEATURE_CCARGS-mips-n64 ?= "-mabi=64"
TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "mips-n64", "${TUNE_FEATURE_CCARGS-mips-n64}", "", d)}"
+TUNE_FEATURE_ARCH-mips-n64 = "mips${MIPSPKGSFX_BYTE}${MIPSPKGSFX_ENDIAN}"
# Floating point
TUNEVALID[mips-fpu-hard] = "Use hardware FPU"
--
1.7.6.4
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH 05/10] arch-powerpc*.inc: rearrange for gcc-multilib
2012-02-22 6:37 [PATCH 00/10] Enable multilib for target gcc nitin.a.kamble
` (3 preceding siblings ...)
2012-02-22 6:37 ` [PATCH 04/10] arch-mips.inc: define TUNE_FEATURE_ARCH vars for multilib tunes nitin.a.kamble
@ 2012-02-22 6:37 ` nitin.a.kamble
2012-02-22 6:37 ` [PATCH 06/10] arch-powerpc*.inc: rearrange TUNE_ARCH definition nitin.a.kamble
` (4 subsequent siblings)
9 siblings, 0 replies; 13+ messages in thread
From: nitin.a.kamble @ 2012-02-22 6:37 UTC (permalink / raw)
To: openembedded-core
From: Nitin A Kamble <nitin.a.kamble@intel.com>
make tune_feature names ppc specific
no functional change here
this helps gcc multilib code get tune parameter for any tune.
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
---
meta/conf/machine/include/powerpc/arch-powerpc.inc | 24 ++++++++++---------
.../machine/include/powerpc/arch-powerpc64.inc | 11 +++++----
2 files changed, 19 insertions(+), 16 deletions(-)
diff --git a/meta/conf/machine/include/powerpc/arch-powerpc.inc b/meta/conf/machine/include/powerpc/arch-powerpc.inc
index 8347f86..70f7a18 100644
--- a/meta/conf/machine/include/powerpc/arch-powerpc.inc
+++ b/meta/conf/machine/include/powerpc/arch-powerpc.inc
@@ -5,30 +5,32 @@
DEFAULTTUNE ?= "powerpc"
-TUNEVALID[m32] = "Power ELF32 standard ABI"
-TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "m32", "-m32", "", d)}"
-TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "m32", "powerpc", "", d)}"
+TUNEVALID[ppc-m32] = "Power ELF32 standard ABI"
+TUNE_FEATURE_CCARGS-ppc-m32 ?= "-m32"
+TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "ppc-m32", "${TUNE_FEATURE_CCARGS-ppc-m32}", "", d)}"
+TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "ppc-m32", "powerpc", "", d)}"
-TUNEVALID[fpu-hard] = "Use hardware FPU."
-TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "fpu-hard", "-mhard-float", "", d)}"
+TUNEVALID[ppc-fpu-hard] = "Use hardware FPU."
+TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "ppc-fpu-hard", "-mhard-float", "", d)}"
-TUNEVALID[fpu-soft] = "Use software FPU."
-TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "fpu-soft", "-msoft-float", "", d)}"
-TARGET_FPU .= "${@bb.utils.contains("TUNE_FEATURES", "fpu-soft", "soft", "", d)}"
+TUNEVALID[ppc-fpu-soft] = "Use software FPU."
+TUNE_FEATURE_CCARGS-ppc-fpu-soft ?= "-msoft-float"
+TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "ppc-fpu-soft", "${TUNE_FEATURE_CCARGS-ppc-fpu-soft}", "", d)}"
+TARGET_FPU .= "${@bb.utils.contains("TUNE_FEATURES", "ppc-fpu-soft", "soft", "", d)}"
ABIEXTENSION = "${@['','spe'][d.getVar('TARGET_FPU', True) in ['ppc-efd', 'ppc-efs']]}"
-PPCPKGSFX_FPU = "${@bb.utils.contains("TUNE_FEATURES", "fpu-hard" , "", "-nf", d)}"
+PPCPKGSFX_FPU = "${@bb.utils.contains("TUNE_FEATURES", "ppc-fpu-hard" , "", "-nf", d)}"
PPCPKGARCH = "${TUNE_ARCH}${PPCPKGSFX_FPU}"
TUNE_PKGARCH ?= "${PPCPKGARCH}"
# Basic tune definitions
AVAILTUNES += "powerpc powerpc-nf"
-TUNE_FEATURES_tune-powerpc-nf ?= "m32 fpu-soft"
+TUNE_FEATURES_tune-powerpc-nf ?= "ppc-m32 ppc-fpu-soft"
BASE_LIB_tune-powerpc-nf = "lib"
PACKAGE_EXTRA_ARCHS_tune-powerpc-nf = "powerpc-nf"
-TUNE_FEATURES_tune-powerpc ?= "m32 fpu-hard"
+TUNE_FEATURES_tune-powerpc ?= "ppc-m32 ppc-fpu-hard"
BASE_LIB_tune-powerpc = "lib"
PACKAGE_EXTRA_ARCHS_tune-powerpc = "${PACKAGE_EXTRA_ARCHS_tune-powerpc-nf} powerpc"
diff --git a/meta/conf/machine/include/powerpc/arch-powerpc64.inc b/meta/conf/machine/include/powerpc/arch-powerpc64.inc
index 7ef8ddc..edbc07c 100644
--- a/meta/conf/machine/include/powerpc/arch-powerpc64.inc
+++ b/meta/conf/machine/include/powerpc/arch-powerpc64.inc
@@ -2,11 +2,12 @@ DEFAULTTUNE ?= "powerpc64"
require conf/machine/include/powerpc/arch-powerpc.inc
-TUNEVALID[m64] = "Power ELF64 standard ABI"
-TUNE_CONFLICTS[m64] = "m32 nf"
-TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "m64", "-m64", "", d)}"
-TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", [ "m64" ], "powerpc64", "", d)}"
+TUNEVALID[ppc-m64] = "Power ELF64 standard ABI"
+TUNE_CONFLICTS[ppc-m64] = "ppc-m32 ppc-nf"
+TUNE_FEATURE_CCARGS-ppc-m64 ?= "-m64"
+TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "ppc-m64", "${TUNE_FEATURE_CCARGS-ppc-m64}", "", d)}"
+TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", [ "ppc-m64" ], "powerpc64", "", d)}"
AVAILTUNES += "powerpc64"
-TUNE_FEATURES_tune-powerpc64 ?= "m64 fpu-hard"
+TUNE_FEATURES_tune-powerpc64 ?= "ppc-m64 ppc-fpu-hard"
BASE_LIB_tune-powerpc64 = "lib64"
--
1.7.6.4
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH 06/10] arch-powerpc*.inc: rearrange TUNE_ARCH definition
2012-02-22 6:37 [PATCH 00/10] Enable multilib for target gcc nitin.a.kamble
` (4 preceding siblings ...)
2012-02-22 6:37 ` [PATCH 05/10] arch-powerpc*.inc: rearrange for gcc-multilib nitin.a.kamble
@ 2012-02-22 6:37 ` nitin.a.kamble
2012-02-22 6:37 ` [PATCH 07/10] gcc: remove the 64bithack patch nitin.a.kamble
` (3 subsequent siblings)
9 siblings, 0 replies; 13+ messages in thread
From: nitin.a.kamble @ 2012-02-22 6:37 UTC (permalink / raw)
To: openembedded-core
From: Nitin A Kamble <nitin.a.kamble@intel.com>
This helps gcc mutlilib code find definitions used by various tunes
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
---
meta/conf/machine/include/powerpc/arch-powerpc.inc | 3 ++-
.../machine/include/powerpc/arch-powerpc64.inc | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/meta/conf/machine/include/powerpc/arch-powerpc.inc b/meta/conf/machine/include/powerpc/arch-powerpc.inc
index 70f7a18..cd66abc 100644
--- a/meta/conf/machine/include/powerpc/arch-powerpc.inc
+++ b/meta/conf/machine/include/powerpc/arch-powerpc.inc
@@ -8,7 +8,8 @@ DEFAULTTUNE ?= "powerpc"
TUNEVALID[ppc-m32] = "Power ELF32 standard ABI"
TUNE_FEATURE_CCARGS-ppc-m32 ?= "-m32"
TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "ppc-m32", "${TUNE_FEATURE_CCARGS-ppc-m32}", "", d)}"
-TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "ppc-m32", "powerpc", "", d)}"
+TUNE_FEATURE_ARCH-ppc-m32 = "powerpc"
+TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "ppc-m32", "${TUNE_FEATURE_ARCH-ppc-m32}", "" ,d)}"
TUNEVALID[ppc-fpu-hard] = "Use hardware FPU."
TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "ppc-fpu-hard", "-mhard-float", "", d)}"
diff --git a/meta/conf/machine/include/powerpc/arch-powerpc64.inc b/meta/conf/machine/include/powerpc/arch-powerpc64.inc
index edbc07c..52e386b 100644
--- a/meta/conf/machine/include/powerpc/arch-powerpc64.inc
+++ b/meta/conf/machine/include/powerpc/arch-powerpc64.inc
@@ -6,7 +6,8 @@ TUNEVALID[ppc-m64] = "Power ELF64 standard ABI"
TUNE_CONFLICTS[ppc-m64] = "ppc-m32 ppc-nf"
TUNE_FEATURE_CCARGS-ppc-m64 ?= "-m64"
TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "ppc-m64", "${TUNE_FEATURE_CCARGS-ppc-m64}", "", d)}"
-TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", [ "ppc-m64" ], "powerpc64", "", d)}"
+TUNE_FEATURE_ARCH-ppc-m64 = "powerpc64"
+TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", [ "ppc-m64" ], "${TUNE_FEATURE_ARCH-ppc-m64}", "", d)}"
AVAILTUNES += "powerpc64"
TUNE_FEATURES_tune-powerpc64 ?= "ppc-m64 ppc-fpu-hard"
--
1.7.6.4
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH 07/10] gcc: remove the 64bithack patch
2012-02-22 6:37 [PATCH 00/10] Enable multilib for target gcc nitin.a.kamble
` (5 preceding siblings ...)
2012-02-22 6:37 ` [PATCH 06/10] arch-powerpc*.inc: rearrange TUNE_ARCH definition nitin.a.kamble
@ 2012-02-22 6:37 ` nitin.a.kamble
2012-02-22 6:37 ` [PATCH 08/10] target gcc: gcc-multilib-setup nitin.a.kamble
` (2 subsequent siblings)
9 siblings, 0 replies; 13+ messages in thread
From: nitin.a.kamble @ 2012-02-22 6:37 UTC (permalink / raw)
To: openembedded-core
From: Nitin A Kamble <nitin.a.kamble@intel.com>
and bump PR
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
---
meta/recipes-devtools/gcc/gcc-4.6.inc | 3 +-
meta/recipes-devtools/gcc/gcc-4.6/64bithack.patch | 68 ---------------------
2 files changed, 1 insertions(+), 70 deletions(-)
delete mode 100644 meta/recipes-devtools/gcc/gcc-4.6/64bithack.patch
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.inc b/meta/recipes-devtools/gcc/gcc-4.6.inc
index ece378d..3ef240b 100644
--- a/meta/recipes-devtools/gcc/gcc-4.6.inc
+++ b/meta/recipes-devtools/gcc/gcc-4.6.inc
@@ -1,6 +1,6 @@
require gcc-common.inc
-PR = "r22"
+PR = "r23"
# Third digit in PV should be incremented after a minor release
# happens from this branch on gcc e.g. currently its 4.6.0
@@ -59,7 +59,6 @@ SRC_URI = "svn://gcc.gnu.org/svn/gcc/branches;module=${BRANCH};proto=http \
file://gcc-poison-system-directories.patch \
file://gcc-poison-dir-extend.patch \
file://gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch \
- file://64bithack.patch \
file://optional_libstdc.patch \
file://disable_relax_pic_calls_flag.patch \
file://COLLECT_GCC_OPTIONS.patch \
diff --git a/meta/recipes-devtools/gcc/gcc-4.6/64bithack.patch b/meta/recipes-devtools/gcc/gcc-4.6/64bithack.patch
deleted file mode 100644
index d35753a..0000000
--- a/meta/recipes-devtools/gcc/gcc-4.6/64bithack.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-Upstream-Status: Inappropriate [embedded specific]
-
-GCC has internal multilib handling code but it assumes a very specific rigid directory
-layout. The build system implementation of multilib layout is very generic and allows
-complete customisation of the library directories.
-
-This patch is a partial solution to allow any custom directories to be passed into gcc
-and handled correctly. It forces gcc to use the base_libdir (which is the current
-directory, "."). We need to do this for each multilib that is configured as we don't
-know which compiler options may be being passed into the compiler. Since we have a compiler
-per mulitlib at this point that isn't an issue.
-
-The one problem is the target compiler is only going to work for the default multlilib at
-this point. Ideally we'd figure out which multilibs were being enabled with which paths
-and be able to patch these entries with a complete set of correct paths but this we
-don't have such code at this point. This is something the target gcc recipe should do
-and override these platform defaults in its build config.
-
-RP 15/8/11
-
-Index: gcc-4_6-branch/gcc/config/i386/t-linux64
-===================================================================
---- gcc-4_6-branch.orig/gcc/config/i386/t-linux64 2011-06-23 15:15:29.000000000 +0100
-+++ gcc-4_6-branch/gcc/config/i386/t-linux64 2011-08-15 13:09:03.772415848 +0100
-@@ -24,8 +24,8 @@
- # MULTILIB_OSDIRNAMES according to what is found on the target.
-
- MULTILIB_OPTIONS = m64/m32
--MULTILIB_DIRNAMES = 64 32
--MULTILIB_OSDIRNAMES = ../lib64 $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)
-+MULTILIB_DIRNAMES = . .
-+MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
-
- LIBGCC = stmp-multilib
- INSTALL_LIBGCC = install-multilib
-Index: gcc-4_6-branch/gcc/config/mips/t-linux64
-===================================================================
---- gcc-4_6-branch.orig/gcc/config/mips/t-linux64 2011-08-15 13:06:13.732415763 +0100
-+++ gcc-4_6-branch/gcc/config/mips/t-linux64 2011-08-15 13:09:11.452419446 +0100
-@@ -17,8 +17,8 @@
- # <http://www.gnu.org/licenses/>.
-
- MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi=64
--MULTILIB_DIRNAMES = n32 32 64
--MULTILIB_OSDIRNAMES = ../lib32 ../lib ../lib64
-+MULTILIB_DIRNAMES = . . .
-+MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
-
- EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o
-
-Index: gcc-4_6-branch/gcc/config/rs6000/t-linux64
-===================================================================
---- gcc-4_6-branch.orig/gcc/config/rs6000/t-linux64 2011-08-15 13:06:25.272415822 +0100
-+++ gcc-4_6-branch/gcc/config/rs6000/t-linux64 2011-08-15 13:09:21.062415878 +0100
-@@ -32,11 +32,11 @@
- # MULTILIB_OSDIRNAMES according to what is found on the target.
-
- MULTILIB_OPTIONS = m64/m32 msoft-float
--MULTILIB_DIRNAMES = 64 32 nof
-+MULTILIB_DIRNAMES = . . .
- MULTILIB_EXTRA_OPTS = fPIC mstrict-align
- MULTILIB_EXCEPTIONS = m64/msoft-float
- MULTILIB_EXCLUSIONS = m64/!m32/msoft-float
--MULTILIB_OSDIRNAMES = ../lib64 $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib) nof
-+MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
- MULTILIB_MATCHES = $(MULTILIB_MATCHES_FLOAT)
-
- softfp_wrap_start := '\#ifndef __powerpc64__'
--
1.7.6.4
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH 08/10] target gcc: gcc-multilib-setup
2012-02-22 6:37 [PATCH 00/10] Enable multilib for target gcc nitin.a.kamble
` (6 preceding siblings ...)
2012-02-22 6:37 ` [PATCH 07/10] gcc: remove the 64bithack patch nitin.a.kamble
@ 2012-02-22 6:37 ` nitin.a.kamble
2012-02-22 13:21 ` Richard Purdie
2012-02-22 6:37 ` [PATCH 09/10] libgcc_4.6.bb: Complete quote in definition of FILES_libgcov-dev nitin.a.kamble
2012-02-22 6:37 ` [PATCH 10/10] libgcc: get the gcc header files working nitin.a.kamble
9 siblings, 1 reply; 13+ messages in thread
From: nitin.a.kamble @ 2012-02-22 6:37 UTC (permalink / raw)
To: openembedded-core
From: Nitin A Kamble <nitin.a.kamble@intel.com>
add a task to setup multilib configuration for target gcc.
now the multilib setup file is tweeked as needed.
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
gcc-multilib-config.inc: tail
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
---
meta/recipes-devtools/gcc/gcc-configure-common.inc | 2 +-
meta/recipes-devtools/gcc/gcc-configure-target.inc | 1 +
meta/recipes-devtools/gcc/gcc-multilib-config.inc | 149 ++++++++++++++++++++
3 files changed, 151 insertions(+), 1 deletions(-)
create mode 100644 meta/recipes-devtools/gcc/gcc-multilib-config.inc
diff --git a/meta/recipes-devtools/gcc/gcc-configure-common.inc b/meta/recipes-devtools/gcc/gcc-configure-common.inc
index c4b6ac1..f4f0112 100644
--- a/meta/recipes-devtools/gcc/gcc-configure-common.inc
+++ b/meta/recipes-devtools/gcc/gcc-configure-common.inc
@@ -25,7 +25,7 @@ EXTRA_OECONF_PATHS ?= ""
EXTRA_OECONF_INITIAL ?= ""
EXTRA_OECONF_INTERMEDIATE ?= ""
-GCCMULTILIB = "--disable-multilib"
+GCCMULTILIB ?= "--disable-multilib"
EXTRA_OECONF = "${@['--enable-clocale=generic', ''][d.getVar('USE_NLS', 1) != 'no']} \
--with-gnu-ld \
diff --git a/meta/recipes-devtools/gcc/gcc-configure-target.inc b/meta/recipes-devtools/gcc/gcc-configure-target.inc
index 8b169a7..9001bcf 100644
--- a/meta/recipes-devtools/gcc/gcc-configure-target.inc
+++ b/meta/recipes-devtools/gcc/gcc-configure-target.inc
@@ -1,4 +1,5 @@
require gcc-configure-common.inc
+require gcc-multilib-config.inc
EXTRA_OECONF_PATHS = " \
--with-local-prefix=${STAGING_DIR_TARGET}${prefix} \
diff --git a/meta/recipes-devtools/gcc/gcc-multilib-config.inc b/meta/recipes-devtools/gcc/gcc-multilib-config.inc
new file mode 100644
index 0000000..173c2fe
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-multilib-config.inc
@@ -0,0 +1,149 @@
+GCCMULTILIB = "--enable-multilib"
+
+addtask gcc_multilib_setup after do_patch before do_configure
+
+# following code modifies these definitions in the gcc config
+# MULTILIB_OPTIONS
+# MULTILIB_DIRNAMES
+# MULTILIB_OSDIRNAMES
+# GLIBC_DYNAMIC_LINKER32
+# GLIBC_DYNAMIC_LINKER64
+# GLIBC_DYNAMIC_LINKERX32
+# GLIBC_DYNAMIC_LINKERN32
+# For more information on use of these variables look at these files in the gcc source code
+# gcc/config/i386/t-linux64
+# gcc/config/mips/t-linux64
+# gcc/config/rs6000/t-linux64
+# gcc/config/i386/linux64.h
+# gcc/config/mips/linux64.h
+# gcc/config/rs6000/linux64.h
+# Nitin Kamble 2012/02/13
+
+python do_gcc_multilib_setup() {
+ import re
+
+ # do this only for target recipe
+ if d.getVar('PN', 1) != 'gcc':
+ return
+
+ srcdir = d.getVar('S', 1) or ''
+
+ multilibs = d.getVar('MULTILIB_VARIANTS', 1) or ''
+ if multilibs == '':
+ return
+
+ gcc_target_config_files = { 'x86_64' : 'gcc/config/i386/t-linux64',
+ 'mips' : 'gcc/config/mips/t-linux64' ,
+ 'ppc' : 'gcc/config/rs6000/t-linux64' }
+
+ gcc_header_config_files = { 'x86_64' : 'gcc/config/i386/linux64.h',
+ 'mips' : 'gcc/config/mips/linux64.h' ,
+ 'ppc' : 'gcc/config/rs6000/linux64.h' }
+
+ target_arch = d.getVar('TARGET_ARCH', 1) or ''
+
+ if target_arch not in gcc_target_config_files:
+ bb.warn('gcc multilib setup is not supported for TARGET_ARCH=' + target_arch)
+ return
+
+ gcc_multilib_target_config_file = gcc_target_config_files[target_arch]
+
+ gcc_multilib_header_config_file = gcc_header_config_files[target_arch]
+
+ ml_list = ['DEFAULTTUNE']
+ for ml in multilibs.split(' '):
+ ml_list.append('DEFAULTTUNE_virtclass-multilib-' + ml)
+
+ tunes_32 = ['x86', 'core2', 'i586', 'mips', 'mipsel', 'mips-nf', 'mipsel-nf', 'powerpc', 'powerpc-nf']
+ tunes_64 = ['x86-64', 'core2-64', 'mips64', 'mips64el', 'mips64-nf', 'mips64el-nf', 'powerpc64']
+ tunes_x32 = ['x86-64-x32', 'core2-64-x32']
+ tunes_n32 = ['mips64-n32', 'mips64el-n32', 'mips64-nf-n32', 'mips64el-nf-n32']
+
+ libdir32 = 'SYSTEMLIBS_DIR'
+ libdir64 = 'SYSTEMLIBS_DIR'
+ libdirx32 = 'SYSTEMLIBS_DIR'
+ libdirn32 = 'SYSTEMLIBS_DIR'
+
+ multilib_options = []
+ multilib_dirnames = []
+ multilib_osdirnames = []
+
+ for ml in ml_list:
+ ml_tune = d.getVar(ml, 1) or ''
+ ml_tune_features = d.getVar('TUNE_FEATURES_tune-' + ml_tune, 1) or ''
+ ml_baselib = d.getVar('BASE_LIB_tune-' + ml_tune, 1) or ''
+
+ if ml_tune in tunes_32:
+ libdir32 = ml_baselib
+ elif ml_tune in tunes_64:
+ libdir64 = ml_baselib
+ elif ml_tune in tunes_x32:
+ libdirx32 = ml_baselib
+ elif ml_tune in tunes_n32:
+ libdirn32 = ml_baselib
+
+ ml_tune_ccargs_list = []
+ for feature in ml_tune_features.split():
+ ml_feature_ccargs = d.getVar('TUNE_FEATURE_CCARGS-' + feature, 1) or ''
+ ml_tune_ccargs_list.append(ml_feature_ccargs)
+ ml_tune_ccargs = ' '.join(ml_tune_ccargs_list)
+ # take out '-' in parameters
+ multilib_options.append(re.sub(r'^\-+', '', re.sub(r' \-+', ' ', ml_tune_ccargs)))
+ if ml_baselib == 'lib':
+ multilib_dirnames.append('32')
+ else:
+ multilib_dirnames.append(ml_baselib.replace('lib', ''))
+ multilib_osdirnames.append('../' + ml_baselib)
+
+ with open(srcdir + '/' + gcc_multilib_target_config_file, 'r') as f:
+ filelines = f.read()
+ f.close()
+
+ # recreate multilib configuration variables
+
+ filelines = re.sub(r'^\s*MULTILIB_OPTIONS\s*=.*$',
+ 'MULTILIB_OPTIONS = ' + '/'.join(multilib_options),
+ filelines, flags=re.MULTILINE)
+
+ filelines = re.sub(r'^\s*MULTILIB_DIRNAMES\s*=.*$',
+ 'MULTILIB_DIRNAMES = ' + ' '.join(multilib_dirnames),
+ filelines, flags=re.MULTILINE)
+
+ filelines = re.sub(r'^\s*MULTILIB_OSDIRNAMES\s*=.*$',
+ 'MULTILIB_OSDIRNAMES = ' + ' '.join(multilib_osdirnames),
+ filelines, flags=re.MULTILINE)
+
+ with open(srcdir + '/' + gcc_multilib_target_config_file, 'w') as f:
+ f.write(filelines)
+ f.close()
+
+ with open(srcdir + '/' + gcc_multilib_header_config_file, 'r') as f:
+ filelines = f.read()
+ f.close()
+
+ # replace lines like
+ # #define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2"
+ # by
+ # #define GLIBC_DYNAMIC_LINKER32 "/lib/" "ld-linux.so.2"
+ # this is needed to put the correct dynamic loader path in the generated binaries
+
+ filelines = re.sub(r'^(#define\s*GLIBC_DYNAMIC_LINKER32\s*)(SYSTEMLIBS_DIR)(\s*\".*\")$',
+ r'\1"/' + libdir32 + r'/"\3',
+ filelines, flags=re.MULTILINE)
+
+ filelines = re.sub(r'^(#define\s*GLIBC_DYNAMIC_LINKER64\s*)(SYSTEMLIBS_DIR)(\s*\".*\")$',
+ r'\1"/' + libdir64 + r'/"\3',
+ filelines, flags=re.MULTILINE)
+
+ filelines = re.sub(r'^(#define\s*GLIBC_DYNAMIC_LINKERX32\s*)(SYSTEMLIBS_DIR)(\s*\".*\")$',
+ r'\1"/' + libdirx32 + r'/"\3',
+ filelines, flags=re.MULTILINE)
+
+ filelines = re.sub(r'^(#define\s*GLIBC_DYNAMIC_LINKERN32\s*)(SYSTEMLIBS_DIR)(\s*\".*\")$',
+ r'\1"/' + libdirn32 + r'/"\3',
+ filelines, flags=re.MULTILINE)
+
+ with open(srcdir + '/' + gcc_multilib_header_config_file, 'w') as f:
+ f.write(filelines)
+ f.close()
+}
--
1.7.6.4
^ permalink raw reply related [flat|nested] 13+ messages in thread* Re: [PATCH 08/10] target gcc: gcc-multilib-setup
2012-02-22 6:37 ` [PATCH 08/10] target gcc: gcc-multilib-setup nitin.a.kamble
@ 2012-02-22 13:21 ` Richard Purdie
0 siblings, 0 replies; 13+ messages in thread
From: Richard Purdie @ 2012-02-22 13:21 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
Hi Nitin,
This is a good start but I think this still needs a little bit of work.
I'm particularly concerned it appears necessary to rewrite all the tune
files to make this work, we shouldn't need to do that.
I've given this some thought and explained how I think we can avoid this
and some other issues below.
On Tue, 2012-02-21 at 22:37 -0800, nitin.a.kamble@intel.com wrote:
> +python do_gcc_multilib_setup() {
> + import re
> +
> + # do this only for target recipe
> + if d.getVar('PN', 1) != 'gcc':
> + return
Please use ", True" instead of ", 1" in all new code.
> + srcdir = d.getVar('S', 1) or ''
> +
> + multilibs = d.getVar('MULTILIB_VARIANTS', 1) or ''
> + if multilibs == '':
> + return
Even in the non multilib case, we still need to alter the configuration
to match whatever library layout is being used (the values of
base_libdir and libdir) as the 64bithack.patch does now.
> + gcc_target_config_files = { 'x86_64' : 'gcc/config/i386/t-linux64',
> + 'mips' : 'gcc/config/mips/t-linux64' ,
> + 'ppc' : 'gcc/config/rs6000/t-linux64' }
> +
> + gcc_header_config_files = { 'x86_64' : 'gcc/config/i386/linux64.h',
> + 'mips' : 'gcc/config/mips/linux64.h' ,
> + 'ppc' : 'gcc/config/rs6000/linux64.h' }
What about building 64 bit as a multilib on an i586 system? This also
doesn't account for powerpc64.
For i586, we probably need to add the configure option
--enable_targets=all and then we can add i*86 to the above list also
pointing at gcc/config/i386/t-linux64. We'd need more investigation to
figure out what is needed for powerpc64.
> + target_arch = d.getVar('TARGET_ARCH', 1) or ''
> +
> + if target_arch not in gcc_target_config_files:
> + bb.warn('gcc multilib setup is not supported for TARGET_ARCH=' + target_arch)
> + return
> +
> + gcc_multilib_target_config_file = gcc_target_config_files[target_arch]
> +
> + gcc_multilib_header_config_file = gcc_header_config_files[target_arch]
> +
> + ml_list = ['DEFAULTTUNE']
> + for ml in multilibs.split(' '):
> + ml_list.append('DEFAULTTUNE_virtclass-multilib-' + ml)
> +
> + tunes_32 = ['x86', 'core2', 'i586', 'mips', 'mipsel', 'mips-nf', 'mipsel-nf', 'powerpc', 'powerpc-nf']
> + tunes_64 = ['x86-64', 'core2-64', 'mips64', 'mips64el', 'mips64-nf', 'mips64el-nf', 'powerpc64']
> + tunes_x32 = ['x86-64-x32', 'core2-64-x32']
> + tunes_n32 = ['mips64-n32', 'mips64el-n32', 'mips64-nf-n32', 'mips64el-nf-n32']
I'm afraid I strongly dislike lists of hardcoded values. How about
having the code below that uses this doing something like:
if ml_tune.find("-n32") != -1:
libdirn32 = ml_baselib
elif ml_tune.find("-x32") != -1:
libdirx32 = ml_baselib
elif ml_tune.find("64") != -1:
libdir64 = ml_baselib
else:
libdir32 = ml_baselib
?
This also reminds me that we have an open bug about sanity checking the
multilib configuration. This code would lend itself well to sanity
checking the multilib configuration, e.g. if any of the above variables
all get set to the same library location, that would be an error. I'm
starting to think we may need some library functions to handle this
better.
The sanity checks can be a secondary step and patch but it would be good
to start thinking about this now.
> + libdir32 = 'SYSTEMLIBS_DIR'
> + libdir64 = 'SYSTEMLIBS_DIR'
> + libdirx32 = 'SYSTEMLIBS_DIR'
> + libdirn32 = 'SYSTEMLIBS_DIR'
> +
> + multilib_options = []
> + multilib_dirnames = []
> + multilib_osdirnames = []
> +
> + for ml in ml_list:
> + ml_tune = d.getVar(ml, 1) or ''
> + ml_tune_features = d.getVar('TUNE_FEATURES_tune-' + ml_tune, 1) or ''
> + ml_baselib = d.getVar('BASE_LIB_tune-' + ml_tune, 1) or ''
> +
> + if ml_tune in tunes_32:
> + libdir32 = ml_baselib
> + elif ml_tune in tunes_64:
> + libdir64 = ml_baselib
> + elif ml_tune in tunes_x32:
> + libdirx32 = ml_baselib
> + elif ml_tune in tunes_n32:
> + libdirn32 = ml_baselib
> +
> + ml_tune_ccargs_list = []
> + for feature in ml_tune_features.split():
> + ml_feature_ccargs = d.getVar('TUNE_FEATURE_CCARGS-' + feature, 1) or ''
> + ml_tune_ccargs_list.append(ml_feature_ccargs)
> + ml_tune_ccargs = ' '.join(ml_tune_ccargs_list)
I'm guessing this piece is why you ended up changing all the tune files.
To access this (and other multilib information) you should be able to do
something like:
for ml in multilibs:
localdata = bb.data.createCopy(d)
override = ":virtclass-multilib-" + ml
localdata.setVar("OVERRIDES", localdata.getVar("OVERRIDES", False) + override)
bb.data.update_data(localdata)
tune_ccargs = localdata.getVar("TUNE_CCARGS", True)
tune_features = localdata.getVar("TUNE_FEATURES", True)
baselib = localdata.getVar("BASE_LIB", True)
and here tune_ccargs will get the value applied in each multilib along
with some other variables I noticed you were looking up.
Of course this doesn't get you just the TUNE_FEATURE piece of
tune_ccargs but it does remove the need to re-namespace all the
variables.
> + # take out '-' in parameters
> + multilib_options.append(re.sub(r'^\-+', '', re.sub(r' \-+', ' ', ml_tune_ccargs)))
> + if ml_baselib == 'lib':
> + multilib_dirnames.append('32')
> + else:
> + multilib_dirnames.append(ml_baselib.replace('lib', ''))
> + multilib_osdirnames.append('../' + ml_baselib)
> +
> + with open(srcdir + '/' + gcc_multilib_target_config_file, 'r') as f:
> + filelines = f.read()
> + f.close()
> +
> + # recreate multilib configuration variables
> +
> + filelines = re.sub(r'^\s*MULTILIB_OPTIONS\s*=.*$',
> + 'MULTILIB_OPTIONS = ' + '/'.join(multilib_options),
> + filelines, flags=re.MULTILINE)
> +
> + filelines = re.sub(r'^\s*MULTILIB_DIRNAMES\s*=.*$',
> + 'MULTILIB_DIRNAMES = ' + ' '.join(multilib_dirnames),
> + filelines, flags=re.MULTILINE)
> +
> + filelines = re.sub(r'^\s*MULTILIB_OSDIRNAMES\s*=.*$',
> + 'MULTILIB_OSDIRNAMES = ' + ' '.join(multilib_osdirnames),
> + filelines, flags=re.MULTILINE)
> +
> + with open(srcdir + '/' + gcc_multilib_target_config_file, 'w') as f:
> + f.write(filelines)
> + f.close()
> +
> + with open(srcdir + '/' + gcc_multilib_header_config_file, 'r') as f:
> + filelines = f.read()
> + f.close()
> +
> + # replace lines like
> + # #define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2"
> + # by
> + # #define GLIBC_DYNAMIC_LINKER32 "/lib/" "ld-linux.so.2"
> + # this is needed to put the correct dynamic loader path in the generated binaries
> +
> + filelines = re.sub(r'^(#define\s*GLIBC_DYNAMIC_LINKER32\s*)(SYSTEMLIBS_DIR)(\s*\".*\")$',
> + r'\1"/' + libdir32 + r'/"\3',
> + filelines, flags=re.MULTILINE)
> +
> + filelines = re.sub(r'^(#define\s*GLIBC_DYNAMIC_LINKER64\s*)(SYSTEMLIBS_DIR)(\s*\".*\")$',
> + r'\1"/' + libdir64 + r'/"\3',
> + filelines, flags=re.MULTILINE)
> +
> + filelines = re.sub(r'^(#define\s*GLIBC_DYNAMIC_LINKERX32\s*)(SYSTEMLIBS_DIR)(\s*\".*\")$',
> + r'\1"/' + libdirx32 + r'/"\3',
> + filelines, flags=re.MULTILINE)
> +
> + filelines = re.sub(r'^(#define\s*GLIBC_DYNAMIC_LINKERN32\s*)(SYSTEMLIBS_DIR)(\s*\".*\")$',
> + r'\1"/' + libdirn32 + r'/"\3',
> + filelines, flags=re.MULTILINE)
> +
> + with open(srcdir + '/' + gcc_multilib_header_config_file, 'w') as f:
> + f.write(filelines)
> + f.close()
I'm slightly puzzled why this last open/clode is indented differently to
the first set above. I'm also wondering why you don't do all of this in
one pass over the file and instead use two?
Cheers,
Richard
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 09/10] libgcc_4.6.bb: Complete quote in definition of FILES_libgcov-dev
2012-02-22 6:37 [PATCH 00/10] Enable multilib for target gcc nitin.a.kamble
` (7 preceding siblings ...)
2012-02-22 6:37 ` [PATCH 08/10] target gcc: gcc-multilib-setup nitin.a.kamble
@ 2012-02-22 6:37 ` nitin.a.kamble
2012-02-22 6:37 ` [PATCH 10/10] libgcc: get the gcc header files working nitin.a.kamble
9 siblings, 0 replies; 13+ messages in thread
From: nitin.a.kamble @ 2012-02-22 6:37 UTC (permalink / raw)
To: openembedded-core
From: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
---
meta/recipes-devtools/gcc/libgcc_4.6.bb | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/meta/recipes-devtools/gcc/libgcc_4.6.bb b/meta/recipes-devtools/gcc/libgcc_4.6.bb
index 01a3b57..076cf37 100644
--- a/meta/recipes-devtools/gcc/libgcc_4.6.bb
+++ b/meta/recipes-devtools/gcc/libgcc_4.6.bb
@@ -16,7 +16,7 @@ FILES_${PN}-dev = " \
${libdir}/${TARGET_SYS}/${BINV}/crt* \
${libdir}/${TARGET_SYS}/${BINV}/libgcc*"
FILES_libgcov-dev = " \
- ${libdir}/${TARGET_SYS}/${BINV}/libgcov.a \
+ ${libdir}/${TARGET_SYS}/${BINV}/libgcov.a "
FILES_${PN}-dbg += "${base_libdir}/.debug/"
--
1.7.6.4
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH 10/10] libgcc: get the gcc header files working
2012-02-22 6:37 [PATCH 00/10] Enable multilib for target gcc nitin.a.kamble
` (8 preceding siblings ...)
2012-02-22 6:37 ` [PATCH 09/10] libgcc_4.6.bb: Complete quote in definition of FILES_libgcov-dev nitin.a.kamble
@ 2012-02-22 6:37 ` nitin.a.kamble
2012-02-22 13:43 ` Richard Purdie
9 siblings, 1 reply; 13+ messages in thread
From: nitin.a.kamble @ 2012-02-22 6:37 UTC (permalink / raw)
To: openembedded-core
From: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
---
meta/recipes-devtools/gcc/libgcc_4.6.bb | 53 +++++++++++++++++++++++++++++++
1 files changed, 53 insertions(+), 0 deletions(-)
diff --git a/meta/recipes-devtools/gcc/libgcc_4.6.bb b/meta/recipes-devtools/gcc/libgcc_4.6.bb
index 076cf37..6d93341 100644
--- a/meta/recipes-devtools/gcc/libgcc_4.6.bb
+++ b/meta/recipes-devtools/gcc/libgcc_4.6.bb
@@ -14,6 +14,9 @@ FILES_${PN} = "${base_libdir}/libgcc*.so.*"
FILES_${PN}-dev = " \
${base_libdir}/libgcc*.so \
${libdir}/${TARGET_SYS}/${BINV}/crt* \
+ ${libdir}/${TARGET_SYS}/${BINV}/32 \
+ ${libdir}/${TARGET_SYS}/${BINV}/x32 \
+ ${libdir}/${TARGET_SYS}/${BINV}/n32 \
${libdir}/${TARGET_SYS}/${BINV}/libgcc*"
FILES_libgcov-dev = " \
${libdir}/${TARGET_SYS}/${BINV}/libgcov.a "
@@ -51,3 +54,53 @@ BBCLASSEXTEND = "nativesdk"
INSANE_SKIP_libgcc-dev = "staticdev"
INSANE_SKIP_libgcov-dev = "staticdev"
+addtask multilib_install after do_install before do_package
+
+
+# this makes multilib gcc files findable for target gcc
+# like this directory is made findable
+# /usr/lib/i586-pokymllib32-linux/4.6.3/
+# by creating this symlink to it
+# /usr/lib64/x86_64-poky-linux/4.6.3/32
+
+python do_multilib_install() {
+ import re
+ # do this only for multilib extended recipe
+ if d.getVar('PN', 1) != 'libgcc':
+ return
+
+ tune_arch = d.getVar('TUNE_ARCH', 1) or ''
+ defaulttune = d.getVar('DEFAULTTUNE', 1) or ''
+ multilibs = d.getVar('MULTILIB_VARIANTS', 1) or ''
+ if multilibs == '':
+ return
+
+ tunes_32 = ['x86', 'core2', 'i586', 'mips', 'mipsel', 'mips-nf', 'mipsel-nf', 'powerpc', 'powerpc-nf']
+ tunes_64 = ['x86-64', 'core2-64', 'mips64', 'mips64el', 'mips64-nf', 'mips64el-nf', 'powerpc64']
+ tunes_x32 = ['x86-64-x32', 'core2-64-x32']
+ tunes_n32 = ['mips64-n32', 'mips64el-n32', 'mips64-nf-n32', 'mips64el-nf-n32']
+
+ for ml in multilibs.split(' '):
+ ml_tune = d.getVar('DEFAULTTUNE_virtclass-multilib-' + ml, 1) or ''
+ ml_tune_features = d.getVar('TUNE_FEATURES_tune-' + ml_tune, 1) or ''
+ ml_baselib = d.getVar('BASE_LIB_tune-' + ml_tune, 1) or ''
+ for feature in ml_tune_features.split():
+ ml_feature_arch = d.getVar('TUNE_FEATURE_ARCH-' + feature, 1) or ''
+ if ml_tune in tunes_32:
+ bitness = '32'
+ elif ml_tune in tunes_64:
+ bitness = '64'
+ elif ml_tune in tunes_x32:
+ bitness = 'x32'
+ elif ml_tune in tunes_n32:
+ bitness = 'n32'
+
+ binv = d.getVar('BINV', 1) or ''
+
+ src = '/usr/' + ml_baselib + '/' + ml_feature_arch + '-pokyml' + ml + '-linux/' + binv + '/'
+ dest = (d.getVar('D', 1) or '') + (d.getVar('libdir', 1) or '') + '/' + (d.getVar('TARGET_SYS', 1) or '') + '/' + binv + '/' + bitness
+ if os.path.lexists(dest):
+ os.unlink(dest)
+ os.symlink(src, dest)
+
+}
--
1.7.6.4
^ permalink raw reply related [flat|nested] 13+ messages in thread* Re: [PATCH 10/10] libgcc: get the gcc header files working
2012-02-22 6:37 ` [PATCH 10/10] libgcc: get the gcc header files working nitin.a.kamble
@ 2012-02-22 13:43 ` Richard Purdie
0 siblings, 0 replies; 13+ messages in thread
From: Richard Purdie @ 2012-02-22 13:43 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On Tue, 2012-02-21 at 22:37 -0800, 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/recipes-devtools/gcc/libgcc_4.6.bb | 53 +++++++++++++++++++++++++++++++
> 1 files changed, 53 insertions(+), 0 deletions(-)
>
> diff --git a/meta/recipes-devtools/gcc/libgcc_4.6.bb b/meta/recipes-devtools/gcc/libgcc_4.6.bb
> index 076cf37..6d93341 100644
> --- a/meta/recipes-devtools/gcc/libgcc_4.6.bb
> +++ b/meta/recipes-devtools/gcc/libgcc_4.6.bb
> @@ -14,6 +14,9 @@ FILES_${PN} = "${base_libdir}/libgcc*.so.*"
> FILES_${PN}-dev = " \
> ${base_libdir}/libgcc*.so \
> ${libdir}/${TARGET_SYS}/${BINV}/crt* \
> + ${libdir}/${TARGET_SYS}/${BINV}/32 \
> + ${libdir}/${TARGET_SYS}/${BINV}/x32 \
> + ${libdir}/${TARGET_SYS}/${BINV}/n32 \
> ${libdir}/${TARGET_SYS}/${BINV}/libgcc*"
> FILES_libgcov-dev = " \
> ${libdir}/${TARGET_SYS}/${BINV}/libgcov.a "
> @@ -51,3 +54,53 @@ BBCLASSEXTEND = "nativesdk"
> INSANE_SKIP_libgcc-dev = "staticdev"
> INSANE_SKIP_libgcov-dev = "staticdev"
>
> +addtask multilib_install after do_install before do_package
> +
> +
> +# this makes multilib gcc files findable for target gcc
> +# like this directory is made findable
> +# /usr/lib/i586-pokymllib32-linux/4.6.3/
> +# by creating this symlink to it
> +# /usr/lib64/x86_64-poky-linux/4.6.3/32
This might be one case where moving the files is actually the right
thing to do. The "pokymllib32" is an artefact of the way we do multilib
builds and likely shouldn't be exposed on the target. I'm not sure how
relocatable these files are though.
> +python do_multilib_install() {
> + import re
> + # do this only for multilib extended recipe
> + if d.getVar('PN', 1) != 'libgcc':
> + return
> +
> + tune_arch = d.getVar('TUNE_ARCH', 1) or ''
> + defaulttune = d.getVar('DEFAULTTUNE', 1) or ''
> + multilibs = d.getVar('MULTILIB_VARIANTS', 1) or ''
> + if multilibs == '':
> + return
> +
> + tunes_32 = ['x86', 'core2', 'i586', 'mips', 'mipsel', 'mips-nf', 'mipsel-nf', 'powerpc', 'powerpc-nf']
> + tunes_64 = ['x86-64', 'core2-64', 'mips64', 'mips64el', 'mips64-nf', 'mips64el-nf', 'powerpc64']
> + tunes_x32 = ['x86-64-x32', 'core2-64-x32']
> + tunes_n32 = ['mips64-n32', 'mips64el-n32', 'mips64-nf-n32', 'mips64el-nf-n32']
Just for reference, duplicating these lists over two files is an
extremely bad idea...
I'm hoping we can clean some of this up with the comments in my reply to
the other patch too.
Cheers,
Richard
^ permalink raw reply [flat|nested] 13+ messages in thread