Patchwork [3/3] powerpc: define TUNE_PKGARCH for powerpc/powerpc-nf

login
register
mail settings
Submitter Christopher Larson
Date March 27, 2012, 7:51 p.m.
Message ID <1332877869-12195-3-git-send-email-kergoth@gmail.com>
Download mbox | patch
Permalink /patch/24677/
State New
Headers show

Comments

Christopher Larson - March 27, 2012, 7:51 p.m.
From: Christopher Larson <chris_larson@mentor.com>

This allows setting DEFAULTTUNE to powerpc or powerpc-nf rather than just the
more specific cpu/machine tuning.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---
 meta/conf/machine/include/powerpc/arch-powerpc.inc |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
Mark Hatle - March 27, 2012, 8:22 p.m.
Patch 1 and 2 look fine, but I have questions on this one....

On 3/27/12 2:51 PM, Christopher Larson wrote:
> From: Christopher Larson<chris_larson@mentor.com>
>
> This allows setting DEFAULTTUNE to powerpc or powerpc-nf rather than just the
> more specific cpu/machine tuning.
>
> Signed-off-by: Christopher Larson<chris_larson@mentor.com>
> ---
>   meta/conf/machine/include/powerpc/arch-powerpc.inc |    2 ++
>   1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/meta/conf/machine/include/powerpc/arch-powerpc.inc b/meta/conf/machine/include/powerpc/arch-powerpc.inc
> index c5fd6b7..3438b46 100644
> --- a/meta/conf/machine/include/powerpc/arch-powerpc.inc
> +++ b/meta/conf/machine/include/powerpc/arch-powerpc.inc
> @@ -26,6 +26,8 @@ AVAILTUNES += "powerpc powerpc-nf"
>   TUNE_FEATURES_tune-powerpc-nf ?= "m32 fpu-soft"
>   BASE_LIB_tune-powerpc-nf = "lib"
>   PACKAGE_EXTRA_ARCHS_tune-powerpc-nf = "powerpc-nf"
> +TUNE_PKGARCH_tune-powerpc-nf = "powerpc-nf"
>   TUNE_FEATURES_tune-powerpc ?= "m32 fpu-hard"
>   BASE_LIB_tune-powerpc = "lib"
>   PACKAGE_EXTRA_ARCHS_tune-powerpc = "powerpc"
> +TUNE_PKGARCH_tune-powerpc = "powerpc"

Why is the above necessary?

TUNE_PKGARCH_append is set to "${PPCPKGSFX_FPU}"

PPCPKGSFX_FP is set to either '' or '-nf' based on the existance of fpu-soft.

TUNE_PKGARCH is set by a number of the PowerPC tuning files...  If you are 
looking for generic PowerPC there should be something setting TUNE_PKGARCH to 
"powerpc" (or "powerpc64" in the default cases...)

--Mark
Chris Larson - March 27, 2012, 9:05 p.m.
On Tue, Mar 27, 2012 at 1:22 PM, Mark Hatle <mark.hatle@windriver.com> wrote:
> Patch 1 and 2 look fine, but I have questions on this one....
>
>
> On 3/27/12 2:51 PM, Christopher Larson wrote:
>>
>> From: Christopher Larson<chris_larson@mentor.com>
>>
>> This allows setting DEFAULTTUNE to powerpc or powerpc-nf rather than just
>> the
>> more specific cpu/machine tuning.
>>
>> Signed-off-by: Christopher Larson<chris_larson@mentor.com>
>> ---
>>  meta/conf/machine/include/powerpc/arch-powerpc.inc |    2 ++
>>  1 files changed, 2 insertions(+), 0 deletions(-)
>>
>> diff --git a/meta/conf/machine/include/powerpc/arch-powerpc.inc
>> b/meta/conf/machine/include/powerpc/arch-powerpc.inc
>> index c5fd6b7..3438b46 100644
>> --- a/meta/conf/machine/include/powerpc/arch-powerpc.inc
>> +++ b/meta/conf/machine/include/powerpc/arch-powerpc.inc
>> @@ -26,6 +26,8 @@ AVAILTUNES += "powerpc powerpc-nf"
>>  TUNE_FEATURES_tune-powerpc-nf ?= "m32 fpu-soft"
>>  BASE_LIB_tune-powerpc-nf = "lib"
>>  PACKAGE_EXTRA_ARCHS_tune-powerpc-nf = "powerpc-nf"
>> +TUNE_PKGARCH_tune-powerpc-nf = "powerpc-nf"
>>  TUNE_FEATURES_tune-powerpc ?= "m32 fpu-hard"
>>  BASE_LIB_tune-powerpc = "lib"
>>  PACKAGE_EXTRA_ARCHS_tune-powerpc = "powerpc"
>> +TUNE_PKGARCH_tune-powerpc = "powerpc"
>
>
> Why is the above necessary?
>
> TUNE_PKGARCH_append is set to "${PPCPKGSFX_FPU}"
>
> PPCPKGSFX_FP is set to either '' or '-nf' based on the existance of
> fpu-soft.
>
> TUNE_PKGARCH is set by a number of the PowerPC tuning files...  If you are
> looking for generic PowerPC there should be something setting TUNE_PKGARCH
> to "powerpc" (or "powerpc64" in the default cases...)

