Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/3] First round of tune config file updates
@ 2011-07-22 14:49 Richard Purdie
  2011-07-22 14:49 ` [PATCH 1/3] bitbake.conf/cross.bbclass: Add ability to dynamically change library location Richard Purdie
                   ` (5 more replies)
  0 siblings, 6 replies; 21+ messages in thread
From: Richard Purdie @ 2011-07-22 14:49 UTC (permalink / raw)
  To: openembedded-core

These patches set the scene for the multilib work. I'm posting these first 
as they're the more invasive changes to the variables the tune
files currently expose and are likely the more user visible changes.

The first patch allows multilib to be able to change "/lib" as needed 
dynamically to variants like "/lib64". Reasons for doing it the way its
been done are included in the commit message of the patch.

The second two patches change the tune files to operate on TUNE* variables.
This allows some cleanup and simplification of the core and creates a clear
namespace for the tune files to operate under.

It does mean that machine support files need to remove any explicit 
TARGET_ARCH setting and now should always include an appopriate tune file
to ensure the TUNE variables are set correctly.

Sanity checks have been added to ensure users are informed when this has
not been done.

These should be the only compatibility break multilib requires with the
rest of the work involving changes to the tune file internals themselves.

The changes are available in the git repository at:
  git://git.openembedded.org/openembedded-core-contrib rpurdie/ml-stage
  http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rpurdie/ml-stage

Richard Purdie (3):
  bitbake.conf/cross.bbclass: Add ability to dynamically change library
    location
  conf/machine/tune: Overhaul tune include file variables
  conf/machine/include: Set TUNE_CCARGS instead of TARGET_CC_ARCH

 meta/classes/cross.bbclass                       |    7 +++--
 meta/classes/sanity.bbclass                      |   10 ++++++--
 meta/conf/bitbake.conf                           |   26 ++++++++++++++-------
 meta/conf/machine/include/tune-arm1136jf-s.inc   |    9 ++++---
 meta/conf/machine/include/tune-arm920t.inc       |    7 +++--
 meta/conf/machine/include/tune-arm926ejs.inc     |   10 +++++---
 meta/conf/machine/include/tune-arm9tdmi.inc      |    7 +++--
 meta/conf/machine/include/tune-armv7.inc         |    7 +++--
 meta/conf/machine/include/tune-atom.inc          |    6 +++-
 meta/conf/machine/include/tune-c3.inc            |    8 ++++--
 meta/conf/machine/include/tune-cortexa8.inc      |    7 +++--
 meta/conf/machine/include/tune-cortexm1.inc      |    7 +++--
 meta/conf/machine/include/tune-cortexm3.inc      |    7 +++--
 meta/conf/machine/include/tune-cortexr4.inc      |    7 +++--
 meta/conf/machine/include/tune-ep9312.inc        |    7 +++--
 meta/conf/machine/include/tune-i586.inc          |    6 +++++
 meta/conf/machine/include/tune-iwmmxt.inc        |    7 +++--
 meta/conf/machine/include/tune-mips32.inc        |    7 +++--
 meta/conf/machine/include/tune-ppc603e.inc       |    7 +++--
 meta/conf/machine/include/tune-ppce300c2.inc     |    6 +++-
 meta/conf/machine/include/tune-ppce500.inc       |    6 +++-
 meta/conf/machine/include/tune-ppce500mc.inc     |    7 +++--
 meta/conf/machine/include/tune-ppce500v2.inc     |    7 +++--
 meta/conf/machine/include/tune-sh3.inc           |    7 +++--
 meta/conf/machine/include/tune-sh4.inc           |    7 +++--
 meta/conf/machine/include/tune-strongarm1100.inc |    6 ++++-
 meta/conf/machine/include/tune-supersparc.inc    |    7 +++--
 meta/conf/machine/include/tune-thumb.inc         |    2 +-
 meta/conf/machine/include/tune-x86_64.inc        |    5 ++++
 meta/conf/machine/include/tune-xscale.inc        |   10 ++++----
 meta/conf/machine/qemuarm.conf                   |    2 -
 meta/conf/machine/qemumips.conf                  |    2 -
 meta/conf/machine/qemuppc.conf                   |    2 -
 meta/conf/machine/qemux86-64.conf                |    3 +-
 meta/conf/machine/qemux86.conf                   |    4 +--
 35 files changed, 144 insertions(+), 98 deletions(-)
 create mode 100644 meta/conf/machine/include/tune-i586.inc
 create mode 100644 meta/conf/machine/include/tune-x86_64.inc

-- 
1.7.4.1




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

* [PATCH 1/3] bitbake.conf/cross.bbclass: Add ability to dynamically change library location
  2011-07-22 14:49 [PATCH 0/3] First round of tune config file updates Richard Purdie
@ 2011-07-22 14:49 ` Richard Purdie
  2011-07-22 14:49 ` [PATCH 2/3] conf/machine/tune: Overhaul tune include file variables Richard Purdie
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 21+ messages in thread
From: Richard Purdie @ 2011-07-22 14:49 UTC (permalink / raw)
  To: openembedded-core

Add the ability to dynamically change the library directory from "lib" to
other values. This allows the tune files to specifiy altnerative ABIs
which can be dynamically enabled by the multilib BBCLASSEXTEND code.

A variety of approaches have been attempted with this, the immediate
expansions in cross.bbclass being problematic as they are they are expanded
before the bbclass extend event hander runs. This approach ensures the
${baselib} variable is retained in the expressions resolving that complication.

Derived from some ideas from Mark Hatle.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/classes/cross.bbclass |    7 ++++---
 meta/conf/bitbake.conf     |   15 ++++++++++-----
 2 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/meta/classes/cross.bbclass b/meta/classes/cross.bbclass
index f9fd07a..81358ec 100644
--- a/meta/classes/cross.bbclass
+++ b/meta/classes/cross.bbclass
@@ -38,11 +38,12 @@ DEPENDS_GETTEXT = "gettext-native"
 # Path mangling needed by the cross packaging
 # Note that we use := here to ensure that libdir and includedir are
 # target paths.
-target_libdir := "${libdir}"
-target_includedir := "${includedir}"
-target_base_libdir := "${base_libdir}"
+target_base_prefix := "${base_prefix}"
 target_prefix := "${prefix}"
 target_exec_prefix := "${exec_prefix}"
+target_base_libdir = "${target_base_prefix}/${baselib}"
+target_libdir = "${target_exec_prefix}/${baselib}"
+target_includedir := "${includedir}"
 
 # Overrides for paths
 CROSS_TARGET_SYS_DIR = "${MULTIMACH_TARGET_SYS}"
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 975e24c..e768df5 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -1,6 +1,13 @@
 ##################################################################
 # Standard target filesystem paths.
 ##################################################################
+#
+# If changing these values, beware that native/cross/nativesdk bbclass 
+# files may also need changes to keep in sync.
+#
+
+# Used by multilib code to change the library paths
+baselib = "lib"
 
 # Path prefixes
 export base_prefix = ""
@@ -10,7 +17,7 @@ export exec_prefix = "/usr"
 # Base paths
 export base_bindir = "${base_prefix}/bin"
 export base_sbindir = "${base_prefix}/sbin"
-export base_libdir = "${base_prefix}/lib"
+export base_libdir = "${base_prefix}/${baselib}"
 
 # Architecture independent paths
 export datadir = "${prefix}/share"
@@ -26,13 +33,11 @@ export docdir = "${datadir}/doc"
 export bindir = "${exec_prefix}/bin"
 export sbindir = "${exec_prefix}/sbin"
 export libexecdir = "${exec_prefix}/libexec"
-export libdir = "${exec_prefix}/lib"
+export libdir = "${exec_prefix}/${baselib}"
 export includedir = "${exec_prefix}/include"
 export oldincludedir = "${exec_prefix}/include"
 
-#
-# These must match the various bbclass layout definitions
-#
+# Linkage between native/cross/nativesdk layouts
 base_bindir_native = "/bin"
 base_sbindir_native = "/sbin"
 sysconfdir_native = "/etc"
-- 
1.7.4.1




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

* [PATCH 2/3] conf/machine/tune: Overhaul tune include file variables
  2011-07-22 14:49 [PATCH 0/3] First round of tune config file updates Richard Purdie
  2011-07-22 14:49 ` [PATCH 1/3] bitbake.conf/cross.bbclass: Add ability to dynamically change library location Richard Purdie
@ 2011-07-22 14:49 ` Richard Purdie
  2011-07-22 15:03   ` Kumar Gala
  2011-07-22 14:49 ` [PATCH 3/3] conf/machine/include: Set TUNE_CCARGS instead of TARGET_CC_ARCH Richard Purdie
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 21+ messages in thread
From: Richard Purdie @ 2011-07-22 14:49 UTC (permalink / raw)
  To: openembedded-core

There is currently consideradble confusion over how the tune files operate
and how these interact with the rest of the build system. This update/overhaul
changes things so the tune files are primarily resonsible for setting:

TUNE_ARCH - What was formerly set as TARGET_ARCH and is the value that
represents the architecture we're targetting.

TUNE_PKGARCH - The value that represents the tune confuration that this set
of tune parameters results in.

This allows the significant improvement that the core can now always determine
the target architecture value, even when TARGET_ARCH needs to be reset to
something different and likewise, there is one package architecture variable
the core can reference allowing simplification of the BASE_PACKAGE_ARCH, PACKAGE_ARCH
and FEED_ARCH variables.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/classes/sanity.bbclass                      |   10 +++++++---
 meta/conf/bitbake.conf                           |    7 ++++---
 meta/conf/machine/include/tune-arm1136jf-s.inc   |    5 +++--
 meta/conf/machine/include/tune-arm920t.inc       |    5 +++--
 meta/conf/machine/include/tune-arm926ejs.inc     |    6 ++++--
 meta/conf/machine/include/tune-arm9tdmi.inc      |    5 +++--
 meta/conf/machine/include/tune-armv7.inc         |    5 +++--
 meta/conf/machine/include/tune-atom.inc          |    4 +++-
 meta/conf/machine/include/tune-c3.inc            |    6 ++++--
 meta/conf/machine/include/tune-cortexa8.inc      |    5 +++--
 meta/conf/machine/include/tune-cortexm1.inc      |    5 +++--
 meta/conf/machine/include/tune-cortexm3.inc      |    5 +++--
 meta/conf/machine/include/tune-cortexr4.inc      |    5 +++--
 meta/conf/machine/include/tune-ep9312.inc        |    5 +++--
 meta/conf/machine/include/tune-i586.inc          |    6 ++++++
 meta/conf/machine/include/tune-iwmmxt.inc        |    5 +++--
 meta/conf/machine/include/tune-mips32.inc        |    5 +++--
 meta/conf/machine/include/tune-ppc603e.inc       |    5 +++--
 meta/conf/machine/include/tune-ppce300c2.inc     |    4 +++-
 meta/conf/machine/include/tune-ppce500.inc       |    4 +++-
 meta/conf/machine/include/tune-ppce500mc.inc     |    5 +++--
 meta/conf/machine/include/tune-ppce500v2.inc     |    5 +++--
 meta/conf/machine/include/tune-sh3.inc           |    5 +++--
 meta/conf/machine/include/tune-sh4.inc           |    5 +++--
 meta/conf/machine/include/tune-strongarm1100.inc |    4 ++++
 meta/conf/machine/include/tune-supersparc.inc    |    5 +++--
 meta/conf/machine/include/tune-x86_64.inc        |    5 +++++
 meta/conf/machine/include/tune-xscale.inc        |    4 ++--
 meta/conf/machine/qemuarm.conf                   |    2 --
 meta/conf/machine/qemumips.conf                  |    2 --
 meta/conf/machine/qemuppc.conf                   |    2 --
 meta/conf/machine/qemux86-64.conf                |    3 +--
 meta/conf/machine/qemux86.conf                   |    4 +---
 33 files changed, 98 insertions(+), 60 deletions(-)
 create mode 100644 meta/conf/machine/include/tune-i586.inc
 create mode 100644 meta/conf/machine/include/tune-x86_64.inc

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index acda1a9..b054146 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -147,9 +147,13 @@ def check_sanity(e):
     if (LooseVersion(__version__) < LooseVersion(minversion)):
         messages = messages + 'Bitbake version %s is required and version %s was found\n' % (minversion, __version__)
 
-    # Check TARGET_ARCH is set
-    if data.getVar('TARGET_ARCH', e.data, True) == 'INVALID':
-        messages = messages + 'Please set TARGET_ARCH directly, or choose a MACHINE or DISTRO that does so.\n'
+    # Check TUNE_ARCH is set
+    if data.getVar('TUNE_ARCH', e.data, True) == 'INVALID':
+        messages = messages + 'TUNE_ARCH is unset. Please ensure your MACHINE configuration includes a valid tune configuration file which will set this correctly.\n'
+
+    # Check TARGET_ARCH is set correctly
+    if data.getVar('TARGE_ARCH', e.data, False) == '${TUNE_ARCH}':
+        messages = messages + 'TARGET_ARCH is being overwritten, likely by your MACHINE configuration files.\nPlease use a valid tune configuration file which should set this correctly automatically\nand avoid setting this in the machine configuration. See the OE-Core mailing list for more information.\n'
     
     # Check TARGET_OS is set
     if data.getVar('TARGET_OS', e.data, True) == 'INVALID':
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index e768df5..f95343f 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -81,7 +81,8 @@ HOST_PREFIX = "${TARGET_PREFIX}"
 HOST_CC_ARCH = "${TARGET_CC_ARCH}"
 HOST_EXEEXT = ""
 
-TARGET_ARCH = "INVALID"
+TUNE_ARCH ??= "INVALID"
+TARGET_ARCH = "${TUNE_ARCH}"
 TARGET_OS = "INVALID"
 TARGET_VENDOR = "-oe"
 TARGET_SYS = "${TARGET_ARCH}${TARGET_VENDOR}${@['-' + bb.data.getVar('TARGET_OS', d, 1), ''][bb.data.getVar('TARGET_OS', d, 1) == ('' or 'custom')]}"
@@ -95,9 +96,9 @@ SDK_SYS = "${SDK_ARCH}${SDK_VENDOR}${@['-' + bb.data.getVar('SDK_OS', d, 1), '']
 SDK_PREFIX = "${SDK_SYS}-"
 SDK_CC_ARCH = "${BUILD_CC_ARCH}"
 
-BASE_PACKAGE_ARCH = "${HOST_ARCH}"
+BASE_PACKAGE_ARCH = "${TUNE_PKGARCH}"
 PACKAGE_ARCH = "${BASE_PACKAGE_ARCH}"
-MACHINE_ARCH = "${@[bb.data.getVar('BASE_PACKAGE_ARCH', d, 1), bb.data.getVar('MACHINE', d, 1)][bool(bb.data.getVar('MACHINE', d, 1))].replace('-', '_')}"
+MACHINE_ARCH = "${@[bb.data.getVar('TUNE_PKGARCH', d, 1), bb.data.getVar('MACHINE', d, 1)][bool(bb.data.getVar('MACHINE', d, 1))].replace('-', '_')}"
 PACKAGE_EXTRA_ARCHS ??= "${TARGET_ARCH}"
 PACKAGE_ARCHS = "all any noarch ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}"
 # MACHINE_ARCH shouldn't be included here as a variable dependency
diff --git a/meta/conf/machine/include/tune-arm1136jf-s.inc b/meta/conf/machine/include/tune-arm1136jf-s.inc
index 2ea3c9d..bc90924 100644
--- a/meta/conf/machine/include/tune-arm1136jf-s.inc
+++ b/meta/conf/machine/include/tune-arm1136jf-s.inc
@@ -1,7 +1,8 @@
+TUNE_ARCH = "arm"
+
 TARGET_CC_ARCH = "-march=armv6j -mtune=arm1136jf-s"
 TARGET_CC_ARCH += "${@['', '-mfloat-abi=softfp -mfpu=vfp'][(bb.data.getVar('TARGET_FPU', d, 1) == 'soft') and (bb.data.getVar('CPU_FEATURES', d, 1).find('vfp') != -1)]}"
