Re: [OE-core] [meta-oe][RFC 1/6] arm64: set BASE_LIB to lib64

2020-09-10 Thread Mark Hatle


On 9/10/20 10:11 AM, Jon Mason wrote:
> On Thu, Sep 10, 2020 at 12:57 AM Mark Hatle
>  wrote:
>>
>>
>>
>> On 9/9/20 6:29 PM, Jon Mason wrote:
>>> On Wed, Sep 9, 2020 at 6:55 PM Mark Hatle
>>>  wrote:



 On 9/9/20 5:45 PM, Jon Mason wrote:
> Set BASE_LIB for all arm64 systems to be lib64 by default.  This can be
> overridden for those that want something else (see tune-cortexa32.inc).
>
> Signed-off-by: Jon Mason 
> ---
>  meta/conf/machine/include/arm/arch-arm64.inc   | 3 +--
>  meta/conf/machine/include/arm/arch-armv8-2a.inc| 2 --
>  meta/conf/machine/include/arm/arch-armv8a.inc  | 4 
>  meta/conf/machine/include/tune-cortexa32.inc   | 1 +
>  meta/conf/machine/include/tune-cortexa35.inc   | 2 --
>  meta/conf/machine/include/tune-cortexa53.inc   | 2 --
>  meta/conf/machine/include/tune-cortexa55.inc   | 1 -
>  meta/conf/machine/include/tune-cortexa57-cortexa53.inc | 1 -
>  meta/conf/machine/include/tune-cortexa57.inc   | 2 --
>  meta/conf/machine/include/tune-cortexa72-cortexa53.inc | 2 --
>  meta/conf/machine/include/tune-cortexa72.inc   | 1 -
>  meta/conf/machine/include/tune-cortexa73-cortexa53.inc | 2 --
>  12 files changed, 2 insertions(+), 21 deletions(-)
>
> diff --git a/meta/conf/machine/include/arm/arch-arm64.inc 
> b/meta/conf/machine/include/arm/arch-arm64.inc
> index 6d5b22fff081..8c3764186ec4 100644
> --- a/meta/conf/machine/include/arm/arch-arm64.inc
> +++ b/meta/conf/machine/include/arm/arch-arm64.inc
> @@ -1,4 +1,5 @@
>  DEFAULTTUNE ?= "aarch64"
> +BASE_LIB ?= "lib64"

 Does this work?  The default multilib behavior is:

 multilib.conf:baselib = "${@d.getVar('BASE_LIB_tune-' + 
 (d.getVar('DEFAULTTUNE')
 or 'INVALID')) or d.getVar('BASELIB')}"

 bitbake.conf:baselib = "${BASELIB}"
 bitbake.conf:BASELIB = "lib"
 bitbake.conf:BASELIB_powerpc64 = "lib64"
 bitbake.conf:BASELIB_powerpc64le = "lib64"

 is what has been defined in the bitbake.conf file.

 Idea being in the 'normal' (not-multilib) case, 'baselib' (which what is 
 used)
 gets set to 'BASELIB'.  Only PowerPC 64 has a hard coded 'lib64'.  Every 
 other
 architecture is considered to be variable, unless defined in the tune.  
 (The two
 PowerPC settings really should be in a PPC tune file.)

 So IF the multilib.conf is enabled, it's going to look for 
 BASE_LIB_tune-
 and then BASELIB, but it won't look at 'BASE_LIB'.
>>>
>>> It depends on what "work" is defined as :)
>>> I did build, boot, and run testimage on it (with issue).  But I'm
>>> probably not hitting the multilib issue you are describing.  Honestly,
>>> I don't understand it and needed to spend more time than I did (based
>>> on your comments).  I like the removal of lines to simplify it, but I
>>> need to do some more reading on it.  I'll drop this patch and come
>>> back to the underlying problem at some point in the future.
>>
>> (This is from memory, so it may not be right)
>>
>> In your local.conf:
>>
>> MULTILIBS = "multilib:lib32"
>> require conf/multilib.conf
>>
>> DEFAULTTUNE_virtclass-multilib-lib32 = "armv7vethf"
>> MACHINE = "qemuarm64"
>>
>> Then add something like "lib32-glibc" as a dependency to your image.
> 
> This is building, booting, and passing testimage for me.  It's
> possible I screwed something up (weird that a screwup would make
> things work though).

Boot the image and verify that both /lib and /lib32 are there and populated by
the libc.  If they are then it likely works.

--Mark