This is what I'm saying. If you want to target generic powerpc, you
have to force TUNE_PKGARCH, as the generic don't have
TUNE_PKGARCH_tune- definitions. It seems to me in most cases you can
set DEFAULTTUNE and include an appropriate tune file and not need to
set TUNE_PKGARCH directly, which is not the case for the generic ones.
Was it not the intent that this was the case? Should every MACHINE
have to override TUNE_PKGARCH?
Mark Hatle - March 27, 2012, 9:50 p.m.
On 3/27/12 4:05 PM, Chris Larson wrote:
> On Tue, Mar 27, 2012 at 1:22 PM, Mark Hatle<mark.hatle@windriver.com>  wrote:
>> Patch 1 and 2 look fine, but I have questions on this one....
>>
>>
>> On 3/27/12 2:51 PM, Christopher Larson wrote:
>>>
>>> From: Christopher Larson<chris_larson@mentor.com>
>>>
>>> This allows setting DEFAULTTUNE to powerpc or powerpc-nf rather than just
>>> the
>>> more specific cpu/machine tuning.
>>>
>>> Signed-off-by: Christopher Larson<chris_larson@mentor.com>
>>> ---
>>>   meta/conf/machine/include/powerpc/arch-powerpc.inc |    2 ++
>>>   1 files changed, 2 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/meta/conf/machine/include/powerpc/arch-powerpc.inc
>>> b/meta/conf/machine/include/powerpc/arch-powerpc.inc
>>> index c5fd6b7..3438b46 100644
>>> --- a/meta/conf/machine/include/powerpc/arch-powerpc.inc
>>> +++ b/meta/conf/machine/include/powerpc/arch-powerpc.inc
>>> @@ -26,6 +26,8 @@ AVAILTUNES += "powerpc powerpc-nf"
>>>   TUNE_FEATURES_tune-powerpc-nf ?= "m32 fpu-soft"
>>>   BASE_LIB_tune-powerpc-nf = "lib"
>>>   PACKAGE_EXTRA_ARCHS_tune-powerpc-nf = "powerpc-nf"
>>> +TUNE_PKGARCH_tune-powerpc-nf = "powerpc-nf"
>>>   TUNE_FEATURES_tune-powerpc ?= "m32 fpu-hard"
>>>   BASE_LIB_tune-powerpc = "lib"
>>>   PACKAGE_EXTRA_ARCHS_tune-powerpc = "powerpc"
>>> +TUNE_PKGARCH_tune-powerpc = "powerpc"
>>
>>
>> Why is the above necessary?
>>
>> TUNE_PKGARCH_append is set to "${PPCPKGSFX_FPU}"
>>
>> PPCPKGSFX_FP is set to either '' or '-nf' based on the existance of
>> fpu-soft.
>>
>> TUNE_PKGARCH is set by a number of the PowerPC tuning files...  If you are
>> looking for generic PowerPC there should be something setting TUNE_PKGARCH
>> to "powerpc" (or "powerpc64" in the default cases...)
>
> This is what I'm saying. If you want to target generic powerpc, you
> have to force TUNE_PKGARCH, as the generic don't have
> TUNE_PKGARCH_tune- definitions. It seems to me in most cases you can
> set DEFAULTTUNE and include an appropriate tune file and not need to
> set TUNE_PKGARCH directly, which is not the case for the generic ones.
> Was it not the intent that this was the case? Should every MACHINE
> have to override TUNE_PKGARCH?

On PowerPC TUNE_PKGARCH should be set to powerpc (or overriden by the machines). 
  On PowerPC64, it should be set to powerpc64.  If this is not happening that is 
the bug, lack of the default TUNE_PKGARCH.  (based on the original implementation.)

It was intended that having to have multiple TUNE_PKGARCH one for powerpc and 
one for powerpc-nf was not the intention.

I'm open to changing it, but I took a lot of "feedback" over the initial 
implementation and that is what ended up in it.

--Mark
Christopher Larson - March 27, 2012, 9:57 p.m.
On Tuesday, March 27, 2012 at 2:50 PM, Mark Hatle wrote:
> On 3/27/12 4:05 PM, Chris Larson wrote:
> 
> 
> 
> 
> On PowerPC TUNE_PKGARCH should be set to powerpc (or overriden by the machines).
> On PowerPC64, it should be set to powerpc64. If this is not happening that is
> the bug, lack of the default TUNE_PKGARCH. (based on the original implementation.)


I don't think your point of view is covering all the issues. 