-FEED_ARCH = "armv6"
-BASE_PACKAGE_ARCH = "armv6"
+TUNE_PKGARCH = "armv6"
 
 ARM_INSTRUCTION_SET = "${@['thumb','arm'][bb.data.getVar('CPU_FEATURES', d, 1).find('thumb') == -1]}"
 PACKAGE_EXTRA_ARCHS = "arm armv4 armv4t armv5te armv6"
diff --git a/meta/conf/machine/include/tune-arm920t.inc b/meta/conf/machine/include/tune-arm920t.inc
index 564b557..2991e85 100644
--- a/meta/conf/machine/include/tune-arm920t.inc
+++ b/meta/conf/machine/include/tune-arm920t.inc
@@ -1,4 +1,5 @@
-FEED_ARCH = "armv4t"
-BASE_PACKAGE_ARCH = "armv4t" 
+TUNE_ARCH = "arm"
+
+TUNE_PKGARCH = "armv4t"
 TARGET_CC_ARCH = "-march=armv4t -mtune=arm920t"
 PACKAGE_EXTRA_ARCHS = "arm armv4 armv4t"
diff --git a/meta/conf/machine/include/tune-arm926ejs.inc b/meta/conf/machine/include/tune-arm926ejs.inc
index 9d546c9..e54403b 100644
--- a/meta/conf/machine/include/tune-arm926ejs.inc
+++ b/meta/conf/machine/include/tune-arm926ejs.inc
@@ -1,7 +1,9 @@
-FEED_ARCH = "armv5te"
+TUNE_ARCH = "arm"
+
+TUNE_PKGARCH = "armv5te"
 PACKAGE_EXTRA_ARCHS = "arm armv4 armv4t armv5te"
 # For gcc 3.x you need:
 #TARGET_CC_ARCH = "-march=armv5te -mtune=arm926ejs"
 # For gcc 4.x you need:
 TARGET_CC_ARCH = "-march=armv5te -mtune=arm926ej-s"
-BASE_PACKAGE_ARCH = "armv5te"
+
diff --git a/meta/conf/machine/include/tune-arm9tdmi.inc b/meta/conf/machine/include/tune-arm9tdmi.inc
index 5446ce8..b75de3d 100644
--- a/meta/conf/machine/include/tune-arm9tdmi.inc
+++ b/meta/conf/machine/include/tune-arm9tdmi.inc
@@ -1,4 +1,5 @@
-FEED_ARCH = "armv4t"
-BASE_PACKAGE_ARCH = "armv4t"
+TUNE_ARCH = "arm"
+
+TUNE_PKGARCH = "armv4t"
 PACKAGE_EXTRA_ARCHS = "arm armv4 armv4t"
 TARGET_CC_ARCH = "-mcpu=arm9tdmi -mtune=arm9tdmi"
diff --git a/meta/conf/machine/include/tune-armv7.inc b/meta/conf/machine/include/tune-armv7.inc
index 979d6fe..a6cc346 100644
--- a/meta/conf/machine/include/tune-armv7.inc
+++ b/meta/conf/machine/include/tune-armv7.inc
@@ -1,7 +1,8 @@
+TUNE_ARCH = "arm"
+
 # valid options for -march: `armv7', `armv7-a', `armv7-r', `armv7-m'
 # valid option for -mtune: `cortex-a8', `cortex-r4', `cortex-m3', `cortex-m1'
 # This will NOT compile programs in 'ARM' mode, which is what you really want
 TARGET_CC_ARCH = "-march=armv7 -mfpu=vfp -mfloat-abi=softfp"
-FEED_ARCH = "armv7"
+TUNE_PKGARCH = "armv7"
 PACKAGE_EXTRA_ARCHS = "arm armv4 armv4t armv5te armv6 armv7"
-BASE_PACKAGE_ARCH = "armv7"
diff --git a/meta/conf/machine/include/tune-atom.inc b/meta/conf/machine/include/tune-atom.inc
index 399ea54..8141a67 100644
--- a/meta/conf/machine/include/tune-atom.inc
+++ b/meta/conf/machine/include/tune-atom.inc
@@ -1,4 +1,6 @@
-BASE_PACKAGE_ARCH = "core2"
+TUNE_ARCH = "i586"
+
+TUNE_PKGARCH = "core2"
 TARGET_CC_ARCH = "-m32 -march=core2 -msse3 -mtune=generic -mfpmath=sse"
 #MOBLIN_CFLAGS = "-Os -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -fasynchronous-unwind-tables"
 
diff --git a/meta/conf/machine/include/tune-c3.inc b/meta/conf/machine/include/tune-c3.inc
index d33df5f..dd8dce1 100644
--- a/meta/conf/machine/include/tune-c3.inc
+++ b/meta/conf/machine/include/tune-c3.inc
@@ -1,4 +1,6 @@
+TUNE_ARCH = "i586"
+
+TUNE_PKGARCH = "i586"
+
 TARGET_CC_ARCH = "-march=c3 -mtune=c3"
 PACKAGE_EXTRA_ARCHS = "i386 i486 i586"
-BASE_PACKAGE_ARCH = "i586"
-FEED_ARCH = "i586"
diff --git a/meta/conf/machine/include/tune-cortexa8.inc b/meta/conf/machine/include/tune-cortexa8.inc
index a5b982a..cf5b418 100644
--- a/meta/conf/machine/include/tune-cortexa8.inc
+++ b/meta/conf/machine/include/tune-cortexa8.inc
@@ -1,3 +1,5 @@
+TUNE_ARCH = "arm"
+
 # Instead of using -mfpu=vfp[2] we can use -mfpu=neon to make use of gcc intrinsics[1] and vectorize loops with -ftree-vectorize[3]
 # [1] http://gcc.gnu.org/onlinedocs/gcc/ARM-NEON-Intrinsics.html
 # [2] http://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html 
@@ -8,6 +10,5 @@ TARGET_CC_ARCH = "-march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
 # Other potentially useful options
 #-ftree-vectorize -ffast-math -fno-omit-frame-pointer
 
-FEED_ARCH = "armv7a"
-BASE_PACKAGE_ARCH = "armv7a"
+TUNE_PKGARCH = "armv7a"
 PACKAGE_EXTRA_ARCHS = "arm armv4 armv4t armv5te armv6 armv7 armv7a"
diff --git a/meta/conf/machine/include/tune-cortexm1.inc b/meta/conf/machine/include/tune-cortexm1.inc
index 6c4a70a..6dbfd2c 100644
--- a/meta/conf/machine/include/tune-cortexm1.inc
+++ b/meta/conf/machine/include/tune-cortexm1.inc
@@ -1,3 +1,4 @@
+TUNE_ARCH = "arm"
+
 TARGET_CC_ARCH = "-march=armv7 -mtune=cortex-m1 -mfpu=vfp -mfloat-abi=softfp"
-FEED_ARCH = "armv6"
-BASE_PACKAGE_ARCH = "armv6"
+TUNE_PKGARCH = "armv6"
diff --git a/meta/conf/machine/include/tune-cortexm3.inc b/meta/conf/machine/include/tune-cortexm3.inc
index 6da9aee..63959e4 100644
--- a/meta/conf/machine/include/tune-cortexm3.inc
+++ b/meta/conf/machine/include/tune-cortexm3.inc
@@ -1,4 +1,5 @@
+TUNE_ARCH = "arm"
+
 # valid options for -march: `armv7', `armv7-m'
 TARGET_CC_ARCH = "-march=armv7-m -mtune=cortex-m3 -mfpu=vfp -mfloat-abi=softfp"
-FEED_ARCH = "armv7"
-BASE_PACKAGE_ARCH = "armv7"
+TUNE_PKGARCH = "armv7"
diff --git a/meta/conf/machine/include/tune-cortexr4.inc b/meta/conf/machine/include/tune-cortexr4.inc
index b8bb7f5..780a510 100644
--- a/meta/conf/machine/include/tune-cortexr4.inc
+++ b/meta/conf/machine/include/tune-cortexr4.inc
@@ -1,4 +1,5 @@
+TUNE_ARCH = "arm"
+
 # valid options for -march: `armv7', `armv7-r'
 TARGET_CC_ARCH = "-march=armv7-r -mtune=cortex-r4 -mfpu=vfp -mfloat-abi=softfp"
-FEED_ARCH = "armv7"
-BASE_PACKAGE_ARCH = "armv7"
+TUNE_PKGARCH = "armv7"
diff --git a/meta/conf/machine/include/tune-ep9312.inc b/meta/conf/machine/include/tune-ep9312.inc
index e1515a0..81be6dd 100644
--- a/meta/conf/machine/include/tune-ep9312.inc
+++ b/meta/conf/machine/include/tune-ep9312.inc
@@ -1,8 +1,9 @@
+TUNE_ARCH = "arm"
+
 TARGET_CC_ARCH = "-march=ep9312 -mtune=ep9312 -mcpu=ep9312"
 # add "-mfp=maverick" for newer gcc versions > 4.0
 
 #set arch to ep9312 for all generated packages
 PACKAGE_EXTRA_ARCHS = "arm armv4t ep9312"
-BASE_PACKAGE_ARCH = "ep9312"
-FEED_ARCH = "ep9312"
+TUNE_PKGARCH = "ep9312"
 
diff --git a/meta/conf/machine/include/tune-i586.inc b/meta/conf/machine/include/tune-i586.inc
new file mode 100644
index 0000000..7ea8b4f
--- /dev/null
+++ b/meta/conf/machine/include/tune-i586.inc
@@ -0,0 +1,6 @@
+TUNE_ARCH = "i586"
+
+TUNE_PKGARCH = "i586"
+TARGET_CC_ARCH = "-m32 -march=i586"
+
+PACKAGE_EXTRA_ARCHS = "x86 i386 i486 i586"
diff --git a/meta/conf/machine/include/tune-iwmmxt.inc b/meta/conf/machine/include/tune-iwmmxt.inc
index 7191ab0..68e118a 100644
--- a/meta/conf/machine/include/tune-iwmmxt.inc
+++ b/meta/conf/machine/include/tune-iwmmxt.inc
@@ -1,7 +1,8 @@
+TUNE_ARCH = "arm"
+
 # Configurations for the Intel PXA27x Appications Processor Family. 
 # Please use tune-xscale for PXA255/PXA26x based processors.
 TARGET_CC_ARCH = "-march=iwmmxt -mcpu=iwmmxt -mtune=iwmmxt"
-BASE_PACKAGE_ARCH = "iwmmxt"
 PACKAGE_EXTRA_ARCHS = "arm armv4 armv4t armv5te iwmmxt"
-FEED_ARCH = "iwmmxt"
+TUNE_PKGARCH = "iwmmxt"
 
diff --git a/meta/conf/machine/include/tune-mips32.inc b/meta/conf/machine/include/tune-mips32.inc
index 67edca2..a7bcb50 100644
--- a/meta/conf/machine/include/tune-mips32.inc
+++ b/meta/conf/machine/include/tune-mips32.inc
@@ -1,3 +1,4 @@
+TUNE_ARCH = "mips"
+
 TARGET_CC_ARCH = "-march=mips32"
-FEED_ARCH = "${TARGET_ARCH}"
-BASE_PACKAGE_ARCH = "${TARGET_ARCH}"
+TUNE_PKGARCH = "mips"
diff --git a/meta/conf/machine/include/tune-ppc603e.inc b/meta/conf/machine/include/tune-ppc603e.inc
index dc95d0d..daa1cd3 100644
--- a/meta/conf/machine/include/tune-ppc603e.inc
+++ b/meta/conf/machine/include/tune-ppc603e.inc
@@ -1,4 +1,5 @@
+TUNE_ARCH = "powerpc"
+
 TARGET_CC_ARCH = "-mcpu=603e  -mhard-float"
-BASE_PACKAGE_ARCH = "ppc603e"
-FEED_ARCH = "ppc603e"
+TUNE_PKGARCH = "ppc603e"
 PACKAGE_EXTRA_ARCHS = "powerpc ppc603e"
diff --git a/meta/conf/machine/include/tune-ppce300c2.inc b/meta/conf/machine/include/tune-ppce300c2.inc
index 3e552e6..a2989ae 100644
--- a/meta/conf/machine/include/tune-ppce300c2.inc
+++ b/meta/conf/machine/include/tune-ppce300c2.inc
@@ -1,3 +1,5 @@
+TUNE_ARCH = "powerpc"
+
 TARGET_CC_ARCH = "-mcpu=e300c2 -msoft-float"
-BASE_PACKAGE_ARCH = "ppce300"
+TUNE_PKGARCH = "ppce300"
 PACKAGE_EXTRA_ARCHS = "powerpc ppce300"
diff --git a/meta/conf/machine/include/tune-ppce500.inc b/meta/conf/machine/include/tune-ppce500.inc
index 45e1f0d..8d67b86 100644
--- a/meta/conf/machine/include/tune-ppce500.inc
+++ b/meta/conf/machine/include/tune-ppce500.inc
@@ -1,4 +1,6 @@
+TUNE_ARCH = "powerpc"
+
 TARGET_CC_ARCH = "-mcpu=8540"
 BASE_PACKAGE_ARCH = "ppce500"
-FEED_ARCH = "ppce500"
+TUNE_PKGARCH = "ppce500"
 PACKAGE_EXTRA_ARCHS = "powerpc ppce500"
diff --git a/meta/conf/machine/include/tune-ppce500mc.inc b/meta/conf/machine/include/tune-ppce500mc.inc
index 763ec1a..0cdcfa8 100644
--- a/meta/conf/machine/include/tune-ppce500mc.inc
+++ b/meta/conf/machine/include/tune-ppce500mc.inc
@@ -1,4 +1,5 @@
+TUNE_ARCH = "powerpc"
+
 TARGET_CC_ARCH = "-mcpu=e500mc"
-BASE_PACKAGE_ARCH = "ppce500mc"
-FEED_ARCH = "ppce500mc"
+TUNE_PKGARCH = "ppce500mc"
 PACKAGE_EXTRA_ARCHS = "powerpc ppce500mc"
diff --git a/meta/conf/machine/include/tune-ppce500v2.inc b/meta/conf/machine/include/tune-ppce500v2.inc
index d76dbc9..219bcaf 100644
--- a/meta/conf/machine/include/tune-ppce500v2.inc
+++ b/meta/conf/machine/include/tune-ppce500v2.inc
@@ -1,4 +1,5 @@
+TUNE_ARCH = "powerpc"
+
 TARGET_CC_ARCH = "-mcpu=8548 -mabi=spe -mspe"
-BASE_PACKAGE_ARCH = "ppce500v2"
-FEED_ARCH = "ppce500v2"
+TUNE_PKGARCH = "ppce500v2"
 PACKAGE_EXTRA_ARCHS = "powerpc ppce500v2"
diff --git a/meta/conf/machine/include/tune-sh3.inc b/meta/conf/machine/include/tune-sh3.inc
index 32801a6..45ad6de 100644
--- a/meta/conf/machine/include/tune-sh3.inc
+++ b/meta/conf/machine/include/tune-sh3.inc
@@ -1,3 +1,4 @@
+TUNE_ARCH = "sh3"
+
 TARGET_CC_ARCH = "-ml -m3"
-FEED_ARCH = "sh3"
-BASE_PACKAGE_ARCH = "sh3"
+TUNE_PKGARCH = "sh3"
diff --git a/meta/conf/machine/include/tune-sh4.inc b/meta/conf/machine/include/tune-sh4.inc
index 51b4069..3d89d49 100644
--- a/meta/conf/machine/include/tune-sh4.inc
+++ b/meta/conf/machine/include/tune-sh4.inc
@@ -1,7 +1,8 @@
+TUNE_ARCH = "sh4"
+
 # NOTE: If you want to optimize to sh4a, conf/machine/include/tune-sh4a.inc.
 # But it is not compatible for sh4.
 # The binary optimized by m4a doesn't operate on sh4. It works on sh4a only.
 
 TARGET_CC_ARCH = "-ml -m4"
