Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH RFC] Add multilib values to displayed build configuration
@ 2013-06-06 15:25 Mark Hatle
  2013-06-06 15:25 ` [PATCH RFC] base.bbclass: Add buildcfg multilib values Mark Hatle
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Hatle @ 2013-06-06 15:25 UTC (permalink / raw)
  To: openembedded-core

While attempting to help some users diagnose problems with multilib 
configurations, I was tired of asking for copies of local.conf files and
dumps of the bitbake -e so I could understand how they had their multilib
environment setup.  This is an attempt to add additional diagnostics to
the build configuration placed at the top of the logs.

I'm sending this as an RFC because it was a first quick and dirty attempt
at changing things.  There may be a better way to do this.

Mark Hatle (1):
  base.bbclass: Add buildcfg multilib values

 meta/classes/base.bbclass | 16 +++++++++++++++-
 meta/conf/bitbake.conf    |  2 +-
 2 files changed, 16 insertions(+), 2 deletions(-)

-- 
1.8.3.rc1.25.g423ecb0



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

* [PATCH RFC] base.bbclass: Add buildcfg multilib values
  2013-06-06 15:25 [PATCH RFC] Add multilib values to displayed build configuration Mark Hatle
@ 2013-06-06 15:25 ` Mark Hatle
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Hatle @ 2013-06-06 15:25 UTC (permalink / raw)
  To: openembedded-core

When displaying the buildcfg for the end user, add in processing
of the multilib variants.  Only the items that are not the same as
the DEFAULTTUNE are displayed.

I.e.:
Build Configuration:
BB_VERSION        = "1.19.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "CentOS-6.4"
DISTRO_VERSION    = "oe-core.0"
MACHINE           = "qemux86-64"
DEFAULTTUNE       = "x86-64"
TARGET_SYS        = "x86_64-oe-linux"
TUNE_FEATURES     = "m64"
TARGET_FPU        = ""
lib32:  DEFAULTTUNE       = "x86"
lib32:  TARGET_SYS        = "i586-oe-linux"
lib32:  TUNE_FEATURES     = "m32"
meta              = "master:1975f3d7bbeb184489a5d0a2e0de231f317d3e1b"

The order of the displayed elements was changed slightly to group the
host information together, as well as group the target information
together.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
 meta/classes/base.bbclass | 16 +++++++++++++++-
 meta/conf/bitbake.conf    |  2 +-
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index b1642a2..67261f2 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -277,7 +277,7 @@ def get_layers_branch_rev(d):
     return layers_branch_rev
 
 
-BUILDCFG_FUNCS ??= "buildcfg_vars get_layers_branch_rev buildcfg_neededvars"
+BUILDCFG_FUNCS ??= "buildcfg_vars buildcfg_multilibs get_layers_branch_rev buildcfg_neededvars"
 BUILDCFG_FUNCS[type] = "list"
 
 def buildcfg_vars(d):
@@ -287,6 +287,20 @@ def buildcfg_vars(d):
         if value is not None:
             yield '%-17s = "%s"' % (var, value)
 
+def buildcfg_multilibs(d):
+    variants = d.getVar("MULTILIB_VARIANTS", True) or ""
+    for variant in variants.split():
+        localdata = bb.data.createCopy(d)
+        overrides = localdata.getVar("OVERRIDES", False) + ":virtclass-multilib-" + variant
+        localdata.setVar("OVERRIDES", overrides)
+        bb.data.update_data(localdata)
+        statusvars = oe.data.typed_value('BUILDCFG_VARS', d)
+        for var in statusvars:
+            origvalue = d.getVar(var, True)
+            variantvalue = localdata.getVar(var, True)
+            if origvalue is not None and variantvalue is not None and origvalue != variantvalue:
+                yield '%-7s %-17s = "%s"' % (variant + ":", var, variantvalue)
+
 def buildcfg_neededvars(d):
     needed_vars = oe.data.typed_value("BUILDCFG_NEEDEDVARS", d)
     pesteruser = []
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 174236d..27a56c0 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -632,7 +632,7 @@ export PATCH_GET="0"
 
 # Pre-build configuration output
 BUILDCFG_HEADER = "Build Configuration:"
-BUILDCFG_VARS = "BB_VERSION BUILD_SYS NATIVELSBSTRING TARGET_SYS MACHINE DISTRO DISTRO_VERSION TUNE_FEATURES TARGET_FPU"
+BUILDCFG_VARS = "BB_VERSION BUILD_SYS NATIVELSBSTRING DISTRO DISTRO_VERSION MACHINE DEFAULTTUNE TARGET_SYS TUNE_FEATURES TARGET_FPU"
 BUILDCFG_VARS[type] = "list"
 BUILDCFG_NEEDEDVARS = "TARGET_ARCH TARGET_OS"
 BUILDCFG_NEEDEDVARS[type] = "list"
-- 
1.8.3.rc1.25.g423ecb0



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

end of thread, other threads:[~2013-06-06 15:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-06 15:25 [PATCH RFC] Add multilib values to displayed build configuration Mark Hatle
2013-06-06 15:25 ` [PATCH RFC] base.bbclass: Add buildcfg multilib values Mark Hatle

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