The default TUNE_PKGARCH is TUNE_PKGARCH_${TUNE_PKGARCH_tune-${DEFAULTTUNE}. If arch-powerpc.inc sets TUNE_PKGARCH directly, as it used to, then all the more specific tunings won't have their TUNE_PKGARCH_tune-<tune> obeyed, which was the behavior prior to my submitting a patch which removed the explicit TUNE_PKGARCH override in arch-powerpc.inc.

So we have two options. Either we override TUNE_PKGARCH directly in arch-powerpc.inc again, thereby making powerpc tune- files like tune-ppce500v2 not have their TUNE_PKGARCH_tune-<tune> obeyed (or those tune- files have to override TUNE_PKGARCH as well, which seems counter to the whole design of the tuning implementation), or we add TUNE_PKGARCH_tune-<tune> definitions for the generic tunings also.

-Chris
Mark Hatle - March 27, 2012, 10:13 p.m.
On 3/27/12 4:57 PM, Christopher Larson wrote:
> On Tuesday, March 27, 2012 at 2:50 PM, Mark Hatle wrote:
>> On 3/27/12 4:05 PM, Chris Larson wrote:
>>
>> On PowerPC TUNE_PKGARCH should be set to powerpc (or overriden by the machines).
>> On PowerPC64, it should be set to powerpc64. If this is not happening that is
>> the bug, lack of the default TUNE_PKGARCH. (based on the original implementation.)
>
> I don't think your point of view is covering all the issues.
>
> The default TUNE_PKGARCH is TUNE_PKGARCH_${TUNE_PKGARCH_tune-${DEFAULTTUNE}. If
> arch-powerpc.inc sets TUNE_PKGARCH directly, as it used to, then all the more
> specific tunings won't have their TUNE_PKGARCH_tune-<tune> obeyed, which was the
> behavior prior to my submitting a patch which removed the explicit TUNE_PKGARCH
> override in arch-powerpc.inc.

TUNE_PKGARCH_[override] should always replace TUNE_PKGARCH shouldn't it?  Why 
isn't the override being obeyed is my issue.  I really don't care much about the 
implementation other then originally I was told not to do that during various 
reviews.. and that the tuning (override) would always replace TUNE_PKGARCH.

> So we have two options. Either we override TUNE_PKGARCH directly in
> arch-powerpc.inc again, thereby making powerpc tune- files like tune-ppce500v2
> not have their TUNE_PKGARCH_tune-<tune> obeyed (or those tune- files have to
> override TUNE_PKGARCH as well, which seems counter to the whole design of the
> tuning implementation), or we add TUNE_PKGARCH_tune-<tune> definitions for the
> generic tunings also.

We need to be consistent as far as I'm concerned.  If we want to add 
TUNE_PKGARCH_tune-<tune> to all of the tunings, and base architecture 
definitions that is fine.  What I don't want is a mix of different ways this 
stuff is implemented.  It's already complicated enough for people to look at and 
identify what is going on today with subtle differences between the files.

If you can explain why the override isn't overriding the default TUNE_PKGARCH 
(and it's intentional and not a bug), and we can consistently modify all of the 
elements... I'm happy to accept the changes to all of the tunings.

--Mark

> -Chris
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Chris Larson - March 27, 2012, 10:16 p.m.
On Tue, Mar 27, 2012 at 3:13 PM, Mark Hatle <mark.hatle@windriver.com> wrote:
> On 3/27/12 4:57 PM, Christopher Larson wrote:
>>
>> On Tuesday, March 27, 2012 at 2:50 PM, Mark Hatle wrote:
>>>
>>> On 3/27/12 4:05 PM, Chris Larson wrote:
>>>
>>> On PowerPC TUNE_PKGARCH should be set to powerpc (or overriden by the
>>> machines).
>>> On PowerPC64, it should be set to powerpc64. If this is not happening
>>> that is
>>> the bug, lack of the default TUNE_PKGARCH. (based on the original
>>> implementation.)
>>
>>
>> I don't think your point of view is covering all the issues.
>>
>> The default TUNE_PKGARCH is
>> TUNE_PKGARCH_${TUNE_PKGARCH_tune-${DEFAULTTUNE}. If
>> arch-powerpc.inc sets TUNE_PKGARCH directly, as it used to, then all the
>> more
>> specific tunings won't have their TUNE_PKGARCH_tune-<tune> obeyed, which
>> was the
>> behavior prior to my submitting a patch which removed the explicit
>> TUNE_PKGARCH
>> override in arch-powerpc.inc.
>
>
> TUNE_PKGARCH_[override] should always replace TUNE_PKGARCH shouldn't it?
>  Why isn't the override being obeyed is my issue.  I really don't care much
> about the implementation other then originally I was told not to do that
> during various reviews.. and that the tuning (override) would always replace
> TUNE_PKGARCH.

No, it isn't an override. The way it obeys is through default values
in bitbake.conf. As arch-powerpc.inc would override that default
value, it would no longer obey it. To do what you want, you'd have to
rework how the tune-<tune> specific values are applied in the
implementation.

>> So we have two options. Either we override TUNE_PKGARCH directly in
>> arch-powerpc.inc again, thereby making powerpc tune- files like
>> tune-ppce500v2
>> not have their TUNE_PKGARCH_tune-<tune> obeyed (or those tune- files have
>> to
>> override TUNE_PKGARCH as well, which seems counter to the whole design of
>> the
>> tuning implementation), or we add TUNE_PKGARCH_tune-<tune> definitions for
>> the
>> generic tunings also.
>
>
> We need to be consistent as far as I'm concerned.  If we want to add
> TUNE_PKGARCH_tune-<tune> to all of the tunings, and base architecture
> definitions that is fine.  What I don't want is a mix of different ways this
> stuff is implemented.  It's already complicated enough for people to look at
> and identify what is going on today with subtle differences between the
> files.
>
> If you can explain why the override isn't overriding the default
> TUNE_PKGARCH (and it's intentional and not a bug), and we can consistently
> modify all of the elements... I'm happy to accept the changes to all of the
> tunings.

See above. It's not an override. And plenty of files already specify
TUNE_PKGARCH_tune-<tune>, so I don't see how it'd be inconsistent to
do so for the defaults, personally.
McClintock Matthew-B29882 - March 29, 2012, 4:47 a.m.
On Tue, Mar 27, 2012 at 5:16 PM, Chris Larson <clarson@kergoth.com> wrote:
>> If you can explain why the override isn't overriding the default
>> TUNE_PKGARCH (and it's intentional and not a bug), and we can consistently
>> modify all of the elements... I'm happy to accept the changes to all of the
>> tunings.
>
> See above. It's not an override. And plenty of files already specify
> TUNE_PKGARCH_tune-<tune>, so I don't see how it'd be inconsistent to
> do so for the defaults, personally.

If no one else has complained so far it makes me believe they are not
missing any TUNE_PKGARCH_tune-<tune> then.

-M
Chris Larson - March 29, 2012, 4:54 a.m.
On Wed, Mar 28, 2012 at 9:47 PM, McClintock Matthew-B29882
<B29882@freescale.com> wrote:
> On Tue, Mar 27, 2012 at 5:16 PM, Chris Larson <clarson@kergoth.com> wrote:
>>> If you can explain why the override isn't overriding the default
>>> TUNE_PKGARCH (and it's intentional and not a bug), and we can consistently
>>> modify all of the elements... I'm happy to accept the changes to all of the
>>> tunings.
>>
>> See above. It's not an override. And plenty of files already specify
>> TUNE_PKGARCH_tune-<tune>, so I don't see how it'd be inconsistent to
>> do so for the defaults, personally.
>
> If no one else has complained so far it makes me believe they are not
> missing any TUNE_PKGARCH_tune-<tune> then.

I don't understand the point you're attempting to make here.
McClintock Matthew-B29882 - March 29, 2012, 5:07 a.m.
On Wed, Mar 28, 2012 at 11:54 PM, Chris Larson <clarson@kergoth.com> wrote:
> On Wed, Mar 28, 2012 at 9:47 PM, McClintock Matthew-B29882
> <B29882@freescale.com> wrote:
>> On Tue, Mar 27, 2012 at 5:16 PM, Chris Larson <clarson@kergoth.com> wrote:
>>>> If you can explain why the override isn't overriding the default
>>>> TUNE_PKGARCH (and it's intentional and not a bug), and we can consistently
>>>> modify all of the elements... I'm happy to accept the changes to all of the
>>>> tunings.
>>>
>>> See above. It's not an override. And plenty of files already specify
>>> TUNE_PKGARCH_tune-<tune>, so I don't see how it'd be inconsistent to
>>> do so for the defaults, personally.
>>
>> If no one else has complained so far it makes me believe they are not
>> missing any TUNE_PKGARCH_tune-<tune> then.
>
> I don't understand the point you're attempting to make here.

Nevermind.

Anyways, powerpc64 needs these too...

-M
Mark Hatle - March 29, 2012, 3:38 p.m.
On 3/28/12 11:54 PM, Chris Larson wrote:
> On Wed, Mar 28, 2012 at 9:47 PM, McClintock Matthew-B29882
> <B29882@freescale.com>  wrote:
>> On Tue, Mar 27, 2012 at 5:16 PM, Chris Larson<clarson@kergoth.com>  wrote:
>>>> If you can explain why the override isn't overriding the default
>>>> TUNE_PKGARCH (and it's intentional and not a bug), and we can consistently
>>>> modify all of the elements... I'm happy to accept the changes to all of the
>>>> tunings.
>>>
>>> See above. It's not an override. And plenty of files already specify
>>> TUNE_PKGARCH_tune-<tune>, so I don't see how it'd be inconsistent to
>>> do so for the defaults, personally.
>>
>> If no one else has complained so far it makes me believe they are not
>> missing any TUNE_PKGARCH_tune-<tune>  then.
>
> I don't understand the point you're attempting to make here.

Just an FYI -- I've not forgotten about this.. I'm going to look into what is 
currently implemented and figure out how to get it to be consistent.. things 
have definitely changed since the initial implementation, and things are no 
longer consistent.

Hopefully I'll have an update later today.

--Mark
Chris Larson - March 29, 2012, 3:54 p.m.
On Thu, Mar 29, 2012 at 8:38 AM, Mark Hatle <mark.hatle@windriver.com> wrote:
> On 3/28/12 11:54 PM, Chris Larson wrote:
>>
>> On Wed, Mar 28, 2012 at 9:47 PM, McClintock Matthew-B29882
>> <B29882@freescale.com>  wrote:
>>>
>>> On Tue, Mar 27, 2012 at 5:16 PM, Chris Larson<clarson@kergoth.com>
>>>  wrote:
>>>>>
>>>>> If you can explain why the override isn't overriding the default
>>>>> TUNE_PKGARCH (and it's intentional and not a bug), and we can
>>>>> consistently
>>>>> modify all of the elements... I'm happy to accept the changes to all of
>>>>> the
>>>>> tunings.
>>>>
>>>>
>>>> See above. It's not an override. And plenty of files already specify
>>>> TUNE_PKGARCH_tune-<tune>, so I don't see how it'd be inconsistent to
>>>> do so for the defaults, personally.
>>>
>>>
>>> If no one else has complained so far it makes me believe they are not
>>> missing any TUNE_PKGARCH_tune-<tune>  then.
>>
>>
>> I don't understand the point you're attempting to make here.
>
>
> Just an FYI -- I've not forgotten about this.. I'm going to look into what
> is currently implemented and figure out how to get it to be consistent..
> things have definitely changed since the initial implementation, and things
> are no longer consistent.

Understood, thanks. It's good that someone with a better grasp of the
entirety of the implementation and its goals take that on. This
particular patch isn't particularly important to me, the other two
were, but I'm very curious as to how you'll address this, since as I
mentioned before it seems that the non-override based implementation
is a problem for archs that explicitly set TUNE_PKGARCH.  Thanks for
looking into this.
McClintock Matthew-B29882 - March 29, 2012, 3:58 p.m.
On Thu, Mar 29, 2012 at 10:38 AM, Mark Hatle <mark.hatle@windriver.com> wrote:
> On 3/28/12 11:54 PM, Chris Larson wrote:
>>
>> On Wed, Mar 28, 2012 at 9:47 PM, McClintock Matthew-B29882
>> <B29882@freescale.com>  wrote:
>>>
>>> On Tue, Mar 27, 2012 at 5:16 PM, Chris Larson<clarson@kergoth.com>
>>>  wrote:
>>>>>
>>>>> If you can explain why the override isn't overriding the default
>>>>> TUNE_PKGARCH (and it's intentional and not a bug), and we can
>>>>> consistently
>>>>> modify all of the elements... I'm happy to accept the changes to all of
>>>>> the
>>>>> tunings.
>>>>
>>>>
>>>> See above. It's not an override. And plenty of files already specify
>>>> TUNE_PKGARCH_tune-<tune>, so I don't see how it'd be inconsistent to
>>>> do so for the defaults, personally.
>>>
>>>
>>> If no one else has complained so far it makes me believe they are not
>>> missing any TUNE_PKGARCH_tune-<tune>  then.
>>
>>
>> I don't understand the point you're attempting to make here.
>
>
> Just an FYI -- I've not forgotten about this.. I'm going to look into what
> is currently implemented and figure out how to get it to be consistent..
> things have definitely changed since the initial implementation, and things
> are no longer consistent.
>
> Hopefully I'll have an update later today.

Just for some background:

I added the TUNEPKG_ARCH = TUNE_PKGARCH_tune-$DEFAULTTUNE bit because
it seemed to make sense and it was missing from this list:

meta/conf/bitbake.conf:TUNE_FEATURES ??= "${TUNE_FEATURES_tune-${DEFAULTTUNE}}"
meta/conf/bitbake.conf:PACKAGE_EXTRA_ARCHS ??=
"${PACKAGE_EXTRA_ARCHS_tune-${DEFAULTTUNE}}"

Also it seemed silly (at the time admittedly) to set TUNE_PKGARCH
based off a value in TUNE_FEATURES and using bb functions to do this
when the way I went with was simply setting a value. I did miss that
the default case no longer works properly unless you have a
TUNE_PKGARCH_tune-{powerpc,powerpc-nf,powerpc64} =
{powerpc,powerpc-nf,powerpc64} set in the default arch files.

Anyways, I'm not stuck on one particular method at the time I was
trying to get ppce5500 multilib working properly.

-M
Mark Hatle - March 29, 2012, 4:40 p.m.
(This is going to be a bit rambling I'm afraid.. I'm working my way through 
investigation and a possible solution..  so be sure to look all the way to the 
end..)

On 3/29/12 10:58 AM, McClintock Matthew-B29882 wrote:
> On Thu, Mar 29, 2012 at 10:38 AM, Mark Hatle<mark.hatle@windriver.com>  wrote:
>> On 3/28/12 11:54 PM, Chris Larson wrote:
>>>
>>> On Wed, Mar 28, 2012 at 9:47 PM, McClintock Matthew-B29882
>>> <B29882@freescale.com>    wrote:
>>>>
>>>> On Tue, Mar 27, 2012 at 5:16 PM, Chris Larson<clarson@kergoth.com>
>>>>   wrote:
>>>>>>
>>>>>> If you can explain why the override isn't overriding the default
>>>>>> TUNE_PKGARCH (and it's intentional and not a bug), and we can
>>>>>> consistently
>>>>>> modify all of the elements... I'm happy to accept the changes to all of
>>>>>> the
>>>>>> tunings.
>>>>>
>>>>>
>>>>> See above. It's not an override. And plenty of files already specify
>>>>> TUNE_PKGARCH_tune-<tune>, so I don't see how it'd be inconsistent to
>>>>> do so for the defaults, personally.
>>>>
>>>>
>>>> If no one else has complained so far it makes me believe they are not
>>>> missing any TUNE_PKGARCH_tune-<tune>    then.
>>>
>>>
>>> I don't understand the point you're attempting to make here.
>>
>>
>> Just an FYI -- I've not forgotten about this.. I'm going to look into what
>> is currently implemented and figure out how to get it to be consistent..
>> things have definitely changed since the initial implementation, and things
>> are no longer consistent.
>>
>> Hopefully I'll have an update later today.
>
> Just for some background:
>
> I added the TUNEPKG_ARCH = TUNE_PKGARCH_tune-$DEFAULTTUNE bit because
> it seemed to make sense and it was missing from this list:
>
> meta/conf/bitbake.conf:TUNE_FEATURES ??= "${TUNE_FEATURES_tune-${DEFAULTTUNE}}"
> meta/conf/bitbake.conf:PACKAGE_EXTRA_ARCHS ??=
> "${PACKAGE_EXTRA_ARCHS_tune-${DEFAULTTUNE}}"
>
> Also it seemed silly (at the time admittedly) to set TUNE_PKGARCH
> based off a value in TUNE_FEATURES and using bb functions to do this
> when the way I went with was simply setting a value. I did miss that
> the default case no longer works properly unless you have a
> TUNE_PKGARCH_tune-{powerpc,powerpc-nf,powerpc64} =
> {powerpc,powerpc-nf,powerpc64} set in the default arch files.
>
> Anyways, I'm not stuck on one particular method at the time I was
> trying to get ppce5500 multilib working properly.

Ok, that makes a bit more sense.. What I see right now is:

TUNE_PKGARCH ??= "${TUNE_PKGARCH_tune-${DEFAULTTUNE}}"

(This was originally designed that TUNE_PKGARCH was defined based on the 
overrides... note, not only has the above affected that, but it's not consistent 
in the other architectures either.. so it was wrong, and is still likely wrong...)

Arm defines it as:

TUNE_PKGARCH = "${@d.getVar('ARMPKGARCH', 
True)}${ARMPKGSFX_THUMB}${ARMPKGSFX_DSP}${ARMPKGSFX_EABI}${ARMPKGSFX_ENDIAN}${ARMPKGSFX_FPU}"

That way the ARMPKGARCH is the base of the configuration, while the DSP, ABI, 
Endian and FPU are added dynamically based on the feature flags (and associated 
settings)..

IA defines is as:
TUNE_PKGARCH ?= "${@bb.utils.contains("TUNE_FEATURES", "m32", "x86", "x86_64", d)}"
TUNE_PKGARCH .= "${@bb.utils.contains("TUNE_FEATURES", "mx32", "_x32", "", d)}"

And then some (c3, core2, i586) override that, but not all of them.. again this 
is likely wrong as well..

MIPS defines it as:

TUNE_PKGARCH ?= "${TUNE_ARCH}${MIPSPKGSFX_FPU}${MIPSPKGSFX_ABI}"

TUNE_ARCH as:
TUNE_ARCH = "mips${MIPSPKGSFX_BYTE}${MIPSPKGSFX_ENDIAN}

and finally powerpc:

There is NO TUNE_PKGARCH defined.. but there is an append:

TUNE_PKGARCH_append = "${PPCPKGSFX_FPU}"

And each of the tunings:

tune-ppc603e.inc:TUNE_PKGARCH_tune-ppc603e = "ppc603e"
tune-ppce300c2.inc:TUNE_PKGARCH_tune-ppce300c2 = "ppce300c2"
tune-ppce500.inc:TUNE_PKGARCH_tune-ppce500 = "ppce500"
tune-ppce500mc.inc:TUNE_PKGARCH_tune-ppce500mc = "ppce500mc"
tune-ppce500v2.inc:TUNE_PKGARCH_tune-ppce500v2 = "ppce500v2"
tune-ppce5500.inc:TUNE_PKGARCH_tune-ppce5500 = "ppce5500"
tune-ppce5500.inc:TUNE_PKGARCH_tune-ppc64e5500 = "ppc64e5500"


....  so somehow we need to figure out a more consistent approach.  Personally I 
prefer the ARM/MIPS style approach.  Build up the format using a consistent set 
of features/arguments.

The one thing I'm still struggling with though is what is the final purpose of 
these variables.  I may be able to make a better determination as to the right 
values if I truly understood the difference.  Below is my attempt at 
understanding this... (let me know if this is correct or if you have corrections)

DEFAULTTUNE - The default tuning for a given machine or build
[multilib build uses overrides to change the DEFAULTTUNE setting], tune values 
are defined by the conf/machine/include/* items

TUNE_FEATURES_tune-<tune> - Should not be manually modified (i.e. not in 
local.conf, only specified by a tune file), but inherited via the DEFAULTTUNE 
value -- this defines the set of tuning variables that a given tuning uses to 
setup cflags, pkgarch, abi, etc..

TUNE_CCARGS - Setup the cflags based on the TUNE_FEATURES settings.  These 
should be additive when defined using "+=".  All items in this list should be 
dynamic! i.e. ${@bb.utils.contains("TUNE_FEATURES", "feature", "cflag", 
"!cflag", d)}

AVAILTUNES - This is a list of all available tunes within the machine 
configuration.  This does not mean that all available tunes are compatible with 
that machine configuration, or with each other.  The DEFAULTTUNE must be in this 
list.  Each tuning file can add to this list using "+=".

PACKAGE_EXTRA_ARCHS_tune-<tune> - List of all compatible package arches to a 
given tune.

TUNE_ARCH - GNU canonical arch for the architecture.  I.e. arm, armeb, mips, 
mips64, etc.

TUNE_PKGARCH - The package architecture listed for the purpose of package feeds. 
  These are the names used by the PACKAGE_EXTRA_ARCHS for compatibility reasons.

TARGET_FPU - The FPU setting for a given architecture, hard (generate floating 
point instructions), soft (generate internal gcc calls), "other" architecture 
specific floating point.  This is synchronized with the compiler and other 
toolchain items.  This should be dynamically configured in the same way the 
TUNE_CCARGS is.

BASE_LIB_tune-<tune> - The "/lib" location for a specific ABI.

----

So how about this for a possible solution:

bitbake.conf:
Keep - TUNE_FEATURES ??= "${TUNE_FEATURES_tune-${DEFAULTTUNE}}"

Remove - TUNE_PKGARCH

In the tuning files, specifically the architectural tuning files:

Require a default setting of TUNE_PKGARCH.  The default setting MIGHT be 
specific to an arch (as in the ARM case above), or could be
TUNE_PKGARCH = ${TUNE_PKGARCH_tune-${DEFAULTTUNE}} for something like PowerPC 
where it may be easier to specific the exact package arch.

Each architecture file needs a small README to indicate how someone is to add a 
new tuning to that architecture.

----

Does the above seem reasonable?  If so I'll try to get started on that...

--Mark

> -M
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Chris Larson - March 29, 2012, 6:38 p.m.
On Thu, Mar 29, 2012 at 9:40 AM, Mark Hatle <mark.hatle@windriver.com> wrote:
> (This is going to be a bit rambling I'm afraid.. I'm working my way through
> investigation and a possible solution..  so be sure to look all the way to
> the end..)
>
>
> On 3/29/12 10:58 AM, McClintock Matthew-B29882 wrote:
>>
>> On Thu, Mar 29, 2012 at 10:38 AM, Mark Hatle<mark.hatle@windriver.com>
>>  wrote:
>>>
>>> On 3/28/12 11:54 PM, Chris Larson wrote:
>>>>
>>>>
>>>> On Wed, Mar 28, 2012 at 9:47 PM, McClintock Matthew-B29882
>>>> <B29882@freescale.com>    wrote:
>>>>>
>>>>>
>>>>> On Tue, Mar 27, 2012 at 5:16 PM, Chris Larson<clarson@kergoth.com>
>>>>>  wrote:
>>>>>>>
>>>>>>>
>>>>>>> If you can explain why the override isn't overriding the default
>>>>>>> TUNE_PKGARCH (and it's intentional and not a bug), and we can
>>>>>>> consistently
>>>>>>> modify all of the elements... I'm happy to accept the changes to all
>>>>>>> of
>>>>>>> the
>>>>>>> tunings.
>>>>>>
>>>>>>
>>>>>>
>>>>>> See above. It's not an override. And plenty of files already specify
>>>>>> TUNE_PKGARCH_tune-<tune>, so I don't see how it'd be inconsistent to
>>>>>> do so for the defaults, personally.
>>>>>
>>>>>
>>>>>
>>>>> If no one else has complained so far it makes me believe they are not
>>>>> missing any TUNE_PKGARCH_tune-<tune>    then.
>>>>
>>>>
>>>>
>>>> I don't understand the point you're attempting to make here.
>>>
>>>
>>>
>>> Just an FYI -- I've not forgotten about this.. I'm going to look into
>>> what
>>> is currently implemented and figure out how to get it to be consistent..
>>> things have definitely changed since the initial implementation, and
>>> things
>>> are no longer consistent.
>>>
>>> Hopefully I'll have an update later today.
>>
>>
>> Just for some background:
>>
>> I added the TUNEPKG_ARCH = TUNE_PKGARCH_tune-$DEFAULTTUNE bit because
>> it seemed to make sense and it was missing from this list:
>>
>> meta/conf/bitbake.conf:TUNE_FEATURES ??=
>> "${TUNE_FEATURES_tune-${DEFAULTTUNE}}"
>> meta/conf/bitbake.conf:PACKAGE_EXTRA_ARCHS ??=
>> "${PACKAGE_EXTRA_ARCHS_tune-${DEFAULTTUNE}}"
>>
>> Also it seemed silly (at the time admittedly) to set TUNE_PKGARCH
>> based off a value in TUNE_FEATURES and using bb functions to do this
>> when the way I went with was simply setting a value. I did miss that
>> the default case no longer works properly unless you have a
>> TUNE_PKGARCH_tune-{powerpc,powerpc-nf,powerpc64} =
>> {powerpc,powerpc-nf,powerpc64} set in the default arch files.
>>
>> Anyways, I'm not stuck on one particular method at the time I was
>> trying to get ppce5500 multilib working properly.
>
>
> Ok, that makes a bit more sense.. What I see right now is:
>
> TUNE_PKGARCH ??= "${TUNE_PKGARCH_tune-${DEFAULTTUNE}}"
>
> (This was originally designed that TUNE_PKGARCH was defined based on the
> overrides... note, not only has the above affected that, but it's not
> consistent in the other architectures either.. so it was wrong, and is still
> likely wrong...)
>
> Arm defines it as:
>
> TUNE_PKGARCH = "${@d.getVar('ARMPKGARCH',
> True)}${ARMPKGSFX_THUMB}${ARMPKGSFX_DSP}${ARMPKGSFX_EABI}${ARMPKGSFX_ENDIAN}${ARMPKGSFX_FPU}"
>
> That way the ARMPKGARCH is the base of the configuration, while the DSP,
> ABI, Endian and FPU are added dynamically based on the feature flags (and
> associated settings)..
>
> IA defines is as:
> TUNE_PKGARCH ?= "${@bb.utils.contains("TUNE_FEATURES", "m32", "x86",
> "x86_64", d)}"
> TUNE_PKGARCH .= "${@bb.utils.contains("TUNE_FEATURES", "mx32", "_x32", "",
> d)}"
>
> And then some (c3, core2, i586) override that, but not all of them.. again
> this is likely wrong as well..
>
> MIPS defines it as:
>
> TUNE_PKGARCH ?= "${TUNE_ARCH}${MIPSPKGSFX_FPU}${MIPSPKGSFX_ABI}"
>
> TUNE_ARCH as:
> TUNE_ARCH = "mips${MIPSPKGSFX_BYTE}${MIPSPKGSFX_ENDIAN}
>
> and finally powerpc:
>
> There is NO TUNE_PKGARCH defined.. but there is an append:
>
> TUNE_PKGARCH_append = "${PPCPKGSFX_FPU}"
>
> And each of the tunings:
>
> tune-ppc603e.inc:TUNE_PKGARCH_tune-ppc603e = "ppc603e"
> tune-ppce300c2.inc:TUNE_PKGARCH_tune-ppce300c2 = "ppce300c2"
> tune-ppce500.inc:TUNE_PKGARCH_tune-ppce500 = "ppce500"
> tune-ppce500mc.inc:TUNE_PKGARCH_tune-ppce500mc = "ppce500mc"
> tune-ppce500v2.inc:TUNE_PKGARCH_tune-ppce500v2 = "ppce500v2"
> tune-ppce5500.inc:TUNE_PKGARCH_tune-ppce5500 = "ppce5500"
> tune-ppce5500.inc:TUNE_PKGARCH_tune-ppc64e5500 = "ppc64e5500"
>
>
> ....  so somehow we need to figure out a more consistent approach.
>  Personally I prefer the ARM/MIPS style approach.  Build up the format using
> a consistent set of features/arguments.

That seems reasonable to me. I personally don't care much about which
approach is used as long as we're consistent about it :)

> The one thing I'm still struggling with though is what is the final purpose
> of these variables.  I may be able to make a better determination as to the
> right values if I truly understood the difference.  Below is my attempt at
> understanding this... (let me know if this is correct or if you have
> corrections)
>
> DEFAULTTUNE - The default tuning for a given machine or build
> [multilib build uses overrides to change the DEFAULTTUNE setting], tune
> values are defined by the conf/machine/include/* items
>
> TUNE_FEATURES_tune-<tune> - Should not be manually modified (i.e. not in
> local.conf, only specified by a tune file), but inherited via the
> DEFAULTTUNE value -- this defines the set of tuning variables that a given
> tuning uses to setup cflags, pkgarch, abi, etc..
>
> TUNE_CCARGS - Setup the cflags based on the TUNE_FEATURES settings.  These
> should be additive when defined using "+=".  All items in this list should
> be dynamic! i.e. ${@bb.utils.contains("TUNE_FEATURES", "feature", "cflag",
> "!cflag", d)}
>
> AVAILTUNES - This is a list of all available tunes within the machine
> configuration.  This does not mean that all available tunes are compatible
> with that machine configuration, or with each other.  The DEFAULTTUNE must
> be in this list.  Each tuning file can add to this list using "+=".
>
> PACKAGE_EXTRA_ARCHS_tune-<tune> - List of all compatible package arches to a
> given tune.
>
> TUNE_ARCH - GNU canonical arch for the architecture.  I.e. arm, armeb, mips,
> mips64, etc.
>
> TUNE_PKGARCH - The package architecture listed for the purpose of package
> feeds.  These are the names used by the PACKAGE_EXTRA_ARCHS for
> compatibility reasons.
>
> TARGET_FPU - The FPU setting for a given architecture, hard (generate
> floating point instructions), soft (generate internal gcc calls), "other"
> architecture specific floating point.  This is synchronized with the
> compiler and other toolchain items.  This should be dynamically configured
> in the same way the TUNE_CCARGS is.
>
> BASE_LIB_tune-<tune> - The "/lib" location for a specific ABI.

That's my understanding of those as well, if someone disagrees, it'd
be very interesting to know that. Further, it'd be nice to document
these somewhere.. either documentation.conf, though they're intended
for the bsp maintainers not the average user, or somewhere else
appropriate.

> So how about this for a possible solution:
>
> bitbake.conf:
> Keep - TUNE_FEATURES ??= "${TUNE_FEATURES_tune-${DEFAULTTUNE}}"
>
> Remove - TUNE_PKGARCH
>
> In the tuning files, specifically the architectural tuning files:
>
> Require a default setting of TUNE_PKGARCH.  The default setting MIGHT be
> specific to an arch (as in the ARM case above), or could be
> TUNE_PKGARCH = ${TUNE_PKGARCH_tune-${DEFAULTTUNE}} for something like
> PowerPC where it may be easier to specific the exact package arch.
>
> Each architecture file needs a small README to indicate how someone is to
> add a new tuning to that architecture.
>
> ----
>
> Does the above seem reasonable?  If so I'll try to get started on that...

That seems reasonable to me, for what that's worth. I could see
simplifying the way the powerpc stuff works in the future, but at
least we'd have something functional for now as well. It keeps primary
responsibility for TUNE_PKGARCH in arch-powerpc*.inc, which is as it
should be -- the arch knows best how to manage it. I'm curious to hear
Matthew's perspective on this.
McClintock Matthew-B29882 - March 29, 2012, 6:50 p.m.
On Thu, Mar 29, 2012 at 1:38 PM, Chris Larson <clarson@kergoth.com> wrote:
>> Does the above seem reasonable?  If so I'll try to get started on that...
>
> That seems reasonable to me, for what that's worth. I could see
> simplifying the way the powerpc stuff works in the future, but at
> least we'd have something functional for now as well. It keeps primary
> responsibility for TUNE_PKGARCH in arch-powerpc*.inc, which is as it
> should be -- the arch knows best how to manage it. I'm curious to hear
> Matthew's perspective on this.

This is fine with me, I just did not like setting

TUNE_FEATURES = foo

only to have

TUNE_ARCH  = ${@bb.utils.contains("TUNE_FEATURES", "foo", "foo",
"${PPCPKGARCH}", d)}"

when it seemed better to just

TUNE_ARCH = foo

At least I think that was my thought logic, then it went a step
further and thought we could just use TUNE_PKGARCH_tune-$DEFAULTTUNE
since these would be available from multilib anyways...

-M

Patch

diff --git a/meta/conf/machine/include/powerpc/arch-powerpc.inc b/meta/conf/machine/include/powerpc/arch-powerpc.inc
index c5fd6b7..3438b46 100644
--- a/meta/conf/machine/include/powerpc/arch-powerpc.inc
+++ b/meta/conf/machine/include/powerpc/arch-powerpc.inc
@@ -26,6 +26,8 @@  AVAILTUNES += "powerpc powerpc-nf"
 TUNE_FEATURES_tune-powerpc-nf ?= "m32 fpu-soft"
 BASE_LIB_tune-powerpc-nf = "lib"
 PACKAGE_EXTRA_ARCHS_tune-powerpc-nf = "powerpc-nf"
+TUNE_PKGARCH_tune-powerpc-nf = "powerpc-nf"
 TUNE_FEATURES_tune-powerpc ?= "m32 fpu-hard"
 BASE_LIB_tune-powerpc = "lib"
 PACKAGE_EXTRA_ARCHS_tune-powerpc = "powerpc"
+TUNE_PKGARCH_tune-powerpc = "powerpc"