-FEED_ARCH = "sh4"
-BASE_PACKAGE_ARCH = "sh4"
+TUNE_PKGARCH = "sh4"
diff --git a/meta/conf/machine/include/tune-strongarm1100.inc b/meta/conf/machine/include/tune-strongarm1100.inc
index f136710..2d4ce38 100644
--- a/meta/conf/machine/include/tune-strongarm1100.inc
+++ b/meta/conf/machine/include/tune-strongarm1100.inc
@@ -1,3 +1,7 @@
+TUNE_ARCH = "arm"
+
+TUNE_PKGARCH = "arm"
+
 # This machine lists common configuration options for Strongarm 1100 devices
 # NOTE: The Zaurus Collie also has a Strongarm processor, but uses the 1110 type
 
diff --git a/meta/conf/machine/include/tune-supersparc.inc b/meta/conf/machine/include/tune-supersparc.inc
index a402e7c..7eaa736 100644
--- a/meta/conf/machine/include/tune-supersparc.inc
+++ b/meta/conf/machine/include/tune-supersparc.inc
@@ -1,3 +1,4 @@
+TUNE_ARCH = "sparc"
+
 TARGET_CC_ARCH = "-mcpu=supersparc"
-BASE_PACKAGE_ARCH = "supersparc"
-FEED_ARCH = "supersparc" 
+TUNE_PKGARCH = "supersparc"
diff --git a/meta/conf/machine/include/tune-x86_64.inc b/meta/conf/machine/include/tune-x86_64.inc
new file mode 100644
index 0000000..d7665ec
--- /dev/null
+++ b/meta/conf/machine/include/tune-x86_64.inc
@@ -0,0 +1,5 @@
+TUNE_ARCH = "x86_64"
+
+TUNE_PKGARCH = "x86_64"
+TARGET_CC_ARCH = "-m64"
+
diff --git a/meta/conf/machine/include/tune-xscale.inc b/meta/conf/machine/include/tune-xscale.inc
index cfdcc99..69c60f5 100644
--- a/meta/conf/machine/include/tune-xscale.inc
+++ b/meta/conf/machine/include/tune-xscale.inc
@@ -1,10 +1,10 @@
-FEED_ARCH = "armv5te"
+TUNE_ARCH = "arm"
 
 INHERIT += "siteinfo"
 
 TARGET_CC_ARCH = "-march=armv5te -mtune=xscale"
 TARGET_CC_KERNEL_ARCH = "-march=armv5te -mtune=xscale"
-BASE_PACKAGE_ARCH = "${@['armv5teb', 'armv5te'][bb.data.getVar('SITEINFO_ENDIANESS', d, 1) == 'le']}"
+TUNE_PKGARCH = "${@['armv5teb', 'armv5te'][bb.data.getVar('SITEINFO_ENDIANESS', d, 1) == 'le']}"
 PACKAGE_EXTRA_ARCHS = "${@['armeb armv4b armv4tb armv5teb', 'arm armv4 armv4t armv5te'][bb.data.getVar('SITEINFO_ENDIANESS', d, 1) == 'le']}"
 
 # webkit-gtk has alignment issues with double instructions on armv5 so
diff --git a/meta/conf/machine/qemuarm.conf b/meta/conf/machine/qemuarm.conf
index 9fb1893..526d713 100644
--- a/meta/conf/machine/qemuarm.conf
+++ b/meta/conf/machine/qemuarm.conf
@@ -2,8 +2,6 @@
 #@NAME: arm_versaile_926ejs
 #@DESCRIPTION: arm_versaile_926ejs
 
-TARGET_ARCH = "arm"
-
 require conf/machine/include/qemu.inc
 require conf/machine/include/tune-arm926ejs.inc
 #require conf/machine/include/tune-arm1136jf-s.inc
diff --git a/meta/conf/machine/qemumips.conf b/meta/conf/machine/qemumips.conf
index 283ae1e..ce1c419 100644
--- a/meta/conf/machine/qemumips.conf
+++ b/meta/conf/machine/qemumips.conf
@@ -2,8 +2,6 @@
 #@NAME: mti_malta32_be MIPS
 #@DESCRIPTION: mti_malta32_be
 
-TARGET_ARCH = "mips"
-
 require conf/machine/include/qemu.inc
 require conf/machine/include/tune-mips32.inc
 
diff --git a/meta/conf/machine/qemuppc.conf b/meta/conf/machine/qemuppc.conf
index bfbcc7f..dacc802 100644
--- a/meta/conf/machine/qemuppc.conf
+++ b/meta/conf/machine/qemuppc.conf
@@ -2,8 +2,6 @@
 #@NAME: qemu PPC Emulator setup
 #@DESCRIPTION: Machine configuration for running an PPC system under qemu emulation
 
-TARGET_ARCH = "powerpc"
-
 PREFERRED_PROVIDER_virtual/libgl  = "mesa-xlib"
 
 require conf/machine/include/qemu.inc
diff --git a/meta/conf/machine/qemux86-64.conf b/meta/conf/machine/qemux86-64.conf
index ca91388..46d7d12 100644
--- a/meta/conf/machine/qemux86-64.conf
+++ b/meta/conf/machine/qemux86-64.conf
@@ -10,6 +10,7 @@ PREFERRED_PROVIDER_virtual/libx11 ?= "libx11-trim"
 PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xf86-dri-lite"
 PREFERRED_PROVIDER_virtual/xserver-xf86 ?= "xserver-xf86-dri-lite"
 
+require conf/machine/include/tune-x86_64.inc
 require conf/machine/include/qemu.inc
 
 MACHINE_FEATURES += "x86"
@@ -31,5 +32,3 @@ GLIBC_ADDONS = "nptl"
 GLIBC_EXTRA_OECONF = "--with-tls"
 
 MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "v86d"
-
-TARGET_CC_ARCH = "-m64"
diff --git a/meta/conf/machine/qemux86.conf b/meta/conf/machine/qemux86.conf
index 8b14731..5d0d03e 100644
--- a/meta/conf/machine/qemux86.conf
+++ b/meta/conf/machine/qemux86.conf
@@ -2,13 +2,12 @@
 #@NAME: common_pc
 #@DESCRIPTION: Machine configuration for running a common x86
 
-TARGET_ARCH = "i586"
-
 PREFERRED_PROVIDER_virtual/libgl  = "mesa-dri"
 PREFERRED_PROVIDER_virtual/libx11 ?= "libx11-trim"
 PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xf86-dri-lite"
 PREFERRED_PROVIDER_virtual/xserver-xf86 ?= "xserver-xf86-dri-lite"
 
+require conf/machine/include/tune-i586.inc
 require conf/machine/include/qemu.inc
 
 MACHINE_FEATURES += "x86"
@@ -31,4 +30,3 @@ GLIBC_EXTRA_OECONF = "--with-tls"
 
 MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "v86d"
 
-TARGET_CC_ARCH = "-march=i586"
-- 
1.7.4.1




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

* [PATCH 3/3] conf/machine/include: Set TUNE_CCARGS instead of TARGET_CC_ARCH
  2011-07-22 14:49 [PATCH 0/3] First round of tune config file updates Richard Purdie
  2011-07-22 14:49 ` [PATCH 1/3] bitbake.conf/cross.bbclass: Add ability to dynamically change library location Richard Purdie
  2011-07-22 14:49 ` [PATCH 2/3] conf/machine/tune: Overhaul tune include file variables Richard Purdie
@ 2011-07-22 14:49 ` Richard Purdie
  2011-07-22 14:54   ` Koen Kooi
  2011-07-22 18:00 ` [PATCH 5/3] conf/machine/include: Start to fill out architecture specific tune include files and tune features Richard Purdie
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 21+ messages in thread
From: Richard Purdie @ 2011-07-22 14:49 UTC (permalink / raw)
  To: openembedded-core

Since we're updating the tune file format, it makes sense to abstract
the compiler tune arguments at this point too. This means that should
these need to be overridden at any point, the original values can
still be obtained in a similar manner to the other TUNE* variables.

Whilst this isn't strictly necessary for any current need, its likely
good practise to standardise this behaviour.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/conf/bitbake.conf                           |    4 +++-
 meta/conf/machine/include/tune-arm1136jf-s.inc   |    4 ++--
 meta/conf/machine/include/tune-arm920t.inc       |    2 +-
 meta/conf/machine/include/tune-arm926ejs.inc     |    4 ++--
 meta/conf/machine/include/tune-arm9tdmi.inc      |    2 +-
 meta/conf/machine/include/tune-armv7.inc         |    2 +-
 meta/conf/machine/include/tune-atom.inc          |    2 +-
 meta/conf/machine/include/tune-c3.inc            |    2 +-
 meta/conf/machine/include/tune-cortexa8.inc      |    2 +-
 meta/conf/machine/include/tune-cortexm1.inc      |    2 +-
 meta/conf/machine/include/tune-cortexm3.inc      |    2 +-
 meta/conf/machine/include/tune-cortexr4.inc      |    2 +-
 meta/conf/machine/include/tune-ep9312.inc        |    2 +-
 meta/conf/machine/include/tune-i586.inc          |    2 +-
 meta/conf/machine/include/tune-iwmmxt.inc        |    2 +-
 meta/conf/machine/include/tune-mips32.inc        |    2 +-
 meta/conf/machine/include/tune-ppc603e.inc       |    2 +-
 meta/conf/machine/include/tune-ppce300c2.inc     |    2 +-
 meta/conf/machine/include/tune-ppce500.inc       |    2 +-
 meta/conf/machine/include/tune-ppce500mc.inc     |    2 +-
 meta/conf/machine/include/tune-ppce500v2.inc     |    2 +-
 meta/conf/machine/include/tune-sh3.inc           |    2 +-
 meta/conf/machine/include/tune-sh4.inc           |    2 +-
 meta/conf/machine/include/tune-strongarm1100.inc |    2 +-
 meta/conf/machine/include/tune-supersparc.inc    |    2 +-
 meta/conf/machine/include/tune-thumb.inc         |    2 +-
 meta/conf/machine/include/tune-x86_64.inc        |    2 +-
 meta/conf/machine/include/tune-xscale.inc        |    6 +++---
 28 files changed, 34 insertions(+), 32 deletions(-)

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index f95343f..2954faa 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -82,12 +82,14 @@ HOST_CC_ARCH = "${TARGET_CC_ARCH}"
 HOST_EXEEXT = ""
 
 TUNE_ARCH ??= "INVALID"
+TUNE_CCARGS ??= ""
+
 TARGET_ARCH = "${TUNE_ARCH}"
 TARGET_OS = "INVALID"
 TARGET_VENDOR = "-oe"
 TARGET_SYS = "${TARGET_ARCH}${TARGET_VENDOR}${@['-' + bb.data.getVar('TARGET_OS', d, 1), ''][bb.data.getVar('TARGET_OS', d, 1) == ('' or 'custom')]}"
 TARGET_PREFIX = "${TARGET_SYS}-"
-TARGET_CC_ARCH = ""
+TARGET_CC_ARCH = "${TUNE_CCARGS}"
 
 SDK_ARCH = "${BUILD_ARCH}"
 SDK_OS = "${BUILD_OS}"
diff --git a/meta/conf/machine/include/tune-arm1136jf-s.inc b/meta/conf/machine/include/tune-arm1136jf-s.inc
index bc90924..c1d0c07 100644
--- a/meta/conf/machine/include/tune-arm1136jf-s.inc
+++ b/meta/conf/machine/include/tune-arm1136jf-s.inc
@@ -1,7 +1,7 @@
 TUNE_ARCH = "arm"
 
-TARGET_CC_ARCH = "-march=armv6j -mtune=arm1136jf-s"
-TARGET_CC_ARCH += "${@['', '-mfloat-abi=softfp -mfpu=vfp'][(bb.data.getVar('TARGET_FPU', d, 1) == 'soft') and (bb.data.getVar('CPU_FEATURES', d, 1).find('vfp') != -1)]}"
+TUNE_CCARGS = "-march=armv6j -mtune=arm1136jf-s"
+TUNE_CCARGS += "${@['', '-mfloat-abi=softfp -mfpu=vfp'][(bb.data.getVar('TARGET_FPU', d, 1) == 'soft') and (bb.data.getVar('CPU_FEATURES', d, 1).find('vfp') != -1)]}"
 TUNE_PKGARCH = "armv6"
 
 ARM_INSTRUCTION_SET = "${@['thumb','arm'][bb.data.getVar('CPU_FEATURES', d, 1).find('thumb') == -1]}"
diff --git a/meta/conf/machine/include/tune-arm920t.inc b/meta/conf/machine/include/tune-arm920t.inc
index 2991e85..3f30e2a 100644
--- a/meta/conf/machine/include/tune-arm920t.inc
+++ b/meta/conf/machine/include/tune-arm920t.inc
@@ -1,5 +1,5 @@
 TUNE_ARCH = "arm"
 
 TUNE_PKGARCH = "armv4t"
-TARGET_CC_ARCH = "-march=armv4t -mtune=arm920t"
+TUNE_CCARGS = "-march=armv4t -mtune=arm920t"
 PACKAGE_EXTRA_ARCHS = "arm armv4 armv4t"
diff --git a/meta/conf/machine/include/tune-arm926ejs.inc b/meta/conf/machine/include/tune-arm926ejs.inc
index e54403b..049f57c 100644
--- a/meta/conf/machine/include/tune-arm926ejs.inc
+++ b/meta/conf/machine/include/tune-arm926ejs.inc
@@ -3,7 +3,7 @@ TUNE_ARCH = "arm"
 TUNE_PKGARCH = "armv5te"
 PACKAGE_EXTRA_ARCHS = "arm armv4 armv4t armv5te"
 # For gcc 3.x you need:
-#TARGET_CC_ARCH = "-march=armv5te -mtune=arm926ejs"
+#TUNE_CCARGS = "-march=armv5te -mtune=arm926ejs"
 # For gcc 4.x you need:
-TARGET_CC_ARCH = "-march=armv5te -mtune=arm926ej-s"
+TUNE_CCARGS = "-march=armv5te -mtune=arm926ej-s"
 
diff --git a/meta/conf/machine/include/tune-arm9tdmi.inc b/meta/conf/machine/include/tune-arm9tdmi.inc
index b75de3d..0ed2f40 100644
--- a/meta/conf/machine/include/tune-arm9tdmi.inc
+++ b/meta/conf/machine/include/tune-arm9tdmi.inc
@@ -2,4 +2,4 @@ TUNE_ARCH = "arm"
 
 TUNE_PKGARCH = "armv4t"
 PACKAGE_EXTRA_ARCHS = "arm armv4 armv4t"
-TARGET_CC_ARCH = "-mcpu=arm9tdmi -mtune=arm9tdmi"
+TUNE_CCARGS = "-mcpu=arm9tdmi -mtune=arm9tdmi"
diff --git a/meta/conf/machine/include/tune-armv7.inc b/meta/conf/machine/include/tune-armv7.inc
index a6cc346..2e32323 100644
--- a/meta/conf/machine/include/tune-armv7.inc
+++ b/meta/conf/machine/include/tune-armv7.inc
@@ -3,6 +3,6 @@ TUNE_ARCH = "arm"
 # valid options for -march: `armv7', `armv7-a', `armv7-r', `armv7-m'
 # valid option for -mtune: `cortex-a8', `cortex-r4', `cortex-m3', `cortex-m1'
 # This will NOT compile programs in 'ARM' mode, which is what you really want
-TARGET_CC_ARCH = "-march=armv7 -mfpu=vfp -mfloat-abi=softfp"
+TUNE_CCARGS = "-march=armv7 -mfpu=vfp -mfloat-abi=softfp"
 TUNE_PKGARCH = "armv7"
 PACKAGE_EXTRA_ARCHS = "arm armv4 armv4t armv5te armv6 armv7"
diff --git a/meta/conf/machine/include/tune-atom.inc b/meta/conf/machine/include/tune-atom.inc
index 8141a67..52acd12 100644
--- a/meta/conf/machine/include/tune-atom.inc
+++ b/meta/conf/machine/include/tune-atom.inc
@@ -1,7 +1,7 @@
 TUNE_ARCH = "i586"
 
 TUNE_PKGARCH = "core2"