> Thanks,
> Jon
> 
>> --Mark
>>
>>> Thanks,
>>> Jon
>>>
>  require conf/machine/include/arm/arch-armv7ve.inc
>
> @@ -14,8 +15,6 @@ TUNE_FEATURES_tune-aarch64 = "aarch64"
>  TUNE_FEATURES_tune-aarch64_be = "${TUNE_FEATURES_tune-aarch64} bigendian"
>  TUNE_PKGARCH_64_tune-aarch64 = "aarch64"
>  TUNE_PKGARCH_64_tune-aarch64_be = "aarch64_be"
> -BASE_LIB_tune-aarch64 = "lib64"
> -BASE_LIB_tune-aarch64_be = "lib64"

 This was originally done like this to enable multilib, as BASE_LIB needs 
 to be
 configured per multilib.  (I don't know if it's really necessary any 
 longer.)

 Note the other 32/64 bit architecture are still implemented like this.

 There was also talk at the time of different lib dirs for little and big 
 endian,
 but I never saw that actually happen.

 We also wanted a way to build optimized libraries, like some 
 distributions, that
 are optimized for specific tunings and place those into non-conflicting
 directories.  But again, AFAIK nobody actually did it and I' not sure it
 actually works.

 And for the record BASE_LIB is documented in the tune README as:

 BASE_LIB_tune- - The "/lib" location for a specific ABI.  This is
 used in a 

Re: [OE-core] [meta-oe][RFC 1/6] arm64: set BASE_LIB to lib64

2020-09-10 Thread Jon Mason
On Thu, Sep 10, 2020 at 12:57 AM Mark Hatle
 wrote:
>
>
>
> On 9/9/20 6:29 PM, Jon Mason wrote:
> > On Wed, Sep 9, 2020 at 6:55 PM Mark Hatle
> >  wrote:
> >>
> >>
> >>
> >> On 9/9/20 5:45 PM, Jon Mason wrote:
> >>> Set BASE_LIB for all arm64 systems to be lib64 by default.  This can be
> >>> overridden for those that want something else (see tune-cortexa32.inc).
> >>>
> >>> Signed-off-by: Jon Mason 
> >>> ---
> >>>  meta/conf/machine/include/arm/arch-arm64.inc   | 3 +--
> >>>  meta/conf/machine/include/arm/arch-armv8-2a.inc| 2 --
> >>>  meta/conf/machine/include/arm/arch-armv8a.inc  | 4 
> >>>  meta/conf/machine/include/tune-cortexa32.inc   | 1 +
> >>>  meta/conf/machine/include/tune-cortexa35.inc   | 2 --
> >>>  meta/conf/machine/include/tune-cortexa53.inc   | 2 --
> >>>  meta/conf/machine/include/tune-cortexa55.inc   | 1 -
> >>>  meta/conf/machine/include/tune-cortexa57-cortexa53.inc | 1 -
> >>>  meta/conf/machine/include/tune-cortexa57.inc   | 2 --
> >>>  meta/conf/machine/include/tune-cortexa72-cortexa53.inc | 2 --
> >>>  meta/conf/machine/include/tune-cortexa72.inc   | 1 -
> >>>  meta/conf/machine/include/tune-cortexa73-cortexa53.inc | 2 --
> >>>  12 files changed, 2 insertions(+), 21 deletions(-)
> >>>
> >>> diff --git a/meta/conf/machine/include/arm/arch-arm64.inc 
> >>> b/meta/conf/machine/include/arm/arch-arm64.inc
> >>> index 6d5b22fff081..8c3764186ec4 100644
> >>> --- a/meta/conf/machine/include/arm/arch-arm64.inc
> >>> +++ b/meta/conf/machine/include/arm/arch-arm64.inc
> >>> @@ -1,4 +1,5 @@
> >>>  DEFAULTTUNE ?= "aarch64"
> >>> +BASE_LIB ?= "lib64"
> >>
> >> Does this work?  The default multilib behavior is:
> >>
> >> multilib.conf:baselib = "${@d.getVar('BASE_LIB_tune-' + 
> >> (d.getVar('DEFAULTTUNE')
> >> or 'INVALID')) or d.getVar('BASELIB')}"
> >>
> >> bitbake.conf:baselib = "${BASELIB}"
> >> bitbake.conf:BASELIB = "lib"
> >> bitbake.conf:BASELIB_powerpc64 = "lib64"
> >> bitbake.conf:BASELIB_powerpc64le = "lib64"
> >>
> >> is what has been defined in the bitbake.conf file.
> >>
> >> Idea being in the 'normal' (not-multilib) case, 'baselib' (which what is 
> >> used)
> >> gets set to 'BASELIB'.  Only PowerPC 64 has a hard coded 'lib64'.  Every 
> >> other
> >> architecture is considered to be variable, unless defined in the tune.  
> >> (The two
> >> PowerPC settings really should be in a PPC tune file.)
> >>
> >> So IF the multilib.conf is enabled, it's going to look for 
> >> BASE_LIB_tune-
> >> and then BASELIB, but it won't look at 'BASE_LIB'.
> >
> > It depends on what "work" is defined as :)
> > I did build, boot, and run testimage on it (with issue).  But I'm
> > probably not hitting the multilib issue you are describing.  Honestly,
> > I don't understand it and needed to spend more time than I did (based
> > on your comments).  I like the removal of lines to simplify it, but I
> > need to do some more reading on it.  I'll drop this patch and come
> > back to the underlying problem at some point in the future.
>
> (This is from memory, so it may not be right)
>
> In your local.conf:
>
> MULTILIBS = "multilib:lib32"
> require conf/multilib.conf
>
> DEFAULTTUNE_virtclass-multilib-lib32 = "armv7vethf"
> MACHINE = "qemuarm64"
>
> Then add something like "lib32-glibc" as a dependency to your image.

