Patchwork powerpc: fix overly aggressive TUNE_PKGARCH set

login
register
mail settings
Submitter Christopher Larson
Date March 22, 2012, 3 p.m.
Message ID <1332428403-25048-1-git-send-email-kergoth@gmail.com>
Download mbox | patch
Permalink /patch/24137/
State New
Headers show

Comments

Christopher Larson - March 22, 2012, 3 p.m.
From: Christopher Larson <chris_larson@mentor.com>

There's a problem in arch-powerpc.inc today, wherein it directly sets
TUNE_PKGARCH, rather than setting TUNE_PKGARCH_tune-<tuning>. As a result,
more specific tuning files (e.g. ppce500mc) then see their
TUNE_PKGARCH_tune-<tuning> variable definitions no longer obeyed. As
a consequence, the TUNE_PKGARCH ends up as 'powerpc' or 'powerpc-nf' rather
than 'ppce500mc', which in turn causes a 'TUNE_PKGARCH not in PACKAGE_ARCHS'
failure in the build.

To fix, the .inc now sets TUNE_PKGARCH_tune-powerpc and
TUNE_PKGARCH_tune-powerpc-nf rather than TUNE_PKGARCH.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---
 meta/conf/machine/include/powerpc/arch-powerpc.inc |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
Christopher Larson - March 22, 2012, 3:08 p.m.
On Thu, Mar 22, 2012 at 8:00 AM, Christopher Larson <kergoth@gmail.com> wrote:
> From: Christopher Larson <chris_larson@mentor.com>
>
> There's a problem in arch-powerpc.inc today, wherein it directly sets
> TUNE_PKGARCH, rather than setting TUNE_PKGARCH_tune-<tuning>. As a result,
> more specific tuning files (e.g. ppce500mc) then see their
> TUNE_PKGARCH_tune-<tuning> variable definitions no longer obeyed. As
> a consequence, the TUNE_PKGARCH ends up as 'powerpc' or 'powerpc-nf' rather
> than 'ppce500mc', which in turn causes a 'TUNE_PKGARCH not in PACKAGE_ARCHS'
> failure in the build.
>
> To fix, the .inc now sets TUNE_PKGARCH_tune-powerpc and
> TUNE_PKGARCH_tune-powerpc-nf rather than TUNE_PKGARCH.
>
> Signed-off-by: Christopher Larson <chris_larson@mentor.com>
> ---
>  meta/conf/machine/include/powerpc/arch-powerpc.inc |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/meta/conf/machine/include/powerpc/arch-powerpc.inc b/meta/conf/machine/include/powerpc/arch-powerpc.inc
> index c9b2829..f811a3e 100644
> --- a/meta/conf/machine/include/powerpc/arch-powerpc.inc
> +++ b/meta/conf/machine/include/powerpc/arch-powerpc.inc
> @@ -21,13 +21,14 @@ ABIEXTENSION = "${@['','spe'][d.getVar('TARGET_FPU', True) in ['ppc-efd', 'ppc-e
>  PPCPKGSFX_FPU = "${@bb.utils.contains("TUNE_FEATURES", "fpu-hard" , "", "-nf", d)}"
>
>  PPCPKGARCH = "${TUNE_ARCH}${PPCPKGSFX_FPU}"
> -TUNE_PKGARCH ?= "${PPCPKGARCH}"
>
>  # Basic tune definitions
> -AVAILTUNES += "powerpc powerpc-nf"
> +AVAILTUNES += "powerpc powerpc-nf"
>  TUNE_FEATURES_tune-powerpc-nf ?= "m32 fpu-soft"
> +TUNE_PKGARCH_tune-powerpc-nf = "${PPCPKGARCH}"
>  BASE_LIB_tune-powerpc-nf = "lib"
>  PACKAGE_EXTRA_ARCHS_tune-powerpc-nf = "powerpc-nf"
>  TUNE_FEATURES_tune-powerpc ?= "m32 fpu-hard"
> +TUNE_PKGARCH_tune-powerpc = "${PPCPKGARCH}"
>  BASE_LIB_tune-powerpc = "lib"
>  PACKAGE_EXTRA_ARCHS_tune-powerpc = "powerpc

Hmm, actually, there's no reason these can't just set
TUNE_PKGARCH_tune-powerpc = "powerpc", etc rather than using the
PPCPKGARCH indirection. Anyone more familiar with the tuning code have
an opinion here?

Patch

diff --git a/meta/conf/machine/include/powerpc/arch-powerpc.inc b/meta/conf/machine/include/powerpc/arch-powerpc.inc
index c9b2829..f811a3e 100644
--- a/meta/conf/machine/include/powerpc/arch-powerpc.inc
+++ b/meta/conf/machine/include/powerpc/arch-powerpc.inc
@@ -21,13 +21,14 @@  ABIEXTENSION = "${@['','spe'][d.getVar('TARGET_FPU', True) in ['ppc-efd', 'ppc-e
 PPCPKGSFX_FPU = "${@bb.utils.contains("TUNE_FEATURES", "fpu-hard" , "", "-nf", d)}"
 
 PPCPKGARCH = "${TUNE_ARCH}${PPCPKGSFX_FPU}"
-TUNE_PKGARCH ?= "${PPCPKGARCH}"
 
 # Basic tune definitions
-AVAILTUNES += "powerpc powerpc-nf" 
+AVAILTUNES += "powerpc powerpc-nf"
 TUNE_FEATURES_tune-powerpc-nf ?= "m32 fpu-soft"
+TUNE_PKGARCH_tune-powerpc-nf = "${PPCPKGARCH}"
 BASE_LIB_tune-powerpc-nf = "lib"
 PACKAGE_EXTRA_ARCHS_tune-powerpc-nf = "powerpc-nf"
 TUNE_FEATURES_tune-powerpc ?= "m32 fpu-hard"
+TUNE_PKGARCH_tune-powerpc = "${PPCPKGARCH}"
 BASE_LIB_tune-powerpc = "lib"
 PACKAGE_EXTRA_ARCHS_tune-powerpc = "powerpc"