-TARGET_CC_ARCH = "-m32 -march=core2 -msse3 -mtune=generic -mfpmath=sse"
+TUNE_CCARGS = "-m32 -march=core2 -msse3 -mtune=generic -mfpmath=sse"
 #MOBLIN_CFLAGS = "-Os -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -fasynchronous-unwind-tables"
 
 PACKAGE_EXTRA_ARCHS = "x86 i386 i486 i586 i686 core2"
diff --git a/meta/conf/machine/include/tune-c3.inc b/meta/conf/machine/include/tune-c3.inc
index dd8dce1..dbe1e43 100644
--- a/meta/conf/machine/include/tune-c3.inc
+++ b/meta/conf/machine/include/tune-c3.inc
@@ -2,5 +2,5 @@ TUNE_ARCH = "i586"
 
 TUNE_PKGARCH = "i586"
 
-TARGET_CC_ARCH = "-march=c3 -mtune=c3"
+TUNE_CCARGS = "-march=c3 -mtune=c3"
 PACKAGE_EXTRA_ARCHS = "i386 i486 i586"
diff --git a/meta/conf/machine/include/tune-cortexa8.inc b/meta/conf/machine/include/tune-cortexa8.inc
index cf5b418..9be423a 100644
--- a/meta/conf/machine/include/tune-cortexa8.inc
+++ b/meta/conf/machine/include/tune-cortexa8.inc
@@ -5,7 +5,7 @@ TUNE_ARCH = "arm"
 # [2] http://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html 
 # [3] https://support.codesourcery.com/GNUToolchain/kbentry29
 
-TARGET_CC_ARCH = "-march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -fno-tree-vectorize"
+TUNE_CCARGS = "-march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -fno-tree-vectorize"
 
 # Other potentially useful options
 #-ftree-vectorize -ffast-math -fno-omit-frame-pointer
diff --git a/meta/conf/machine/include/tune-cortexm1.inc b/meta/conf/machine/include/tune-cortexm1.inc
index 6dbfd2c..d0d3b2c 100644
--- a/meta/conf/machine/include/tune-cortexm1.inc
+++ b/meta/conf/machine/include/tune-cortexm1.inc
@@ -1,4 +1,4 @@
 TUNE_ARCH = "arm"
 
-TARGET_CC_ARCH = "-march=armv7 -mtune=cortex-m1 -mfpu=vfp -mfloat-abi=softfp"
+TUNE_CCARGS = "-march=armv7 -mtune=cortex-m1 -mfpu=vfp -mfloat-abi=softfp"
 TUNE_PKGARCH = "armv6"
diff --git a/meta/conf/machine/include/tune-cortexm3.inc b/meta/conf/machine/include/tune-cortexm3.inc
index 63959e4..495c8f6 100644
--- a/meta/conf/machine/include/tune-cortexm3.inc
+++ b/meta/conf/machine/include/tune-cortexm3.inc
@@ -1,5 +1,5 @@
 TUNE_ARCH = "arm"
 
 # valid options for -march: `armv7', `armv7-m'
-TARGET_CC_ARCH = "-march=armv7-m -mtune=cortex-m3 -mfpu=vfp -mfloat-abi=softfp"
+TUNE_CCARGS = "-march=armv7-m -mtune=cortex-m3 -mfpu=vfp -mfloat-abi=softfp"
 TUNE_PKGARCH = "armv7"
diff --git a/meta/conf/machine/include/tune-cortexr4.inc b/meta/conf/machine/include/tune-cortexr4.inc
index 780a510..c775e83 100644
--- a/meta/conf/machine/include/tune-cortexr4.inc
+++ b/meta/conf/machine/include/tune-cortexr4.inc
@@ -1,5 +1,5 @@
 TUNE_ARCH = "arm"
 
 # valid options for -march: `armv7', `armv7-r'
-TARGET_CC_ARCH = "-march=armv7-r -mtune=cortex-r4 -mfpu=vfp -mfloat-abi=softfp"
+TUNE_CCARGS = "-march=armv7-r -mtune=cortex-r4 -mfpu=vfp -mfloat-abi=softfp"
 TUNE_PKGARCH = "armv7"
diff --git a/meta/conf/machine/include/tune-ep9312.inc b/meta/conf/machine/include/tune-ep9312.inc
index 81be6dd..8c7fc5a 100644
--- a/meta/conf/machine/include/tune-ep9312.inc
+++ b/meta/conf/machine/include/tune-ep9312.inc
@@ -1,6 +1,6 @@
 TUNE_ARCH = "arm"
 
-TARGET_CC_ARCH = "-march=ep9312 -mtune=ep9312 -mcpu=ep9312"
+TUNE_CCARGS = "-march=ep9312 -mtune=ep9312 -mcpu=ep9312"
 # add "-mfp=maverick" for newer gcc versions > 4.0
 
 #set arch to ep9312 for all generated packages
diff --git a/meta/conf/machine/include/tune-i586.inc b/meta/conf/machine/include/tune-i586.inc
index 7ea8b4f..1dc44df 100644
--- a/meta/conf/machine/include/tune-i586.inc
+++ b/meta/conf/machine/include/tune-i586.inc
@@ -1,6 +1,6 @@
 TUNE_ARCH = "i586"
 
 TUNE_PKGARCH = "i586"
-TARGET_CC_ARCH = "-m32 -march=i586"
+TUNE_CCARGS = "-m32 -march=i586"
 
 PACKAGE_EXTRA_ARCHS = "x86 i386 i486 i586"
diff --git a/meta/conf/machine/include/tune-iwmmxt.inc b/meta/conf/machine/include/tune-iwmmxt.inc
index 68e118a..236cede 100644
--- a/meta/conf/machine/include/tune-iwmmxt.inc
+++ b/meta/conf/machine/include/tune-iwmmxt.inc
@@ -2,7 +2,7 @@ TUNE_ARCH = "arm"
 
 # Configurations for the Intel PXA27x Appications Processor Family. 
 # Please use tune-xscale for PXA255/PXA26x based processors.
-TARGET_CC_ARCH = "-march=iwmmxt -mcpu=iwmmxt -mtune=iwmmxt"
+TUNE_CCARGS = "-march=iwmmxt -mcpu=iwmmxt -mtune=iwmmxt"
 PACKAGE_EXTRA_ARCHS = "arm armv4 armv4t armv5te iwmmxt"
 TUNE_PKGARCH = "iwmmxt"
 
diff --git a/meta/conf/machine/include/tune-mips32.inc b/meta/conf/machine/include/tune-mips32.inc
index a7bcb50..182d16c 100644
--- a/meta/conf/machine/include/tune-mips32.inc
+++ b/meta/conf/machine/include/tune-mips32.inc
@@ -1,4 +1,4 @@
 TUNE_ARCH = "mips"
 
-TARGET_CC_ARCH = "-march=mips32"
+TUNE_CCARGS = "-march=mips32"
 TUNE_PKGARCH = "mips"
diff --git a/meta/conf/machine/include/tune-ppc603e.inc b/meta/conf/machine/include/tune-ppc603e.inc
index daa1cd3..ec43cfe 100644
--- a/meta/conf/machine/include/tune-ppc603e.inc
+++ b/meta/conf/machine/include/tune-ppc603e.inc
@@ -1,5 +1,5 @@
 TUNE_ARCH = "powerpc"
 
-TARGET_CC_ARCH = "-mcpu=603e  -mhard-float"
+TUNE_CCARGS = "-mcpu=603e  -mhard-float"
 TUNE_PKGARCH = "ppc603e"
 PACKAGE_EXTRA_ARCHS = "powerpc ppc603e"
diff --git a/meta/conf/machine/include/tune-ppce300c2.inc b/meta/conf/machine/include/tune-ppce300c2.inc
index a2989ae..ac23242 100644
--- a/meta/conf/machine/include/tune-ppce300c2.inc
+++ b/meta/conf/machine/include/tune-ppce300c2.inc
@@ -1,5 +1,5 @@
 TUNE_ARCH = "powerpc"
 
-TARGET_CC_ARCH = "-mcpu=e300c2 -msoft-float"
+TUNE_CCARGS = "-mcpu=e300c2 -msoft-float"
 TUNE_PKGARCH = "ppce300"
 PACKAGE_EXTRA_ARCHS = "powerpc ppce300"
diff --git a/meta/conf/machine/include/tune-ppce500.inc b/meta/conf/machine/include/tune-ppce500.inc
index 8d67b86..a342cfb 100644
--- a/meta/conf/machine/include/tune-ppce500.inc
+++ b/meta/conf/machine/include/tune-ppce500.inc
@@ -1,6 +1,6 @@
 TUNE_ARCH = "powerpc"
 
-TARGET_CC_ARCH = "-mcpu=8540"
+TUNE_CCARGS = "-mcpu=8540"
 BASE_PACKAGE_ARCH = "ppce500"
 TUNE_PKGARCH = "ppce500"
 PACKAGE_EXTRA_ARCHS = "powerpc ppce500"
diff --git a/meta/conf/machine/include/tune-ppce500mc.inc b/meta/conf/machine/include/tune-ppce500mc.inc
index 0cdcfa8..497c1a4 100644
--- a/meta/conf/machine/include/tune-ppce500mc.inc
+++ b/meta/conf/machine/include/tune-ppce500mc.inc
@@ -1,5 +1,5 @@
 TUNE_ARCH = "powerpc"
 
-TARGET_CC_ARCH = "-mcpu=e500mc"
+TUNE_CCARGS = "-mcpu=e500mc"
 TUNE_PKGARCH = "ppce500mc"
 PACKAGE_EXTRA_ARCHS = "powerpc ppce500mc"
diff --git a/meta/conf/machine/include/tune-ppce500v2.inc b/meta/conf/machine/include/tune-ppce500v2.inc
index 219bcaf..1c56829 100644
--- a/meta/conf/machine/include/tune-ppce500v2.inc
+++ b/meta/conf/machine/include/tune-ppce500v2.inc
@@ -1,5 +1,5 @@
 TUNE_ARCH = "powerpc"
 
-TARGET_CC_ARCH = "-mcpu=8548 -mabi=spe -mspe"
+TUNE_CCARGS = "-mcpu=8548 -mabi=spe -mspe"
 TUNE_PKGARCH = "ppce500v2"
 PACKAGE_EXTRA_ARCHS = "powerpc ppce500v2"
diff --git a/meta/conf/machine/include/tune-sh3.inc b/meta/conf/machine/include/tune-sh3.inc
index 45ad6de..dd12cd4 100644
--- a/meta/conf/machine/include/tune-sh3.inc
+++ b/meta/conf/machine/include/tune-sh3.inc
@@ -1,4 +1,4 @@
 TUNE_ARCH = "sh3"
 
-TARGET_CC_ARCH = "-ml -m3"
+TUNE_CCARGS = "-ml -m3"
 TUNE_PKGARCH = "sh3"
diff --git a/meta/conf/machine/include/tune-sh4.inc b/meta/conf/machine/include/tune-sh4.inc
index 3d89d49..473122c 100644
--- a/meta/conf/machine/include/tune-sh4.inc
+++ b/meta/conf/machine/include/tune-sh4.inc
@@ -4,5 +4,5 @@ TUNE_ARCH = "sh4"
 # But it is not compatible for sh4.
 # The binary optimized by m4a doesn't operate on sh4. It works on sh4a only.
 
-TARGET_CC_ARCH = "-ml -m4"
+TUNE_CCARGS = "-ml -m4"
 TUNE_PKGARCH = "sh4"
diff --git a/meta/conf/machine/include/tune-strongarm1100.inc b/meta/conf/machine/include/tune-strongarm1100.inc
index 2d4ce38..ec29053 100644
--- a/meta/conf/machine/include/tune-strongarm1100.inc
+++ b/meta/conf/machine/include/tune-strongarm1100.inc
@@ -5,5 +5,5 @@ TUNE_PKGARCH = "arm"
 # This machine lists common configuration options for Strongarm 1100 devices
 # NOTE: The Zaurus Collie also has a Strongarm processor, but uses the 1110 type
 
-TARGET_CC_ARCH = "-march=armv4 -mtune=strongarm1100"
+TUNE_CCARGS = "-march=armv4 -mtune=strongarm1100"
 
diff --git a/meta/conf/machine/include/tune-supersparc.inc b/meta/conf/machine/include/tune-supersparc.inc
index 7eaa736..0faa361 100644
--- a/meta/conf/machine/include/tune-supersparc.inc
+++ b/meta/conf/machine/include/tune-supersparc.inc
@@ -1,4 +1,4 @@
 TUNE_ARCH = "sparc"
 
-TARGET_CC_ARCH = "-mcpu=supersparc"
+TUNE_CCARGS = "-mcpu=supersparc"
 TUNE_PKGARCH = "supersparc"
diff --git a/meta/conf/machine/include/tune-thumb.inc b/meta/conf/machine/include/tune-thumb.inc
index a25cb53..9f6ce95 100644
--- a/meta/conf/machine/include/tune-thumb.inc
+++ b/meta/conf/machine/include/tune-thumb.inc
@@ -27,6 +27,6 @@ ARM_INTERWORK_M_OPT = "${@['-mno-thumb-interwork', '-mthumb-interwork'][bb.data.
 ARM_THUMB_M_OPT = "${@['-mno-thumb', '-mthumb'][bb.data.getVar('ARM_INSTRUCTION_SET', d, 1) == 'thumb']}"
 
 #
-TARGET_CC_ARCH +=  "${ARM_INTERWORK_M_OPT} ${ARM_THUMB_M_OPT}"
+TUNE_CCARGS +=  "${ARM_INTERWORK_M_OPT} ${ARM_THUMB_M_OPT}"
 TARGET_CC_KERNEL_ARCH  += "-mno-thumb-interwork -mno-thumb"
 
diff --git a/meta/conf/machine/include/tune-x86_64.inc b/meta/conf/machine/include/tune-x86_64.inc
index d7665ec..08ff30a 100644
--- a/meta/conf/machine/include/tune-x86_64.inc
+++ b/meta/conf/machine/include/tune-x86_64.inc
@@ -1,5 +1,5 @@
 TUNE_ARCH = "x86_64"
 
 TUNE_PKGARCH = "x86_64"
-TARGET_CC_ARCH = "-m64"
+TUNE_CCARGS = "-m64"
 
diff --git a/meta/conf/machine/include/tune-xscale.inc b/meta/conf/machine/include/tune-xscale.inc
index 69c60f5..9618a8b 100644
--- a/meta/conf/machine/include/tune-xscale.inc
+++ b/meta/conf/machine/include/tune-xscale.inc
@@ -2,12 +2,12 @@ TUNE_ARCH = "arm"
 
 INHERIT += "siteinfo"
 
-TARGET_CC_ARCH = "-march=armv5te -mtune=xscale"
+TUNE_CCARGS = "-march=armv5te -mtune=xscale"
 TARGET_CC_KERNEL_ARCH = "-march=armv5te -mtune=xscale"
 TUNE_PKGARCH = "${@['armv5teb', 'armv5te'][bb.data.getVar('SITEINFO_ENDIANESS', d, 1) == 'le']}"
 PACKAGE_EXTRA_ARCHS = "${@['armeb armv4b armv4tb armv5teb', 'arm armv4 armv4t armv5te'][bb.data.getVar('SITEINFO_ENDIANESS', d, 1) == 'le']}"
 
 # webkit-gtk has alignment issues with double instructions on armv5 so
 # disable them here
-TARGET_CC_ARCH_pn-webkit-gtk = "-march=armv4t"
-TARGET_CC_ARCH_pn-cairo = "-march=armv4t"
+TUNE_CCARGS_pn-webkit-gtk = "-march=armv4t"
+TUNE_CCARGS_pn-cairo = "-march=armv4t"
-- 
1.7.4.1




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