This is building, booting, and passing testimage for me.  It's
possible I screwed something up (weird that a screwup would make
things work though).

Thanks,
Jon

> --Mark
>
> > Thanks,
> > Jon
> >
> >>>  require conf/machine/include/arm/arch-armv7ve.inc
> >>>
> >>> @@ -14,8 +15,6 @@ TUNE_FEATURES_tune-aarch64 = "aarch64"
> >>>  TUNE_FEATURES_tune-aarch64_be = "${TUNE_FEATURES_tune-aarch64} bigendian"
> >>>  TUNE_PKGARCH_64_tune-aarch64 = "aarch64"
> >>>  TUNE_PKGARCH_64_tune-aarch64_be = "aarch64_be"
> >>> -BASE_LIB_tune-aarch64 = "lib64"
> >>> -BASE_LIB_tune-aarch64_be = "lib64"
> >>
> >> This was originally done like this to enable multilib, as BASE_LIB needs 
> >> to be
> >> configured per multilib.  (I don't know if it's really necessary any 
> >> longer.)
> >>
> >> Note the other 32/64 bit architecture are still implemented like this.
> >>
> >> There was also talk at the time of different lib dirs for little and big 
> >> endian,
> >> but I never saw that actually happen.
> >>
> >> We also wanted a way to build optimized libraries, like some 
> >> distributions, that
> >> are optimized for specific tunings and place those into non-conflicting
> >> directories.  But again, AFAIK nobody actually did it and I' not sure it
> >> actually works.
> >>
> >> And for the record BASE_LIB is documented in the tune README as:
> >>
> >> BASE_LIB_tune- - The "/lib" location for a specific ABI.  This is
> >> used in a multilib configuration to place the libraries in the correct,
> >> non-conflicting locations.
> >>
> >>>  PACKAGE_EXTRA_ARCHS_tune-aarch64 = "aarch64"
> >>>  PACKAGE_EXTRA_ARCHS_tune-aarch64_be = "aarch64_be"

Re: [OE-core] [meta-oe][RFC 1/6] arm64: set BASE_LIB to lib64

2020-09-09 Thread Mark Hatle


On 9/9/20 6:29 PM, Jon Mason wrote:
> On Wed, Sep 9, 2020 at 6:55 PM Mark Hatle
>  wrote:
>>
>>
>>
>> On 9/9/20 5:45 PM, Jon Mason wrote:
>>> Set BASE_LIB for all arm64 systems to be lib64 by default.  This can be
>>> overridden for those that want something else (see tune-cortexa32.inc).
>>>
>>> Signed-off-by: Jon Mason 
>>> ---
>>>  meta/conf/machine/include/arm/arch-arm64.inc   | 3 +--
>>>  meta/conf/machine/include/arm/arch-armv8-2a.inc| 2 --
>>>  meta/conf/machine/include/arm/arch-armv8a.inc  | 4 
>>>  meta/conf/machine/include/tune-cortexa32.inc   | 1 +
>>>  meta/conf/machine/include/tune-cortexa35.inc   | 2 --
>>>  meta/conf/machine/include/tune-cortexa53.inc   | 2 --
>>>  meta/conf/machine/include/tune-cortexa55.inc   | 1 -
>>>  meta/conf/machine/include/tune-cortexa57-cortexa53.inc | 1 -
>>>  meta/conf/machine/include/tune-cortexa57.inc   | 2 --
>>>  meta/conf/machine/include/tune-cortexa72-cortexa53.inc | 2 --
>>>  meta/conf/machine/include/tune-cortexa72.inc   | 1 -
>>>  meta/conf/machine/include/tune-cortexa73-cortexa53.inc | 2 --
>>>  12 files changed, 2 insertions(+), 21 deletions(-)
>>>
>>> diff --git a/meta/conf/machine/include/arm/arch-arm64.inc 
>>> b/meta/conf/machine/include/arm/arch-arm64.inc
>>> index 6d5b22fff081..8c3764186ec4 100644
>>> --- a/meta/conf/machine/include/arm/arch-arm64.inc
>>> +++ b/meta/conf/machine/include/arm/arch-arm64.inc
>>> @@ -1,4 +1,5 @@
>>>  DEFAULTTUNE ?= "aarch64"
>>> +BASE_LIB ?= "lib64"
>>
>> Does this work?  The default multilib behavior is:
>>
>> multilib.conf:baselib = "${@d.getVar('BASE_LIB_tune-' + 
>> (d.getVar('DEFAULTTUNE')
>> or 'INVALID')) or d.getVar('BASELIB')}"
>>
>> bitbake.conf:baselib = "${BASELIB}"
>> bitbake.conf:BASELIB = "lib"
>> bitbake.conf:BASELIB_powerpc64 = "lib64"
>> bitbake.conf:BASELIB_powerpc64le = "lib64"
>>
>> is what has been defined in the bitbake.conf file.
>>
>> Idea being in the 'normal' (not-multilib) case, 'baselib' (which what is 
>> used)
>> gets set to 'BASELIB'.  Only PowerPC 64 has a hard coded 'lib64'.  Every 
>> other
>> architecture is considered to be variable, unless defined in the tune.  (The 
>> two
>> PowerPC settings really should be in a PPC tune file.)
>>
>> So IF the multilib.conf is enabled, it's going to look for BASE_LIB_tune-
>> and then BASELIB, but it won't look at 'BASE_LIB'.
> 
> It depends on what "work" is defined as :)
> I did build, boot, and run testimage on it (with issue).  But I'm
> probably not hitting the multilib issue you are describing.  Honestly,
> I don't understand it and needed to spend more time than I did (based
> on your comments).  I like the removal of lines to simplify it, but I
> need to do some more reading on it.  I'll drop this patch and come
> back to the underlying problem at some point in the future.