* Re: [PATCH 3/3] conf/machine/include: Set TUNE_CCARGS instead of TARGET_CC_ARCH
  2011-07-22 14:49 ` [PATCH 3/3] conf/machine/include: Set TUNE_CCARGS instead of TARGET_CC_ARCH Richard Purdie
@ 2011-07-22 14:54   ` Koen Kooi
  2011-07-22 15:11     ` Richard Purdie
  0 siblings, 1 reply; 21+ messages in thread
From: Koen Kooi @ 2011-07-22 14:54 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer


Op 22 jul. 2011, om 16:49 heeft Richard Purdie het volgende geschreven:

> Since we're updating the tune file format, it makes sense to abstract
> the compiler tune arguments at this point too. This means that should
> these need to be overridden at any point, the original values can
> still be obtained in a similar manner to the other TUNE* variables.
> 
> Whilst this isn't strictly necessary for any current need, its likely
> good practise to standardise this behaviour.

So if I'm reading the patch correctly this doesn't result in a behaviour change, it just shuffles the definitions around in preparation for Mark's tune overhaul.

regards,

Koen


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

* Re: [PATCH 2/3] conf/machine/tune: Overhaul tune include file variables
  2011-07-22 14:49 ` [PATCH 2/3] conf/machine/tune: Overhaul tune include file variables Richard Purdie
@ 2011-07-22 15:03   ` Kumar Gala
  2011-07-22 15:13     ` Richard Purdie
  0 siblings, 1 reply; 21+ messages in thread
From: Kumar Gala @ 2011-07-22 15:03 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer


On Jul 22, 2011, at 9:49 AM, Richard Purdie wrote:

> There is currently consideradble confusion over how the tune files operate
> and how these interact with the rest of the build system. This update/overhaul
> changes things so the tune files are primarily resonsible for setting:
> 
> TUNE_ARCH - What was formerly set as TARGET_ARCH and is the value that
> represents the architecture we're targetting.
> 
> TUNE_PKGARCH - The value that represents the tune confuration that this set
> of tune parameters results in.
> 
> This allows the significant improvement that the core can now always determine
> the target architecture value, even when TARGET_ARCH needs to be reset to
> something different and likewise, there is one package architecture variable
> the core can reference allowing simplification of the BASE_PACKAGE_ARCH, PACKAGE_ARCH
> and FEED_ARCH variables.
> 
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---

Can you give an example of how this will work for multilib?

- k


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

* Re: [PATCH 3/3] conf/machine/include: Set TUNE_CCARGS instead of TARGET_CC_ARCH
  2011-07-22 14:54   ` Koen Kooi
@ 2011-07-22 15:11     ` Richard Purdie
  2011-07-22 15:15       ` Koen Kooi
  0 siblings, 1 reply; 21+ messages in thread
From: Richard Purdie @ 2011-07-22 15:11 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Fri, 2011-07-22 at 16:54 +0200, Koen Kooi wrote:
> Op 22 jul. 2011, om 16:49 heeft Richard Purdie het volgende geschreven:
> 
> > Since we're updating the tune file format, it makes sense to abstract
> > the compiler tune arguments at this point too. This means that should
> > these need to be overridden at any point, the original values can
> > still be obtained in a similar manner to the other TUNE* variables.
> > 
> > Whilst this isn't strictly necessary for any current need, its likely
> > good practise to standardise this behaviour.
> 
> So if I'm reading the patch correctly this doesn't result in a
> behaviour change, it just shuffles the definitions around in
> preparation for Mark's tune overhaul.

Yes.

I'm trying to split the work Mark and I have done into logical chunks we
can review and these are the pieces to setup the externally facing
variables we need.

I've not yet finished the patches which change the tune files themselves
but we have a pretty good idea of what the finished result needs to look
like to get all this working which we have experimented and tested with.

Cheers,

Richard






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

* Re: [PATCH 2/3] conf/machine/tune: Overhaul tune include file variables
  2011-07-22 15:03   ` Kumar Gala
@ 2011-07-22 15:13     ` Richard Purdie
  0 siblings, 0 replies; 21+ messages in thread
From: Richard Purdie @ 2011-07-22 15:13 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Fri, 2011-07-22 at 10:03 -0500, Kumar Gala wrote:
> On Jul 22, 2011, at 9:49 AM, Richard Purdie wrote:
> 
> > There is currently consideradble confusion over how the tune files operate
> > and how these interact with the rest of the build system. This update/overhaul
> > changes things so the tune files are primarily resonsible for setting:
> > 
> > TUNE_ARCH - What was formerly set as TARGET_ARCH and is the value that
> > represents the architecture we're targetting.
> > 
> > TUNE_PKGARCH - The value that represents the tune confuration that this set
> > of tune parameters results in.
> > 
> > This allows the significant improvement that the core can now always determine
> > the target architecture value, even when TARGET_ARCH needs to be reset to
> > something different and likewise, there is one package architecture variable
> > the core can reference allowing simplification of the BASE_PACKAGE_ARCH, PACKAGE_ARCH
> > and FEED_ARCH variables.
> > 
> > Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> > ---
> 
> Can you give an example of how this will work for multilib?

These are setting the scene for multilib, it doesn't directly enable it.
For an example of the end result see this branch:

http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=mhatle/oe-core/ml

but this isn't in a form suitable for submission yet which is what I'm
working towards.

Cheers,

Richard








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

* Re: [PATCH 3/3] conf/machine/include: Set TUNE_CCARGS instead of TARGET_CC_ARCH
  2011-07-22 15:11     ` Richard Purdie
@ 2011-07-22 15:15       ` Koen Kooi
  0 siblings, 0 replies; 21+ messages in thread
From: Koen Kooi @ 2011-07-22 15:15 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer


Op 22 jul. 2011, om 17:11 heeft Richard Purdie het volgende geschreven:

> On Fri, 2011-07-22 at 16:54 +0200, Koen Kooi wrote:
>> Op 22 jul. 2011, om 16:49 heeft Richard Purdie het volgende geschreven:
>> 
>>> Since we're updating the tune file format, it makes sense to abstract
>>> the compiler tune arguments at this point too. This means that should
>>> these need to be overridden at any point, the original values can
>>> still be obtained in a similar manner to the other TUNE* variables.
>>> 
>>> Whilst this isn't strictly necessary for any current need, its likely
>>> good practise to standardise this behaviour.
>> 
>> So if I'm reading the patch correctly this doesn't result in a
>> behaviour change, it just shuffles the definitions around in
>> preparation for Mark's tune overhaul.
> 
> Yes.
> 
> I'm trying to split the work Mark and I have done into logical chunks we
> can review and these are the pieces to setup the externally facing
> variables we need.
> 
> I've not yet finished the patches which change the tune files themselves
> but we have a pretty good idea of what the finished result needs to look
> like to get all this working which we have experimented and tested with.


After some changes to meta-ti to move aside the tune files in there 'bitbake -e' is functionally the same. So for arm926 and cortexa8:

Tested-by: Koen Kooi <koen@dominion.thruhere.net>

regards,

Koen


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

* [PATCH 5/3] conf/machine/include: Start to fill out architecture specific tune include files and tune features
  2011-07-22 14:49 [PATCH 0/3] First round of tune config file updates Richard Purdie
                   ` (2 preceding siblings ...)
  2011-07-22 14:49 ` [PATCH 3/3] conf/machine/include: Set TUNE_CCARGS instead of TARGET_CC_ARCH Richard Purdie
@ 2011-07-22 18:00 ` Richard Purdie
  2011-07-22 18:14   ` Tom Rini
  2011-07-22 18:00 ` [PATCH 4/3] bitbake.conf/classes: Variable cleanup Richard Purdie
  2011-07-22 18:01 ` [PATCH 6/3] Move architecture specific TARGET_OS mangling into tune files Richard Purdie
  5 siblings, 1 reply; 21+ messages in thread
From: Richard Purdie @ 2011-07-22 18:00 UTC (permalink / raw)
  To: openembedded-core

These changes revolve around the idea of tune features. These are represented by
'flag' strings that are included in the TUNE_FEATURES variable.

Any string included in TUNE_FEATURES should also add a TUNEVALID[<name>] entry so
we can know which flags are available in TUNE_FEATURES and have documentation about
what the flags do. We will add sanity code to error if flags are listed in
TUNE_FEATURES but are not documented in TUNEVALID.

A given tune configuration will want to define one or more predetermined sets of
_FEATURE flag lists. These are defined in the form TUNE_FEATURES_tune-<name>.
For defined tune configuation, <name> should be added to the AVAILTUNE list so that
we can determine what tune configurations are available. Flags cannot be used in this
case as with TUNEVALID since its useful to be able to build up tune lists from other
TUNE_FEATURES_tune-yyy options.

A given tune configuration may also define PACKAGE_EXTRA_ARCHS_tune-<name> and
BASE_LIB_tune-<name> to control the multilib location. All options can be overridden
by the distro or local user configuration.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 47ce023..61312bc 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -83,6 +83,8 @@ HOST_EXEEXT = ""
 
 TUNE_ARCH ??= "INVALID"
 TUNE_CCARGS ??= ""
+TUNE_FEATURES ??= "${TUNE_FEATURES_tune-${DEFAULTTUNE}}"
+PACKAGE_EXTRA_ARCHS_tune-${DEFAULTTUNE} ??= "${TARGET_ARCH}"
 
 TARGET_ARCH = "${TUNE_ARCH}"
 TARGET_OS = "INVALID"
@@ -100,7 +102,7 @@ SDK_CC_ARCH = "${BUILD_CC_ARCH}"
 
 PACKAGE_ARCH = "${TUNE_PKGARCH}"
 MACHINE_ARCH = "${@[bb.data.getVar('TUNE_PKGARCH', d, 1), bb.data.getVar('MACHINE', d, 1)][bool(bb.data.getVar('MACHINE', d, 1))].replace('-', '_')}"
-PACKAGE_EXTRA_ARCHS ??= "${TARGET_ARCH}"
+PACKAGE_EXTRA_ARCHS ??= "${PACKAGE_EXTRA_ARCHS_tune-${DEFAULTTUNE}}"
 PACKAGE_ARCHS = "all any noarch ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}"
 # MACHINE_ARCH shouldn't be included here as a variable dependency
 # since machine specific packages are handled using multimachine
diff --git a/meta/conf/machine/include/arm/arch-arm.inc b/meta/conf/machine/include/arm/arch-arm.inc
new file mode 100644
index 0000000..e773d14
--- a/dev/null
+++ b/meta/conf/machine/include/arm/arch-arm.inc
@@ -0,0 +1 @@
+TUNE_ARCH = "arm"
diff --git a/meta/conf/machine/include/ia32/arch-ia32.inc b/meta/conf/machine/include/ia32/arch-ia32.inc
new file mode 100644
index 0000000..3a9d0bc
--- a/dev/null
+++ b/meta/conf/machine/include/ia32/arch-ia32.inc
@@ -0,0 +1,29 @@
+#
+# IA32 Architecture definition
+#
+
+DEFAULTTUNE = "x86"
+TARGET_FPU = "hard"
+
+# ELF32 ABI
+TUNEVALID[m32] = "IA32 ELF32 standard ABI"
+TUNECONFLICTS[m32] = "m64"
+TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "m32", "i586", "" ,d)}"
+TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "m32", "-m32", "", d)}"
+
+# ELF64 ABI
+TUNEVALID[m64] = "IA32e (x86_64) ELF64 standard ABI"
+TUNECONFLICT[m64] = "m32"
+TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "m64", "x86_64", "" ,d)}"
+TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "m64", "-m64", "", d)}"
+
+# Default Tune configurations
+AVAILTUNES += "x86"
+TUNE_FEATURES_tune-x86 ?= "m32"
+BASE_LIB_tune-x86 = "lib"
+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"
\ No newline at end of file
diff --git a/meta/conf/machine/include/mips/arch-mips.inc b/meta/conf/machine/include/mips/arch-mips.inc
new file mode 100644
index 0000000..f7f4eed
--- a/dev/null
+++ b/meta/conf/machine/include/mips/arch-mips.inc
@@ -0,0 +1 @@
+TUNE_ARCH = "mips"
diff --git a/meta/conf/machine/include/powerpc/arch-powerpc.inc b/meta/conf/machine/include/powerpc/arch-powerpc.inc
new file mode 100644
index 0000000..5ab81d4
--- a/dev/null
+++ b/meta/conf/machine/include/powerpc/arch-powerpc.inc
@@ -0,0 +1 @@
+TUNE_ARCH = "powerpc"
diff --git a/meta/conf/machine/include/tune-arm1136jf-s.inc b/meta/conf/machine/include/tune-arm1136jf-s.inc
index c1d0c07..953f0dd 100644
--- a/meta/conf/machine/include/tune-arm1136jf-s.inc
+++ b/meta/conf/machine/include/tune-arm1136jf-s.inc
@@ -1,4 +1,4 @@
-TUNE_ARCH = "arm"
+require conf/machine/include/arm/arch-arm.inc
 
 TUNE_CCARGS = "-march=armv6j -mtune=arm1136jf-s"
 TUNE_CCARGS += "${@['', '-mfloat-abi=softfp -mfpu=vfp'][(bb.data.getVar('TARGET_FPU', d, 1) == 'soft') and (bb.data.getVar('CPU_FEATURES', d, 1).find('vfp') != -1)]}"
diff --git a/meta/conf/machine/include/tune-arm920t.inc b/meta/conf/machine/include/tune-arm920t.inc
index 3f30e2a..6c87026 100644
--- a/meta/conf/machine/include/tune-arm920t.inc
+++ b/meta/conf/machine/include/tune-arm920t.inc
@@ -1,4 +1,4 @@
-TUNE_ARCH = "arm"
+require conf/machine/include/arm/arch-arm.inc
 
 TUNE_PKGARCH = "armv4t"
 TUNE_CCARGS = "-march=armv4t -mtune=arm920t"
diff --git a/meta/conf/machine/include/tune-arm926ejs.inc b/meta/conf/machine/include/tune-arm926ejs.inc
index 049f57c..543ab62 100644
--- a/meta/conf/machine/include/tune-arm926ejs.inc
+++ b/meta/conf/machine/include/tune-arm926ejs.inc
@@ -1,4 +1,4 @@
-TUNE_ARCH = "arm"
+require conf/machine/include/arm/arch-arm.inc
 
 TUNE_PKGARCH = "armv5te"
 PACKAGE_EXTRA_ARCHS = "arm armv4 armv4t armv5te"
diff --git a/meta/conf/machine/include/tune-arm9tdmi.inc b/meta/conf/machine/include/tune-arm9tdmi.inc
index 0ed2f40..f1001ac 100644
--- a/meta/conf/machine/include/tune-arm9tdmi.inc
+++ b/meta/conf/machine/include/tune-arm9tdmi.inc
@@ -1,4 +1,4 @@
-TUNE_ARCH = "arm"
+require conf/machine/include/arm/arch-arm.inc
 
 TUNE_PKGARCH = "armv4t"
 PACKAGE_EXTRA_ARCHS = "arm armv4 armv4t"
diff --git a/meta/conf/machine/include/tune-armv7.inc b/meta/conf/machine/include/tune-armv7.inc
index 2e32323..8a68c0a 100644
--- a/meta/conf/machine/include/tune-armv7.inc
+++ b/meta/conf/machine/include/tune-armv7.inc
@@ -1,4 +1,4 @@
-TUNE_ARCH = "arm"
+require conf/machine/include/arm/arch-arm.inc
 
 # valid options for -march: `armv7', `armv7-a', `armv7-r', `armv7-m'
 # valid option for -mtune: `cortex-a8', `cortex-r4', `cortex-m3', `cortex-m1'
diff --git a/meta/conf/machine/include/tune-atom.inc b/meta/conf/machine/include/tune-atom.inc
index 52acd12..5e1bb74 100644
--- a/meta/conf/machine/include/tune-atom.inc
+++ b/meta/conf/machine/include/tune-atom.inc
@@ -1,7 +1,2 @@
-TUNE_ARCH = "i586"
-
-TUNE_PKGARCH = "core2"
-TUNE_CCARGS = "-m32 -march=core2 -msse3 -mtune=generic -mfpmath=sse"
-#MOBLIN_CFLAGS = "-Os -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -fasynchronous-unwind-tables"
-
-PACKAGE_EXTRA_ARCHS = "x86 i386 i486 i586 i686 core2"
+# Atom tunings are the same as core2 for now...
+require conf/machine/include/tune-core2.inc
diff --git a/meta/conf/machine/include/tune-c3.inc b/meta/conf/machine/include/tune-c3.inc
index dbe1e43..e1569f5 100644
--- a/meta/conf/machine/include/tune-c3.inc
+++ b/meta/conf/machine/include/tune-c3.inc
@@ -1,4 +1,4 @@
-TUNE_ARCH = "i586"
+require conf/machine/include/ia32/arch-ia32.inc
 
 TUNE_PKGARCH = "i586"
 
diff --git a/meta/conf/machine/include/tune-core2.inc b/meta/conf/machine/include/tune-core2.inc
new file mode 100644
index 0000000..e94c290
--- a/dev/null
+++ b/meta/conf/machine/include/tune-core2.inc
@@ -0,0 +1,21 @@
+require conf/machine/include/tune-i586.inc
+
+DEFAULTTUNE = "core2"
+TUNE_ARCH = "${@bb.utils.contains("TUNE_FEATURES", "m32", "i686", "x86_64", d)}"
+TUNE_PKGARCH = "${@bb.utils.contains("TUNE_FEATURES", "m32", "core2", "core2-64", d)}"
+
+# Extra tune features
+TUNEVALID[core2] = "Enable core2 specific processor optimizations"
+TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "core2", "-march=core2 -msse3 -mtune=generic -mfpmath=sse", "", d)}"
+
+# Extra tune selections
+AVAILTUNES += "core2"
+TUNE_FEATURES_tune-core2 ?= "${TUNE_FEATURES_tune-x86} core2"
+BASE_LIB_tune-core2 = "lib"
+PACKAGE_EXTRA_ARCHS_tune-core2 = "${PACKAGE_EXTRA_ARCHS_tune-x86} i386 i486 i586 i686 core2"
+
+AVAILTUNES += "core2-64"
+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"
+
diff --git a/meta/conf/machine/include/tune-cortexa8.inc b/meta/conf/machine/include/tune-cortexa8.inc
index 9be423a..ae50954 100644
--- a/meta/conf/machine/include/tune-cortexa8.inc
+++ b/meta/conf/machine/include/tune-cortexa8.inc
@@ -1,4 +1,5 @@
-TUNE_ARCH = "arm"
+require conf/machine/include/arm/arch-arm.inc
+
 
 # Instead of using -mfpu=vfp[2] we can use -mfpu=neon to make use of gcc intrinsics[1] and vectorize loops with -ftree-vectorize[3]
 # [1] http://gcc.gnu.org/onlinedocs/gcc/ARM-NEON-Intrinsics.html
diff --git a/meta/conf/machine/include/tune-cortexm1.inc b/meta/conf/machine/include/tune-cortexm1.inc
index d0d3b2c..b944db4 100644
--- a/meta/conf/machine/include/tune-cortexm1.inc
+++ b/meta/conf/machine/include/tune-cortexm1.inc
@@ -1,4 +1,4 @@
-TUNE_ARCH = "arm"
+require conf/machine/include/arm/arch-arm.inc
 
 TUNE_CCARGS = "-march=armv7 -mtune=cortex-m1 -mfpu=vfp -mfloat-abi=softfp"
 TUNE_PKGARCH = "armv6"
diff --git a/meta/conf/machine/include/tune-cortexm3.inc b/meta/conf/machine/include/tune-cortexm3.inc
index 495c8f6..a77cbdd 100644
--- a/meta/conf/machine/include/tune-cortexm3.inc
+++ b/meta/conf/machine/include/tune-cortexm3.inc
@@ -1,4 +1,4 @@
-TUNE_ARCH = "arm"
+require conf/machine/include/arm/arch-arm.inc
 
 # valid options for -march: `armv7', `armv7-m'
 TUNE_CCARGS = "-march=armv7-m -mtune=cortex-m3 -mfpu=vfp -mfloat-abi=softfp"
diff --git a/meta/conf/machine/include/tune-cortexr4.inc b/meta/conf/machine/include/tune-cortexr4.inc
index c775e83..c9193ca 100644
--- a/meta/conf/machine/include/tune-cortexr4.inc
+++ b/meta/conf/machine/include/tune-cortexr4.inc
@@ -1,4 +1,4 @@
-TUNE_ARCH = "arm"
+require conf/machine/include/arm/arch-arm.inc
 
 # valid options for -march: `armv7', `armv7-r'
 TUNE_CCARGS = "-march=armv7-r -mtune=cortex-r4 -mfpu=vfp -mfloat-abi=softfp"
diff --git a/meta/conf/machine/include/tune-ep9312.inc b/meta/conf/machine/include/tune-ep9312.inc
index 8c7fc5a..e04a00a 100644
--- a/meta/conf/machine/include/tune-ep9312.inc
+++ b/meta/conf/machine/include/tune-ep9312.inc
@@ -1,4 +1,4 @@
-TUNE_ARCH = "arm"
+require conf/machine/include/arm/arch-arm.inc
 
 TUNE_CCARGS = "-march=ep9312 -mtune=ep9312 -mcpu=ep9312"
 # add "-mfp=maverick" for newer gcc versions > 4.0
diff --git a/meta/conf/machine/include/tune-i586.inc b/meta/conf/machine/include/tune-i586.inc
index 1dc44df..88c9221 100644
--- a/meta/conf/machine/include/tune-i586.inc
+++ b/meta/conf/machine/include/tune-i586.inc
@@ -1,6 +1,15 @@
-TUNE_ARCH = "i586"
+require conf/machine/include/ia32/arch-ia32.inc
 
+DEFAULTTUNE = "i586"
 TUNE_PKGARCH = "i586"
-TUNE_CCARGS = "-m32 -march=i586"
 
-PACKAGE_EXTRA_ARCHS = "x86 i386 i486 i586"
+# Extra tune features
+TUNEVALID[i586] = "Enable i586 specific processor optimizations"
+TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "i586", "-march=i586", "", d)}"
+
+# Extra tune selections
+AVAILTUNES += "i586"
+TUNE_FEATURES_tune-i586 ?= "${TUNE_FEATURES_tune-x86} i586"
+BASE_LIB_tune-i586 = "lib"
+PACKAGE_EXTRA_ARCHS_tune-i586 = "${PACKAGE_EXTRA_ARCHS_tune-x86} i386 i486 i586"
+
diff --git a/meta/conf/machine/include/tune-iwmmxt.inc b/meta/conf/machine/include/tune-iwmmxt.inc
index 236cede..6bb76d5 100644
--- a/meta/conf/machine/include/tune-iwmmxt.inc
+++ b/meta/conf/machine/include/tune-iwmmxt.inc
@@ -1,4 +1,4 @@
-TUNE_ARCH = "arm"
+require conf/machine/include/arm/arch-arm.inc
 
 # Configurations for the Intel PXA27x Appications Processor Family. 
 # Please use tune-xscale for PXA255/PXA26x based processors.
diff --git a/meta/conf/machine/include/tune-mips32.inc b/meta/conf/machine/include/tune-mips32.inc
index 182d16c..28b0047 100644
--- a/meta/conf/machine/include/tune-mips32.inc
+++ b/meta/conf/machine/include/tune-mips32.inc
@@ -1,4 +1,4 @@
-TUNE_ARCH = "mips"
+require conf/machine/include/mips/arch-mips.inc
 
 TUNE_CCARGS = "-march=mips32"
 TUNE_PKGARCH = "mips"
diff --git a/meta/conf/machine/include/tune-ppc603e.inc b/meta/conf/machine/include/tune-ppc603e.inc
index ec43cfe..61c0669 100644
--- a/meta/conf/machine/include/tune-ppc603e.inc
+++ b/meta/conf/machine/include/tune-ppc603e.inc
@@ -1,4 +1,4 @@
-TUNE_ARCH = "powerpc"
+require conf/machine/include/powerpc/arch-powerpc.inc
 
 TUNE_CCARGS = "-mcpu=603e  -mhard-float"
 TUNE_PKGARCH = "ppc603e"
diff --git a/meta/conf/machine/include/tune-ppce300c2.inc b/meta/conf/machine/include/tune-ppce300c2.inc
index ac23242..a38e97c 100644
--- a/meta/conf/machine/include/tune-ppce300c2.inc
+++ b/meta/conf/machine/include/tune-ppce300c2.inc
@@ -1,4 +1,4 @@
-TUNE_ARCH = "powerpc"
+require conf/machine/include/powerpc/arch-powerpc.inc
 
 TUNE_CCARGS = "-mcpu=e300c2 -msoft-float"
 TUNE_PKGARCH = "ppce300"
diff --git a/meta/conf/machine/include/tune-ppce500.inc b/meta/conf/machine/include/tune-ppce500.inc
index a342cfb..22208f0 100644
--- a/meta/conf/machine/include/tune-ppce500.inc
+++ b/meta/conf/machine/include/tune-ppce500.inc
@@ -1,4 +1,4 @@
-TUNE_ARCH = "powerpc"
+require conf/machine/include/powerpc/arch-powerpc.inc
 
 TUNE_CCARGS = "-mcpu=8540"
 BASE_PACKAGE_ARCH = "ppce500"
diff --git a/meta/conf/machine/include/tune-ppce500mc.inc b/meta/conf/machine/include/tune-ppce500mc.inc
index 497c1a4..182d019 100644
--- a/meta/conf/machine/include/tune-ppce500mc.inc
+++ b/meta/conf/machine/include/tune-ppce500mc.inc
@@ -1,4 +1,4 @@
-TUNE_ARCH = "powerpc"
+require conf/machine/include/powerpc/arch-powerpc.inc
 
 TUNE_CCARGS = "-mcpu=e500mc"
 TUNE_PKGARCH = "ppce500mc"
diff --git a/meta/conf/machine/include/tune-ppce500v2.inc b/meta/conf/machine/include/tune-ppce500v2.inc
index 1c56829..daf2d58 100644
--- a/meta/conf/machine/include/tune-ppce500v2.inc
+++ b/meta/conf/machine/include/tune-ppce500v2.inc
@@ -1,4 +1,4 @@
-TUNE_ARCH = "powerpc"
+require conf/machine/include/powerpc/arch-powerpc.inc
 
 TUNE_CCARGS = "-mcpu=8548 -mabi=spe -mspe"
 TUNE_PKGARCH = "ppce500v2"
diff --git a/meta/conf/machine/include/tune-strongarm1100.inc b/meta/conf/machine/include/tune-strongarm1100.inc
index ec29053..2b76069 100644
--- a/meta/conf/machine/include/tune-strongarm1100.inc
+++ b/meta/conf/machine/include/tune-strongarm1100.inc
@@ -1,4 +1,4 @@
-TUNE_ARCH = "arm"
+require conf/machine/include/arm/arch-arm.inc
 
 TUNE_PKGARCH = "arm"
 
diff --git a/meta/conf/machine/include/tune-x86_64.inc b/meta/conf/machine/include/tune-x86_64.inc
index 08ff30a..04b0f96 100644
--- a/meta/conf/machine/include/tune-x86_64.inc
+++ b/meta/conf/machine/include/tune-x86_64.inc
@@ -1,5 +1,3 @@
-TUNE_ARCH = "x86_64"
-
-TUNE_PKGARCH = "x86_64"
-TUNE_CCARGS = "-m64"
+require conf/machine/include/ia32/arch-ia32.inc
 
+DEFAULTTUNE = "x86-64"
diff --git a/meta/conf/machine/include/tune-xscale.inc b/meta/conf/machine/include/tune-xscale.inc
index 9618a8b..71dba5b 100644
--- a/meta/conf/machine/include/tune-xscale.inc
+++ b/meta/conf/machine/include/tune-xscale.inc
@@ -1,4 +1,4 @@
-TUNE_ARCH = "arm"
+require conf/machine/include/arm/arch-arm.inc
 
 INHERIT += "siteinfo"
 





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

* [PATCH 4/3] bitbake.conf/classes: Variable cleanup
  2011-07-22 14:49 [PATCH 0/3] First round of tune config file updates Richard Purdie
                   ` (3 preceding siblings ...)
  2011-07-22 18:00 ` [PATCH 5/3] conf/machine/include: Start to fill out architecture specific tune include files and tune features Richard Purdie
@ 2011-07-22 18:00 ` Richard Purdie
  2011-07-22 18:01 ` [PATCH 6/3] Move architecture specific TARGET_OS mangling into tune files Richard Purdie
  5 siblings, 0 replies; 21+ messages in thread
From: Richard Purdie @ 2011-07-22 18:00 UTC (permalink / raw)
  To: openembedded-core

This patch removes the variables BASE_PACKAGE_ARCH, BASEPKG_HOST_SYS,
BASEPKG_TARGET_SYS and also removes the immediate assignments in
several core classes as these are no longer required.

This should make it clearer what some of the core variables do and
simplfy some overly complex and confusing class code.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/meta/classes/allarch.bbclass b/meta/classes/allarch.bbclass
index e3ac392..26fca70 100644
--- a/meta/classes/allarch.bbclass
+++ b/meta/classes/allarch.bbclass
@@ -2,7 +2,6 @@
 # This class is used for architecture independent recipes/data files (usally scripts)
 #
 
-BASE_PACKAGE_ARCH = "all"
 PACKAGE_ARCH = "all"
 
 # No need for virtual/libc or a cross compiler
diff --git a/meta/classes/cross-canadian.bbclass b/meta/classes/cross-canadian.bbclass
index edd51da..c878d7f 100644
--- a/meta/classes/cross-canadian.bbclass
+++ b/meta/classes/cross-canadian.bbclass
@@ -9,15 +9,12 @@
 # or indirectly via dependency.  No need to be in 'world'.
 EXCLUDE_FROM_WORLD = "1"
 
-STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${SDK_ARCH}${SDK_VENDOR}-${SDK_OS}:${STAGING_DIR_NATIVE}${bindir_native}/${OLD_BASE_PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
+STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${SDK_ARCH}${SDK_VENDOR}-${SDK_OS}:${STAGING_DIR_NATIVE}${bindir_native}/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}"
 
 #
 # Update BASE_PACKAGE_ARCH and PACKAGE_ARCHS
 #