(This is from memory, so it may not be right)

In your local.conf:

MULTILIBS = "multilib:lib32"
require conf/multilib.conf

DEFAULTTUNE_virtclass-multilib-lib32 = "armv7vethf"
MACHINE = "qemuarm64"

Then add something like "lib32-glibc" as a dependency to your image.

--Mark

> Thanks,
> Jon
> 
>>>  require conf/machine/include/arm/arch-armv7ve.inc
>>>
>>> @@ -14,8 +15,6 @@ TUNE_FEATURES_tune-aarch64 = "aarch64"
>>>  TUNE_FEATURES_tune-aarch64_be = "${TUNE_FEATURES_tune-aarch64} bigendian"
>>>  TUNE_PKGARCH_64_tune-aarch64 = "aarch64"
>>>  TUNE_PKGARCH_64_tune-aarch64_be = "aarch64_be"
>>> -BASE_LIB_tune-aarch64 = "lib64"
>>> -BASE_LIB_tune-aarch64_be = "lib64"
>>
>> This was originally done like this to enable multilib, as BASE_LIB needs to 
>> be
>> configured per multilib.  (I don't know if it's really necessary any longer.)
>>
>> Note the other 32/64 bit architecture are still implemented like this.
>>
>> There was also talk at the time of different lib dirs for little and big 
>> endian,
>> but I never saw that actually happen.
>>
>> We also wanted a way to build optimized libraries, like some distributions, 
>> that
>> are optimized for specific tunings and place those into non-conflicting
>> directories.  But again, AFAIK nobody actually did it and I' not sure it
>> actually works.
>>
>> And for the record BASE_LIB is documented in the tune README as:
>>
>> BASE_LIB_tune- - The "/lib" location for a specific ABI.  This is
>> used in a multilib configuration to place the libraries in the correct,
>> non-conflicting locations.
>>
>>>  PACKAGE_EXTRA_ARCHS_tune-aarch64 = "aarch64"
>>>  PACKAGE_EXTRA_ARCHS_tune-aarch64_be = "aarch64_be"
>>> diff --git a/meta/conf/machine/include/arm/arch-armv8-2a.inc 
>>> b/meta/conf/machine/include/arm/arch-armv8-2a.inc
>>> index 1c095256d185..b40ebf176e43 100644
>>> --- a/meta/conf/machine/include/arm/arch-armv8-2a.inc
>>> +++ b/meta/conf/machine/include/arm/arch-armv8-2a.inc
>>> @@ -15,5 +15,3 @@ TUNE_FEATURES_tune-armv8-2a  = "aarch64 
>>> armv8-2a"
>>>  TUNE_FEATURES_tune-armv8-2a-crypto   = 
>>> "${TUNE_FEATURES_tune-arm

Re: [OE-core] [meta-oe][RFC 1/6] arm64: set BASE_LIB to lib64

2020-09-09 Thread Jon Mason
On Wed, Sep 9, 2020 at 6:55 PM Mark Hatle
 wrote:
>
>
>
> On 9/9/20 5:45 PM, Jon Mason wrote:
> > Set BASE_LIB for all arm64 systems to be lib64 by default.  This can be
> > overridden for those that want something else (see tune-cortexa32.inc).
> >
> > Signed-off-by: Jon Mason 
> > ---
> >  meta/conf/machine/include/arm/arch-arm64.inc   | 3 +--
> >  meta/conf/machine/include/arm/arch-armv8-2a.inc| 2 --
> >  meta/conf/machine/include/arm/arch-armv8a.inc  | 4 
> >  meta/conf/machine/include/tune-cortexa32.inc   | 1 +
> >  meta/conf/machine/include/tune-cortexa35.inc   | 2 --
> >  meta/conf/machine/include/tune-cortexa53.inc   | 2 --
> >  meta/conf/machine/include/tune-cortexa55.inc   | 1 -
> >  meta/conf/machine/include/tune-cortexa57-cortexa53.inc | 1 -
> >  meta/conf/machine/include/tune-cortexa57.inc   | 2 --
> >  meta/conf/machine/include/tune-cortexa72-cortexa53.inc | 2 --
> >  meta/conf/machine/include/tune-cortexa72.inc   | 1 -
> >  meta/conf/machine/include/tune-cortexa73-cortexa53.inc | 2 --
> >  12 files changed, 2 insertions(+), 21 deletions(-)
> >
> > diff --git a/meta/conf/machine/include/arm/arch-arm64.inc 
> > b/meta/conf/machine/include/arm/arch-arm64.inc
> > index 6d5b22fff081..8c3764186ec4 100644
> > --- a/meta/conf/machine/include/arm/arch-arm64.inc
> > +++ b/meta/conf/machine/include/arm/arch-arm64.inc
> > @@ -1,4 +1,5 @@
> >  DEFAULTTUNE ?= "aarch64"
> > +BASE_LIB ?= "lib64"
>
> Does this work?  The default multilib behavior is:
>
> multilib.conf:baselib = "${@d.getVar('BASE_LIB_tune-' + 
> (d.getVar('DEFAULTTUNE')
> or 'INVALID')) or d.getVar('BASELIB')}"
>
> bitbake.conf:baselib = "${BASELIB}"
> bitbake.conf:BASELIB = "lib"
> bitbake.conf:BASELIB_powerpc64 = "lib64"
> bitbake.conf:BASELIB_powerpc64le = "lib64"
>
> is what has been defined in the bitbake.conf file.
>
> Idea being in the 'normal' (not-multilib) case, 'baselib' (which what is used)
> gets set to 'BASELIB'.  Only PowerPC 64 has a hard coded 'lib64'.  Every other
> architecture is considered to be variable, unless defined in the tune.  (The 
> two
> PowerPC settings really should be in a PPC tune file.)
>
> So IF the multilib.conf is enabled, it's going to look for BASE_LIB_tune-
> and then BASELIB, but it won't look at 'BASE_LIB'.

It depends on what "work" is defined as :)
I did build, boot, and run testimage on it (with issue).  But I'm
probably not hitting the multilib issue you are describing.  Honestly,
I don't understand it and needed to spend more time than I did (based
on your comments).  I like the removal of lines to simplify it, but I
need to do some more reading on it.  I'll drop this patch and come
back to the underlying problem at some point in the future.

Thanks,
Jon

> >  require conf/machine/include/arm/arch-armv7ve.inc
> >
> > @@ -14,8 +15,6 @@ TUNE_FEATURES_tune-aarch64 = "aarch64"
> >  TUNE_FEATURES_tune-aarch64_be = "${TUNE_FEATURES_tune-aarch64} bigendian"
> >  TUNE_PKGARCH_64_tune-aarch64 = "aarch64"
> >  TUNE_PKGARCH_64_tune-aarch64_be = "aarch64_be"
> > -BASE_LIB_tune-aarch64 = "lib64"
> > -BASE_LIB_tune-aarch64_be = "lib64"
>
> This was originally done like this to enable multilib, as BASE_LIB needs to be
> configured per multilib.  (I don't know if it's really necessary any longer.)
>
> Note the other 32/64 bit architecture are still implemented like this.
>
> There was also talk at the time of different lib dirs for little and big 
> endian,
> but I never saw that actually happen.
>
> We also wanted a way to build optimized libraries, like some distributions, 
> that
> are optimized for specific tunings and place those into non-conflicting
> directories.  But again, AFAIK nobody actually did it and I' not sure it
> actually works.
>
> And for the record BASE_LIB is documented in the tune README as:
>
> BASE_LIB_tune- - The "/lib" location for a specific ABI.  This is
> used in a multilib configuration to place the libraries in the correct,
> non-conflicting locations.
>
> >  PACKAGE_EXTRA_ARCHS_tune-aarch64 = "aarch64"
> >  PACKAGE_EXTRA_ARCHS_tune-aarch64_be = "aarch64_be"
> > diff --git a/meta/conf/machine/include/arm/arch-armv8-2a.inc 
> > b/meta/conf/machine/include/arm/arch-armv8-2a.inc
> > index 1c095256d185..b40ebf176e43 100644
> > --- a/meta/conf/machine/include/arm/arch-armv8-2a.inc
> > +++ b/meta/conf/machine/include/arm/arch-armv8-2a.inc
> > @@ -15,5 +15,3 @@ TUNE_FEATURES_tune-armv8-2a  = "aarch64 
> > armv8-2a"
> >  TUNE_FEATURES_tune-armv8-2a-crypto   = 
> > "${TUNE_FEATURES_tune-armv8-2a} crypto"
> >  PACKAGE_EXTRA_ARCHS_tune-armv8-2a= 
> > "${PACKAGE_EXTRA_ARCHS_tune-armv8a} armv8-2a"
> >  PACKAGE_EXTRA_ARCHS_tune-armv8-2a-crypto = 
> > "${PACKAGE_EXTRA_ARCHS_tune-armv8-2a} armv8-2a-crypto"
> > -BASE_LIB_tune-armv8-2a   = "lib64"
> > -BASE_LIB_tune-armv8-2a-crypto= "lib64"
> > diff --git a/meta/conf/machine/include/arm/arch-

Re: [OE-core] [meta-oe][RFC 1/6] arm64: set BASE_LIB to lib64

2020-09-09 Thread Mark Hatle


On 9/9/20 5:45 PM, Jon Mason wrote:
> Set BASE_LIB for all arm64 systems to be lib64 by default.  This can be
> overridden for those that want something else (see tune-cortexa32.inc).
> 
> Signed-off-by: Jon Mason 
> ---
>  meta/conf/machine/include/arm/arch-arm64.inc   | 3 +--
>  meta/conf/machine/include/arm/arch-armv8-2a.inc| 2 --
>  meta/conf/machine/include/arm/arch-armv8a.inc  | 4 
>  meta/conf/machine/include/tune-cortexa32.inc   | 1 +
>  meta/conf/machine/include/tune-cortexa35.inc   | 2 --
>  meta/conf/machine/include/tune-cortexa53.inc   | 2 --
>  meta/conf/machine/include/tune-cortexa55.inc   | 1 -
>  meta/conf/machine/include/tune-cortexa57-cortexa53.inc | 1 -
>  meta/conf/machine/include/tune-cortexa57.inc   | 2 --
>  meta/conf/machine/include/tune-cortexa72-cortexa53.inc | 2 --
>  meta/conf/machine/include/tune-cortexa72.inc   | 1 -
>  meta/conf/machine/include/tune-cortexa73-cortexa53.inc | 2 --
>  12 files changed, 2 insertions(+), 21 deletions(-)
> 
> diff --git a/meta/conf/machine/include/arm/arch-arm64.inc 
> b/meta/conf/machine/include/arm/arch-arm64.inc
> index 6d5b22fff081..8c3764186ec4 100644
> --- a/meta/conf/machine/include/arm/arch-arm64.inc
> +++ b/meta/conf/machine/include/arm/arch-arm64.inc
> @@ -1,4 +1,5 @@
>  DEFAULTTUNE ?= "aarch64"
> +BASE_LIB ?= "lib64"

Does this work?  The default multilib behavior is:

multilib.conf:baselib = "${@d.getVar('BASE_LIB_tune-' + (d.getVar('DEFAULTTUNE')
or 'INVALID')) or d.getVar('BASELIB')}"

bitbake.conf:baselib = "${BASELIB}"
bitbake.conf:BASELIB = "lib"
bitbake.conf:BASELIB_powerpc64 = "lib64"
bitbake.conf:BASELIB_powerpc64le = "lib64"

is what has been defined in the bitbake.conf file.

Idea being in the 'normal' (not-multilib) case, 'baselib' (which what is used)
gets set to 'BASELIB'.  Only PowerPC 64 has a hard coded 'lib64'.  Every other
architecture is considered to be variable, unless defined in the tune.  (The two
PowerPC settings really should be in a PPC tune file.)

So IF the multilib.conf is enabled, it's going to look for BASE_LIB_tune-
and then BASELIB, but it won't look at 'BASE_LIB'.

>  require conf/machine/include/arm/arch-armv7ve.inc
>  
> @@ -14,8 +15,6 @@ TUNE_FEATURES_tune-aarch64 = "aarch64"
>  TUNE_FEATURES_tune-aarch64_be = "${TUNE_FEATURES_tune-aarch64} bigendian"
>  TUNE_PKGARCH_64_tune-aarch64 = "aarch64"
>  TUNE_PKGARCH_64_tune-aarch64_be = "aarch64_be"
> -BASE_LIB_tune-aarch64 = "lib64"
> -BASE_LIB_tune-aarch64_be = "lib64"

This was originally done like this to enable multilib, as BASE_LIB needs to be
configured per multilib.  (I don't know if it's really necessary any longer.)

Note the other 32/64 bit architecture are still implemented like this.

There was also talk at the time of different lib dirs for little and big endian,
but I never saw that actually happen.

We also wanted a way to build optimized libraries, like some distributions, that
are optimized for specific tunings and place those into non-conflicting
directories.  But again, AFAIK nobody actually did it and I' not sure it
actually works.

And for the record BASE_LIB is documented in the tune README as:

BASE_LIB_tune- - The "/lib" location for a specific ABI.  This is
used in a multilib configuration to place the libraries in the correct,
non-conflicting locations.

>  PACKAGE_EXTRA_ARCHS_tune-aarch64 = "aarch64"
>  PACKAGE_EXTRA_ARCHS_tune-aarch64_be = "aarch64_be"
> diff --git a/meta/conf/machine/include/arm/arch-armv8-2a.inc 
> b/meta/conf/machine/include/arm/arch-armv8-2a.inc
> index 1c095256d185..b40ebf176e43 100644
> --- a/meta/conf/machine/include/arm/arch-armv8-2a.inc
> +++ b/meta/conf/machine/include/arm/arch-armv8-2a.inc
> @@ -15,5 +15,3 @@ TUNE_FEATURES_tune-armv8-2a  = "aarch64 
> armv8-2a"
>  TUNE_FEATURES_tune-armv8-2a-crypto   = 
> "${TUNE_FEATURES_tune-armv8-2a} crypto"
>  PACKAGE_EXTRA_ARCHS_tune-armv8-2a= 
> "${PACKAGE_EXTRA_ARCHS_tune-armv8a} armv8-2a"
>  PACKAGE_EXTRA_ARCHS_tune-armv8-2a-crypto = 
> "${PACKAGE_EXTRA_ARCHS_tune-armv8-2a} armv8-2a-crypto"
> -BASE_LIB_tune-armv8-2a   = "lib64"
> -BASE_LIB_tune-armv8-2a-crypto= "lib64"
> diff --git a/meta/conf/machine/include/arm/arch-armv8a.inc 
> b/meta/conf/machine/include/arm/arch-armv8a.inc
> index f810a1e8fc98..5584005f7009 100644
> --- a/meta/conf/machine/include/arm/arch-armv8a.inc
> +++ b/meta/conf/machine/include/arm/arch-armv8a.inc
> @@ -24,7 +24,3 @@ PACKAGE_EXTRA_ARCHS_tune-armv8a= "aarch64 
> armv8a"
>  PACKAGE_EXTRA_ARCHS_tune-armv8a-crc= 
> "${PACKAGE_EXTRA_ARCHS_tune-armv8a} armv8a-crc"
>  PACKAGE_EXTRA_ARCHS_tune-armv8a-crypto = 
> "${PACKAGE_EXTRA_ARCHS_tune-armv8a} armv8a-crypto"
>  PACKAGE_EXTRA_ARCHS_tune-armv8a-crc-crypto = 
> "${PACKAGE_EXTRA_ARCHS_tune-armv8a-crc} armv8a-crypto armv8a-crc-crypto"
> -BASE_LIB_tune-armv8a   = "lib64"
> -BASE_LIB_tune-arm

[OE-core] [meta-oe][RFC 1/6] arm64: set BASE_LIB to lib64

2020-09-09 Thread Jon Mason
Set BASE_LIB for all arm64 systems to be lib64 by default.  This can be
overridden for those that want something else (see tune-cortexa32.inc).

Signed-off-by: Jon Mason 
---
 meta/conf/machine/include/arm/arch-arm64.inc   | 3 +--
 meta/conf/machine/include/arm/arch-armv8-2a.inc| 2 --
 meta/conf/machine/include/arm/arch-armv8a.inc  | 4 
 meta/conf/machine/include/tune-cortexa32.inc   | 1 +
 meta/conf/machine/include/tune-cortexa35.inc   | 2 --
 meta/conf/machine/include/tune-cortexa53.inc   | 2 --
 meta/conf/machine/include/tune-cortexa55.inc   | 1 -
 meta/conf/machine/include/tune-cortexa57-cortexa53.inc | 1 -
 meta/conf/machine/include/tune-cortexa57.inc   | 2 --
 meta/conf/machine/include/tune-cortexa72-cortexa53.inc | 2 --
 meta/conf/machine/include/tune-cortexa72.inc   | 1 -
 meta/conf/machine/include/tune-cortexa73-cortexa53.inc | 2 --
 12 files changed, 2 insertions(+), 21 deletions(-)

diff --git a/meta/conf/machine/include/arm/arch-arm64.inc 
b/meta/conf/machine/include/arm/arch-arm64.inc
index 6d5b22fff081..8c3764186ec4 100644
--- a/meta/conf/machine/include/arm/arch-arm64.inc
+++ b/meta/conf/machine/include/arm/arch-arm64.inc
@@ -1,4 +1,5 @@
 DEFAULTTUNE ?= "aarch64"
+BASE_LIB ?= "lib64"
 
 require conf/machine/include/arm/arch-armv7ve.inc
 
@@ -14,8 +15,6 @@ TUNE_FEATURES_tune-aarch64 = "aarch64"
 TUNE_FEATURES_tune-aarch64_be = "${TUNE_FEATURES_tune-aarch64} bigendian"
 TUNE_PKGARCH_64_tune-aarch64 = "aarch64"
 TUNE_PKGARCH_64_tune-aarch64_be = "aarch64_be"
-BASE_LIB_tune-aarch64 = "lib64"
-BASE_LIB_tune-aarch64_be = "lib64"
 
 PACKAGE_EXTRA_ARCHS_tune-aarch64 = "aarch64"
 PACKAGE_EXTRA_ARCHS_tune-aarch64_be = "aarch64_be"
diff --git a/meta/conf/machine/include/arm/arch-armv8-2a.inc 
b/meta/conf/machine/include/arm/arch-armv8-2a.inc
index 1c095256d185..b40ebf176e43 100644
--- a/meta/conf/machine/include/arm/arch-armv8-2a.inc
+++ b/meta/conf/machine/include/arm/arch-armv8-2a.inc
@@ -15,5 +15,3 @@ TUNE_FEATURES_tune-armv8-2a  = "aarch64 
armv8-2a"
 TUNE_FEATURES_tune-armv8-2a-crypto   = "${TUNE_FEATURES_tune-armv8-2a} 
crypto"
 PACKAGE_EXTRA_ARCHS_tune-armv8-2a= 
"${PACKAGE_EXTRA_ARCHS_tune-armv8a} armv8-2a"
 PACKAGE_EXTRA_ARCHS_tune-armv8-2a-crypto = 
"${PACKAGE_EXTRA_ARCHS_tune-armv8-2a} armv8-2a-crypto"
-BASE_LIB_tune-armv8-2a   = "lib64"
-BASE_LIB_tune-armv8-2a-crypto= "lib64"
diff --git a/meta/conf/machine/include/arm/arch-armv8a.inc 
b/meta/conf/machine/include/arm/arch-armv8a.inc
index f810a1e8fc98..5584005f7009 100644
--- a/meta/conf/machine/include/arm/arch-armv8a.inc
+++ b/meta/conf/machine/include/arm/arch-armv8a.inc
@@ -24,7 +24,3 @@ PACKAGE_EXTRA_ARCHS_tune-armv8a= "aarch64 armv8a"
 PACKAGE_EXTRA_ARCHS_tune-armv8a-crc= 
"${PACKAGE_EXTRA_ARCHS_tune-armv8a} armv8a-crc"
 PACKAGE_EXTRA_ARCHS_tune-armv8a-crypto = 
"${PACKAGE_EXTRA_ARCHS_tune-armv8a} armv8a-crypto"
 PACKAGE_EXTRA_ARCHS_tune-armv8a-crc-crypto = 
"${PACKAGE_EXTRA_ARCHS_tune-armv8a-crc} armv8a-crypto armv8a-crc-crypto"
-BASE_LIB_tune-armv8a   = "lib64"
-BASE_LIB_tune-armv8a-crc   = "lib64"
-BASE_LIB_tune-armv8a-crypto= "lib64"
-BASE_LIB_tune-armv8a-crc-crypto= "lib64"
diff --git a/meta/conf/machine/include/tune-cortexa32.inc 
b/meta/conf/machine/include/tune-cortexa32.inc
index 0ffb3e068855..78dab8bed6e1 100644
--- a/meta/conf/machine/include/tune-cortexa32.inc
+++ b/meta/conf/machine/include/tune-cortexa32.inc
@@ -14,5 +14,6 @@ TUNE_FEATURES_tune-cortexa32  = "armv8a cortexa32 crc"
 TUNE_FEATURES_tune-cortexa32-crypto   = "${TUNE_FEATURES_tune-cortexa32} 
crypto"
 PACKAGE_EXTRA_ARCHS_tune-cortexa32 = 
"${PACKAGE_EXTRA_ARCHS_tune-armv8a-crc} cortexa32"
 PACKAGE_EXTRA_ARCHS_tune-cortexa32-crypto  = 
"${PACKAGE_EXTRA_ARCHS_tune-armv8a-crc-crypto} cortexa32 cortexa32-crypto"
+# Cortex-A32 is 32bit only
 BASE_LIB_tune-cortexa32   = "lib"
 BASE_LIB_tune-cortexa32-crypto= "lib"
diff --git a/meta/conf/machine/include/tune-cortexa35.inc 
b/meta/conf/machine/include/tune-cortexa35.inc
index 61696da540cc..80825972b612 100644
--- a/meta/conf/machine/include/tune-cortexa35.inc
+++ b/meta/conf/machine/include/tune-cortexa35.inc
@@ -13,5 +13,3 @@ TUNE_FEATURES_tune-cortexa35  = "aarch64 cortexa35 
crc"
 TUNE_FEATURES_tune-cortexa35-crypto   = "${TUNE_FEATURES_tune-cortexa35} 
crypto"
 PACKAGE_EXTRA_ARCHS_tune-cortexa35 = 
"${PACKAGE_EXTRA_ARCHS_tune-armv8a-crc} cortexa35"
 PACKAGE_EXTRA_ARCHS_tune-cortexa35-crypto  = 
"${PACKAGE_EXTRA_ARCHS_tune-armv8a-crc-crypto} cortexa35 cortexa35-crypto"
-BASE_LIB_tune-cortexa35   = "lib64"
-BASE_LIB_tune-cortexa35-crypto= "lib64"
diff --git a/meta/conf/machine/include/tune-cortexa53.inc 
b/meta/conf/machine/include/tune-cortexa53.inc
index 79ce7c4b1c21..385c2d225777 100644
--- a