-OLD_PACKAGE_ARCH := "${PACKAGE_ARCH}"
-OLD_MULTIMACH_TARGET_SYS := "${MULTIMACH_TARGET_SYS}"
-OLD_BASE_PACKAGE_ARCH := ${BASE_PACKAGE_ARCH}
-BASE_PACKAGE_ARCH = "${SDK_ARCH}-nativesdk"
+PACKAGE_ARCH = "${SDK_ARCH}-nativesdk"
 python () {
     archs = bb.data.getVar('PACKAGE_ARCHS', d, True).split()
     sdkarchs = []
@@ -66,12 +63,12 @@ target_exec_prefix := "${exec_prefix}"
 base_prefix = "${SDKPATHNATIVE}"
 prefix = "${SDKPATHNATIVE}${prefix_nativesdk}"
 exec_prefix = "${SDKPATHNATIVE}${prefix_nativesdk}"
-bindir = "${exec_prefix}/bin/${OLD_PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
+bindir = "${exec_prefix}/bin/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}"
 sbindir = "${bindir}"
 base_bindir = "${bindir}"
 base_sbindir = "${bindir}"
-libdir = "${exec_prefix}/lib/${OLD_PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
-libexecdir = "${exec_prefix}/libexec/${OLD_PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
+libdir = "${exec_prefix}/lib/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}"
+libexecdir = "${exec_prefix}/libexec/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}"
 
 FILES_${PN} = "${prefix}"
 FILES_${PN}-dbg += "${prefix}/.debug \
diff --git a/meta/classes/cross.bbclass b/meta/classes/cross.bbclass
index 81358ec..050d63e 100644
--- a/meta/classes/cross.bbclass
+++ b/meta/classes/cross.bbclass
@@ -4,14 +4,6 @@ inherit relocatable
 # no need for them to be a direct target of 'world'
 EXCLUDE_FROM_WORLD = "1"
 
-# Save PACKAGE_ARCH before changing HOST_ARCH
-OLD_PACKAGE_ARCH := "${PACKAGE_ARCH}"
-PACKAGE_ARCH = "${OLD_PACKAGE_ARCH}"
-# Also save BASE_PACKAGE_ARCH since HOST_ARCH can influence it
-OLD_BASE_PACKAGE_ARCH := "${BASE_PACKAGE_ARCH}"
-BASE_PACKAGE_ARCH = "${OLD_BASE_PACKAGE_ARCH}"
-BASEPKG_HOST_SYS = "${HOST_ARCH}${HOST_VENDOR}-${HOST_OS}"
-
 PACKAGES = ""
 
 HOST_ARCH = "${BUILD_ARCH}"
@@ -20,10 +12,10 @@ HOST_OS = "${BUILD_OS}"
 HOST_PREFIX = "${BUILD_PREFIX}"
 HOST_CC_ARCH = "${BUILD_CC_ARCH}"
 
-STAGING_DIR_HOST = "${STAGING_DIR}/${BASEPKG_HOST_SYS}"
+STAGING_DIR_HOST = "${STAGING_DIR}/${HOST_ARCH}${HOST_VENDOR}-${HOST_OS}"
 
-export PKG_CONFIG_DIR = "${STAGING_DIR}/${BASE_PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}${libdir}/pkgconfig"
-export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR}/${BASE_PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
+export PKG_CONFIG_DIR = "${STAGING_DIR}/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}${libdir}/pkgconfig"
+export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR}/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}"
 
 CPPFLAGS = "${BUILD_CPPFLAGS}"
 CFLAGS = "${BUILD_CFLAGS}"
diff --git a/meta/classes/crosssdk.bbclass b/meta/classes/crosssdk.bbclass
index 3952ebd..a2e5a22 100644
--- a/meta/classes/crosssdk.bbclass
+++ b/meta/classes/crosssdk.bbclass
@@ -1,8 +1,8 @@
 inherit cross
 
-BASE_PACKAGE_ARCH = "${SDK_ARCH}"
-PACKAGE_ARCH = "${BASE_PACKAGE_ARCH}"
+PACKAGE_ARCH = "${SDK_ARCH}"
 STAGING_DIR_TARGET = "${STAGING_DIR}/${SDK_ARCH}-nativesdk${SDK_VENDOR}-${SDK_OS}"
+STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${TARGET_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
 
 TARGET_ARCH = "${SDK_ARCH}"
 TARGET_VENDOR = "${SDK_VENDOR}"
diff --git a/meta/classes/native.bbclass b/meta/classes/native.bbclass
index 1e8de95..00f7b9f 100644
--- a/meta/classes/native.bbclass
+++ b/meta/classes/native.bbclass
@@ -15,10 +15,6 @@ PACKAGE_ARCH = "${BUILD_ARCH}"
 OECMAKE_RPATH = "${libdir}"
 OECMAKE_RPATH_virtclass-native = "${libdir}"
 
-BASE_PACKAGE_ARCH = "${BUILD_ARCH}"
-BASEPKG_HOST_SYS = "${BUILD_ARCH}${BUILD_VENDOR}-${BUILD_OS}"
-BASEPKG_TARGET_SYS = "${BUILD_ARCH}${BUILD_VENDOR}-${BUILD_OS}"
-
 # When this class has packaging enabled, setting 
 # RPROVIDES becomes unnecessary.
 RPROVIDES = "${PN}"
diff --git a/meta/classes/nativesdk.bbclass b/meta/classes/nativesdk.bbclass
index 3fe4bf9..de7a883 100644
--- a/meta/classes/nativesdk.bbclass
+++ b/meta/classes/nativesdk.bbclass
@@ -5,10 +5,9 @@ EXCLUDE_FROM_WORLD = "1"
 STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${SDK_ARCH}${SDK_VENDOR}-${SDK_OS}"
 
 #
-# Update BASE_PACKAGE_ARCH and PACKAGE_ARCHS
+# Update PACKAGE_ARCH and PACKAGE_ARCHS
 #
-OLD_PACKAGE_ARCH := ${BASE_PACKAGE_ARCH}
-BASE_PACKAGE_ARCH = "${SDK_ARCH}-nativesdk"
+PACKAGE_ARCH = "${SDK_ARCH}-nativesdk"
 python () {
     archs = bb.data.getVar('PACKAGE_ARCHS', d, True).split()
     sdkarchs = []
@@ -17,10 +16,8 @@ python () {
     bb.data.setVar('PACKAGE_ARCHS', " ".join(sdkarchs), d)
 }
 
-#STAGING_DIR_HOST = "${STAGING_DIR}/${HOST_SYS}-nativesdk"
-#STAGING_DIR_TARGET = "${STAGING_DIR}/${BASEPKG_TARGET_SYS}-nativesdk"
-STAGING_DIR_HOST = "${STAGING_DIR}/${BASEPKG_HOST_SYS}"
-STAGING_DIR_TARGET = "${STAGING_DIR}/${BASEPKG_TARGET_SYS}"
+STAGING_DIR_HOST = "${STAGING_DIR}/${MULTIMACH_HOST_SYS}"
+STAGING_DIR_TARGET = "${STAGING_DIR}/${MULTIMACH_TARGET_SYS}"
 
 HOST_ARCH = "${SDK_ARCH}"
 HOST_VENDOR = "${SDK_VENDOR}"
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 62c7c43..c057cc7 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -22,14 +22,14 @@ python () {
     if bb.data.inherits_class('native', d):
         bb.data.setVar('SSTATE_PKGARCH', bb.data.getVar('BUILD_ARCH', d), d)
     elif bb.data.inherits_class('cross', d):
-        bb.data.setVar('SSTATE_PKGARCH', bb.data.expand("${BUILD_ARCH}_${BASE_PACKAGE_ARCH}", d), d)
+        bb.data.setVar('SSTATE_PKGARCH', bb.data.expand("${BUILD_ARCH}_${TUNE_PKGARCH}", d), d)
         bb.data.setVar('SSTATE_MANMACH', bb.data.expand("${BUILD_ARCH}_${MACHINE}", d), d)
     elif bb.data.inherits_class('crosssdk', d):
-        bb.data.setVar('SSTATE_PKGARCH', bb.data.expand("${BUILD_ARCH}_${BASE_PACKAGE_ARCH}", d), d)
+        bb.data.setVar('SSTATE_PKGARCH', bb.data.expand("${BUILD_ARCH}_${PACKAGE_ARCH}", d), d)
     elif bb.data.inherits_class('nativesdk', d):
         bb.data.setVar('SSTATE_PKGARCH', bb.data.expand("${SDK_ARCH}", d), d)
     elif bb.data.inherits_class('cross-canadian', d):
-        bb.data.setVar('SSTATE_PKGARCH', bb.data.expand("${SDK_ARCH}_${BASE_PACKAGE_ARCH}", d), d)
+        bb.data.setVar('SSTATE_PKGARCH', bb.data.expand("${SDK_ARCH}_${PACKAGE_ARCH}", d), d)
     else:
         bb.data.setVar('SSTATE_MANMACH', bb.data.expand("${MACHINE}", d), d)
 
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 2954faa..9d1c769 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -98,8 +98,7 @@ SDK_SYS = "${SDK_ARCH}${SDK_VENDOR}${@['-' + bb.data.getVar('SDK_OS', d, 1), '']
 SDK_PREFIX = "${SDK_SYS}-"
 SDK_CC_ARCH = "${BUILD_CC_ARCH}"
 
-BASE_PACKAGE_ARCH = "${TUNE_PKGARCH}"
-PACKAGE_ARCH = "${BASE_PACKAGE_ARCH}"
+PACKAGE_ARCH = "${TUNE_PKGARCH}"
 MACHINE_ARCH = "${@[bb.data.getVar('TUNE_PKGARCH', d, 1), bb.data.getVar('MACHINE', d, 1)][bool(bb.data.getVar('MACHINE', d, 1))].replace('-', '_')}"
 PACKAGE_EXTRA_ARCHS ??= "${TARGET_ARCH}"
 PACKAGE_ARCHS = "all any noarch ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}"
@@ -109,8 +108,6 @@ PACKAGE_ARCHS[vardepsexclude] = "MACHINE_ARCH"
 
 MULTIMACH_TARGET_SYS = "${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
 MULTIMACH_HOST_SYS = "${PACKAGE_ARCH}${HOST_VENDOR}-${HOST_OS}"
-BASEPKG_HOST_SYS = "${BASE_PACKAGE_ARCH}${HOST_VENDOR}-${HOST_OS}"
-BASEPKG_TARGET_SYS = "${BASE_PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
 
 # select proper CPU to get binary locales generated
 QEMU_OPTIONS = ""
@@ -317,7 +314,7 @@ STAGING_DIR = "${TMPDIR}/sysroots"
 STAGING_DIR_NATIVE = "${STAGING_DIR}/${BUILD_SYS}"
 STAGING_BINDIR_NATIVE = "${STAGING_DIR_NATIVE}${bindir_native}"
 STAGING_BINDIR_CROSS = "${STAGING_BINDIR}/crossscripts"
-STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${BASEPKG_TARGET_SYS}"
+STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}"
 STAGING_LIBDIR_NATIVE = "${STAGING_DIR_NATIVE}${libdir_native}"
 STAGING_INCDIR_NATIVE = "${STAGING_DIR_NATIVE}${includedir_native}"
 STAGING_ETCDIR_NATIVE = "${STAGING_DIR_NATIVE}${sysconfdir_native}"
diff --git a/meta/recipes-graphics/xorg-font/font-util_1.2.0.bb b/meta/recipes-graphics/xorg-font/font-util_1.2.0.bb
index a04bd6d..8834708 100644
--- a/meta/recipes-graphics/xorg-font/font-util_1.2.0.bb
+++ b/meta/recipes-graphics/xorg-font/font-util_1.2.0.bb
@@ -8,8 +8,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=c0067273d90f6336008cb2504e14bd32 \
                     file://bdftruncate.c;endline=26;md5=4f82ffc101a1b165eae9c6998abff937 \
                     file://map-ISO8859-1;beginline=9;endline=23;md5=1cecb984063248f29ffe5c46f5c04f34"
 
-PACKAGE_ARCH = "${BASE_PACKAGE_ARCH}"
-
 DEPENDS = "encodings util-macros"
 DEPENDS_virtclass-native = "util-macros-native"
 RDEPENDS_${PN} = "mkfontdir mkfontscale encodings"





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

* [PATCH 6/3] Move architecture specific TARGET_OS mangling into tune files
  2011-07-22 14:49 [PATCH 0/3] First round of tune config file updates Richard Purdie
                   ` (4 preceding siblings ...)
  2011-07-22 18:00 ` [PATCH 4/3] bitbake.conf/classes: Variable cleanup Richard Purdie
@ 2011-07-22 18:01 ` Richard Purdie
  2011-07-25 13:42   ` Richard Purdie
  5 siblings, 1 reply; 21+ messages in thread
From: Richard Purdie @ 2011-07-22 18:01 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 61312bc..6e109ec 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -85,9 +85,11 @@ TUNE_ARCH ??= "INVALID"
 TUNE_CCARGS ??= ""
 TUNE_FEATURES ??= "${TUNE_FEATURES_tune-${DEFAULTTUNE}}"
 PACKAGE_EXTRA_ARCHS_tune-${DEFAULTTUNE} ??= "${TARGET_ARCH}"
+LIBCEXTENSION ??= ""
+ABIEXTENSION ??= ""
 
 TARGET_ARCH = "${TUNE_ARCH}"
-TARGET_OS = "INVALID"
+TARGET_OS = "linux${LIBCEXTENSION}${ABIEXTENSION}"
 TARGET_VENDOR = "-oe"
 TARGET_SYS = "${TARGET_ARCH}${TARGET_VENDOR}${@['-' + bb.data.getVar('TARGET_OS', d, 1), ''][bb.data.getVar('TARGET_OS', d, 1) == ('' or 'custom')]}"
 TARGET_PREFIX = "${TARGET_SYS}-"
diff --git a/meta/conf/distro/include/tclibc-eglibc.inc b/meta/conf/distro/include/tclibc-eglibc.inc
index 9fab4dc..8ef3ceb 100644
--- a/meta/conf/distro/include/tclibc-eglibc.inc
+++ b/meta/conf/distro/include/tclibc-eglibc.inc
@@ -2,10 +2,7 @@
 # eglibc specific configuration
 #
 
-TARGET_OS = "linux"
-TARGET_OS_arm = "linux-gnueabi"
-TARGET_OS_armeb = "linux-gnueabi"
-TARGET_OS_powerpc = "linux${@['','-gnuspe'][bb.data.getVar('TARGET_FPU',d,1) in ['ppc-efd', 'ppc-efs']]}"
+LIBCEXTENSION = "${@['', '-gnu'][(d.getVar('ABIEXTENSION', True) or '') != '']}"
 
 # Add glibc overrides to the overrides for eglibc.
 OVERRIDES .= ":libc-glibc"
diff --git a/meta/conf/distro/include/tclibc-glibc.inc b/meta/conf/distro/include/tclibc-glibc.inc
index 0370dfa..823195c 100644
--- a/meta/conf/distro/include/tclibc-glibc.inc
+++ b/meta/conf/distro/include/tclibc-glibc.inc
@@ -2,10 +2,7 @@
 # glibc specific configuration
 #
 
-TARGET_OS = "linux"
-TARGET_OS_arm = "linux-gnueabi"
-TARGET_OS_armeb = "linux-gnueabi"
-TARGET_OS_powerpc = "linux${@['','-gnuspe'][bb.data.getVar('TARGET_FPU',d,1) in ['ppc-efd', 'ppc-efs']]}"
+LIBCEXTENSION = "${@['', '-gnu'][(d.getVar('ABIEXTENSION', True) or '') != '']}"
 
 # Add glibc to the overrides.
 OVERRIDES =. "libc-glibc:"
diff --git a/meta/conf/distro/include/tclibc-uclibc.inc b/meta/conf/distro/include/tclibc-uclibc.inc
index 7c06654..e0f50a0 100644
--- a/meta/conf/distro/include/tclibc-uclibc.inc
+++ b/meta/conf/distro/include/tclibc-uclibc.inc
@@ -2,10 +2,7 @@
 # uclibc specific configuration
 #
 
-TARGET_OS = "linux-uclibc"
-TARGET_OS_arm = "linux-uclibceabi"
-TARGET_OS_armeb = "linux-uclibceabi"
-TARGET_OS_powerpc = "linux-uclibc${@['','spe'][bb.data.getVar('TARGET_FPU',d,1) in ['ppc-efd', 'ppc-efs']]}"
+LIBCEXTENSION = "-uclibc"
 
 # Add uclibc overrides to the overrides.
 OVERRIDES =. "libc-uclibc:"
diff --git a/meta/conf/machine/include/arm/arch-arm.inc b/meta/conf/machine/include/arm/arch-arm.inc
index e773d14..c517df6 100644
--- a/meta/conf/machine/include/arm/arch-arm.inc
+++ b/meta/conf/machine/include/arm/arch-arm.inc
@@ -1 +1,3 @@
 TUNE_ARCH = "arm"
+
+ABIEXTENSION = "eabi"
diff --git a/meta/conf/machine/include/powerpc/arch-powerpc.inc b/meta/conf/machine/include/powerpc/arch-powerpc.inc
index 5ab81d4..17ace32 100644
--- a/meta/conf/machine/include/powerpc/arch-powerpc.inc
+++ b/meta/conf/machine/include/powerpc/arch-powerpc.inc
@@ -1 +1,3 @@
 TUNE_ARCH = "powerpc"
+
+ABIEXTENSION = "${@['','spe'][bb.data.getVar('TARGET_FPU',d,1) in ['ppc-efd', 'ppc-efs']]}"





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

* Re: [PATCH 5/3] conf/machine/include: Start to fill out architecture specific tune include files and tune features
  2011-07-22 18:00 ` [PATCH 5/3] conf/machine/include: Start to fill out architecture specific tune include files and tune features Richard Purdie
@ 2011-07-22 18:14   ` Tom Rini
  2011-07-25 18:55     ` Mark Hatle
  0 siblings, 1 reply; 21+ messages in thread
From: Tom Rini @ 2011-07-22 18:14 UTC (permalink / raw)
  To: openembedded-core

On 07/22/2011 11:00 AM, Richard Purdie wrote:
> These changes revolve around the idea of tune features. These are represented by
> 'flag' strings that are included in the TUNE_FEATURES variable.
> 
> Any string included in TUNE_FEATURES should also add a TUNEVALID[<name>] entry so
> we can know which flags are available in TUNE_FEATURES and have documentation about
> what the flags do. We will add sanity code to error if flags are listed in
> TUNE_FEATURES but are not documented in TUNEVALID.
> 
> A given tune configuration will want to define one or more predetermined sets of
> _FEATURE flag lists. These are defined in the form TUNE_FEATURES_tune-<name>.
> For defined tune configuation, <name> should be added to the AVAILTUNE list so that
> we can determine what tune configurations are available. Flags cannot be used in this
> case as with TUNEVALID since its useful to be able to build up tune lists from other
> TUNE_FEATURES_tune-yyy options.
> 
> A given tune configuration may also define PACKAGE_EXTRA_ARCHS_tune-<name> and
> BASE_LIB_tune-<name> to control the multilib location. All options can be overridden
> by the distro or local user configuration.
> 
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

As a specific nit, we can't use x86_64 in OVERRIDES (using the normal
mechanism need base_contains(...).  Can we switch to calling it amd64
ala Debian/Ubuntu?  Aside from that, as I told Mark the other day, this
looks good to me.

-- 
Tom Rini
Mentor Graphics Corporation



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

* Re: [PATCH 6/3] Move architecture specific TARGET_OS mangling into tune files
  2011-07-22 18:01 ` [PATCH 6/3] Move architecture specific TARGET_OS mangling into tune files Richard Purdie
@ 2011-07-25 13:42   ` Richard Purdie
  2011-07-25 16:23     ` Phil Blundell
  0 siblings, 1 reply; 21+ messages in thread
From: Richard Purdie @ 2011-07-25 13:42 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

To try and help preserve my sanity when pulling the various multilib
patches together, I've merged these six patches, along with a patch
incrementing bitbake's miniumum version requirement for the
bb.utils.contains usage.

Cheers,

Richard





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

* Re: [PATCH 6/3] Move architecture specific TARGET_OS mangling into tune files
  2011-07-25 13:42   ` Richard Purdie
@ 2011-07-25 16:23     ` Phil Blundell
  2011-07-27 16:37       ` Richard Purdie
  0 siblings, 1 reply; 21+ messages in thread
From: Phil Blundell @ 2011-07-25 16:23 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Mon, 2011-07-25 at 14:42 +0100, Richard Purdie wrote:
> To try and help preserve my sanity when pulling the various multilib
> patches together, I've merged these six patches, along with a patch
> incrementing bitbake's miniumum version requirement for the
> bb.utils.contains usage.

FWIW, the bitbake minimum version check (at least in its current form)
doesn't buy much in this sort of situation because you get a parse error
before the event handler in sanity.bbclass ever runs.  I think this
happened last time there was a bitbake-affecting change too although I
don't recall the details.

Perhaps adding something like:

__sane_bitbake := "${oe.check_bb_version_sanity}"

to the top of bitbake.conf would improve matters, I dunno.

p.





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

* Re: [PATCH 5/3] conf/machine/include: Start to fill out architecture specific tune include files and tune features
  2011-07-22 18:14   ` Tom Rini
@ 2011-07-25 18:55     ` Mark Hatle
  2011-07-25 19:34       ` Tom Rini
  0 siblings, 1 reply; 21+ messages in thread
From: Mark Hatle @ 2011-07-25 18:55 UTC (permalink / raw)
  To: openembedded-core

On 7/22/11 1:14 PM, Tom Rini wrote:
> On 07/22/2011 11:00 AM, Richard Purdie wrote:
>> These changes revolve around the idea of tune features. These are represented by
>> 'flag' strings that are included in the TUNE_FEATURES variable.
>>
>> Any string included in TUNE_FEATURES should also add a TUNEVALID[<name>] entry so
>> we can know which flags are available in TUNE_FEATURES and have documentation about
>> what the flags do. We will add sanity code to error if flags are listed in
>> TUNE_FEATURES but are not documented in TUNEVALID.
>>
>> A given tune configuration will want to define one or more predetermined sets of
>> _FEATURE flag lists. These are defined in the form TUNE_FEATURES_tune-<name>.
>> For defined tune configuation, <name> should be added to the AVAILTUNE list so that
>> we can determine what tune configurations are available. Flags cannot be used in this
>> case as with TUNEVALID since its useful to be able to build up tune lists from other
>> TUNE_FEATURES_tune-yyy options.
>>
>> A given tune configuration may also define PACKAGE_EXTRA_ARCHS_tune-<name> and
>> BASE_LIB_tune-<name> to control the multilib location. All options can be overridden
>> by the distro or local user configuration.
>>
>> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> 
> As a specific nit, we can't use x86_64 in OVERRIDES (using the normal
> mechanism need base_contains(...).  Can we switch to calling it amd64
> ala Debian/Ubuntu?  Aside from that, as I told Mark the other day, this
> looks good to me.
> 

I actually prefer "x86-64" I think that is a reasonable compromise between the
x86_64 naming and the need to not use "_".

--Mark



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

* Re: [PATCH 5/3] conf/machine/include: Start to fill out architecture specific tune include files and tune features
  2011-07-25 18:55     ` Mark Hatle
@ 2011-07-25 19:34       ` Tom Rini
  2011-07-25 19:39         ` Mark Hatle
  2011-07-25 20:39         ` Phil Blundell
  0 siblings, 2 replies; 21+ messages in thread
From: Tom Rini @ 2011-07-25 19:34 UTC (permalink / raw)
  To: openembedded-core

On 07/25/2011 11:55 AM, Mark Hatle wrote:
> On 7/22/11 1:14 PM, Tom Rini wrote:
>> On 07/22/2011 11:00 AM, Richard Purdie wrote:
>>> These changes revolve around the idea of tune features. These are represented by
>>> 'flag' strings that are included in the TUNE_FEATURES variable.
>>>
>>> Any string included in TUNE_FEATURES should also add a TUNEVALID[<name>] entry so
>>> we can know which flags are available in TUNE_FEATURES and have documentation about
>>> what the flags do. We will add sanity code to error if flags are listed in
>>> TUNE_FEATURES but are not documented in TUNEVALID.
>>>
>>> A given tune configuration will want to define one or more predetermined sets of
>>> _FEATURE flag lists. These are defined in the form TUNE_FEATURES_tune-<name>.
>>> For defined tune configuation, <name> should be added to the AVAILTUNE list so that
>>> we can determine what tune configurations are available. Flags cannot be used in this
>>> case as with TUNEVALID since its useful to be able to build up tune lists from other
>>> TUNE_FEATURES_tune-yyy options.
>>>
>>> A given tune configuration may also define PACKAGE_EXTRA_ARCHS_tune-<name> and
>>> BASE_LIB_tune-<name> to control the multilib location. All options can be overridden
>>> by the distro or local user configuration.
>>>
>>> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
>>
>> As a specific nit, we can't use x86_64 in OVERRIDES (using the normal
>> mechanism need base_contains(...).  Can we switch to calling it amd64
>> ala Debian/Ubuntu?  Aside from that, as I told Mark the other day, this
>> looks good to me.
>>
> 
> I actually prefer "x86-64" I think that is a reasonable compromise between the
> x86_64 naming and the need to not use "_".

That causes other problems, no?  Top of my head would be that deb/ipk
doesn't allow a dash in that field.  Could be mistaken tho...

-- 
Tom Rini
Mentor Graphics Corporation



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

* Re: [PATCH 5/3] conf/machine/include: Start to fill out architecture specific tune include files and tune features
  2011-07-25 19:34       ` Tom Rini
@ 2011-07-25 19:39         ` Mark Hatle
  2011-07-25 20:39         ` Phil Blundell
  1 sibling, 0 replies; 21+ messages in thread
From: Mark Hatle @ 2011-07-25 19:39 UTC (permalink / raw)
  To: openembedded-core

On 7/25/11 2:34 PM, Tom Rini wrote:
> On 07/25/2011 11:55 AM, Mark Hatle wrote:
>> On 7/22/11 1:14 PM, Tom Rini wrote:
>>> On 07/22/2011 11:00 AM, Richard Purdie wrote:
>>>> These changes revolve around the idea of tune features. These are represented by
>>>> 'flag' strings that are included in the TUNE_FEATURES variable.
>>>>
>>>> Any string included in TUNE_FEATURES should also add a TUNEVALID[<name>] entry so
>>>> we can know which flags are available in TUNE_FEATURES and have documentation about
>>>> what the flags do. We will add sanity code to error if flags are listed in
>>>> TUNE_FEATURES but are not documented in TUNEVALID.
>>>>
>>>> A given tune configuration will want to define one or more predetermined sets of
>>>> _FEATURE flag lists. These are defined in the form TUNE_FEATURES_tune-<name>.
>>>> For defined tune configuation, <name> should be added to the AVAILTUNE list so that
>>>> we can determine what tune configurations are available. Flags cannot be used in this
>>>> case as with TUNEVALID since its useful to be able to build up tune lists from other
>>>> TUNE_FEATURES_tune-yyy options.
>>>>
>>>> A given tune configuration may also define PACKAGE_EXTRA_ARCHS_tune-<name> and
>>>> BASE_LIB_tune-<name> to control the multilib location. All options can be overridden
>>>> by the distro or local user configuration.
>>>>
>>>> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
>>>
>>> As a specific nit, we can't use x86_64 in OVERRIDES (using the normal
>>> mechanism need base_contains(...).  Can we switch to calling it amd64
>>> ala Debian/Ubuntu?  Aside from that, as I told Mark the other day, this
>>> looks good to me.
>>>
>>
>> I actually prefer "x86-64" I think that is a reasonable compromise between the
>> x86_64 naming and the need to not use "_".
> 
> That causes other problems, no?  Top of my head would be that deb/ipk
> doesn't allow a dash in that field.  Could be mistaken tho...
> 

I expect the packaging system to have to have change the fields to suite their
specific needs.  I know I have search/replace items similar to that in RPM
because there are constructs that RPM doesn't support that deb and ipk do.

--Mark



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

* Re: [PATCH 5/3] conf/machine/include: Start to fill out architecture specific tune include files and tune features
  2011-07-25 19:34       ` Tom Rini
  2011-07-25 19:39         ` Mark Hatle
@ 2011-07-25 20:39         ` Phil Blundell
  2011-07-25 20:43           ` Tom Rini
  1 sibling, 1 reply; 21+ messages in thread
From: Phil Blundell @ 2011-07-25 20:39 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Mon, 2011-07-25 at 12:34 -0700, Tom Rini wrote:
> On 07/25/2011 11:55 AM, Mark Hatle wrote:
> > I actually prefer "x86-64" I think that is a reasonable compromise between the
> > x86_64 naming and the need to not use "_".
> 
> That causes other problems, no?  Top of my head would be that deb/ipk
> doesn't allow a dash in that field.  Could be mistaken tho...

The package management backend could always rewrite it to something else
(under control of the DISTRO if need be, so AMD and Intel folks can each
call it their own thing if they want to).

Personally though, I would be tempted just to call it "x64", which is
then nicely symmetric with x32 and doesn't seem likely to collide with
anything else.

p.





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

* Re: [PATCH 5/3] conf/machine/include: Start to fill out architecture specific tune include files and tune features
  2011-07-25 20:39         ` Phil Blundell
@ 2011-07-25 20:43           ` Tom Rini
  0 siblings, 0 replies; 21+ messages in thread
From: Tom Rini @ 2011-07-25 20:43 UTC (permalink / raw)
  To: openembedded-core

On 07/25/2011 01:39 PM, Phil Blundell wrote:
> On Mon, 2011-07-25 at 12:34 -0700, Tom Rini wrote:
>> On 07/25/2011 11:55 AM, Mark Hatle wrote:
>>> I actually prefer "x86-64" I think that is a reasonable compromise between the
>>> x86_64 naming and the need to not use "_".
>>
>> That causes other problems, no?  Top of my head would be that deb/ipk
>> doesn't allow a dash in that field.  Could be mistaken tho...
> 
> The package management backend could always rewrite it to something else
> (under control of the DISTRO if need be, so AMD and Intel folks can each
> call it their own thing if they want to).
> 
> Personally though, I would be tempted just to call it "x64", which is
> then nicely symmetric with x32 and doesn't seem likely to collide with
> anything else.

Yeah, but x32 means something else (not i586, etc) :)  My main
suggestion is to follow existing conventions, so amd64 since we can't
match x86_64 like the RPM world.  FWIW, x64 appears to be the MS ABI for
this case, so.. not a bad idea?

-- 
Tom Rini
Mentor Graphics Corporation



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

* Re: [PATCH 6/3] Move architecture specific TARGET_OS mangling into tune files
  2011-07-25 16:23     ` Phil Blundell
@ 2011-07-27 16:37       ` Richard Purdie
  0 siblings, 0 replies; 21+ messages in thread
From: Richard Purdie @ 2011-07-27 16:37 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Mon, 2011-07-25 at 17:23 +0100, Phil Blundell wrote:
> On Mon, 2011-07-25 at 14:42 +0100, Richard Purdie wrote:
> > To try and help preserve my sanity when pulling the various multilib
> > patches together, I've merged these six patches, along with a patch
> > incrementing bitbake's miniumum version requirement for the
> > bb.utils.contains usage.
> 
> FWIW, the bitbake minimum version check (at least in its current form)
> doesn't buy much in this sort of situation because you get a parse error
> before the event handler in sanity.bbclass ever runs.  I think this
> happened last time there was a bitbake-affecting change too although I
> don't recall the details.
> 
> Perhaps adding something like:
> 
> __sane_bitbake := "${oe.check_bb_version_sanity}"
> 
> to the top of bitbake.conf would improve matters, I dunno.

Ouch, yes, we probably should do something like this.

Cheers,

Richard




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

end of thread, other threads:[~2011-07-27 16:42 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-22 14:49 [PATCH 0/3] First round of tune config file updates Richard Purdie
2011-07-22 14:49 ` [PATCH 1/3] bitbake.conf/cross.bbclass: Add ability to dynamically change library location Richard Purdie
2011-07-22 14:49 ` [PATCH 2/3] conf/machine/tune: Overhaul tune include file variables Richard Purdie
2011-07-22 15:03   ` Kumar Gala
2011-07-22 15:13     ` Richard Purdie
2011-07-22 14:49 ` [PATCH 3/3] conf/machine/include: Set TUNE_CCARGS instead of TARGET_CC_ARCH Richard Purdie
2011-07-22 14:54   ` Koen Kooi
2011-07-22 15:11     ` Richard Purdie
2011-07-22 15:15       ` Koen Kooi
2011-07-22 18:00 ` [PATCH 5/3] conf/machine/include: Start to fill out architecture specific tune include files and tune features Richard Purdie
2011-07-22 18:14   ` Tom Rini
2011-07-25 18:55     ` Mark Hatle
2011-07-25 19:34       ` Tom Rini
2011-07-25 19:39         ` Mark Hatle
2011-07-25 20:39         ` Phil Blundell
2011-07-25 20:43           ` Tom Rini
2011-07-22 18:00 ` [PATCH 4/3] bitbake.conf/classes: Variable cleanup Richard Purdie
2011-07-22 18:01 ` [PATCH 6/3] Move architecture specific TARGET_OS mangling into tune files Richard Purdie
2011-07-25 13:42   ` Richard Purdie
2011-07-25 16:23     ` Phil Blundell
2011-07-27 16:37       ` Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox