<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">It's not caused by this change (not the previous one I believe), but today I've noticed that aarch64 tunes don't set TUNE_PKGARCH correctly.<div><br></div><div>e.g. with raspberrypi3-64 which since this commit:</div><div><a href="https://github.com/agherzan/meta-raspberrypi/commit/9cc89cb7341d633b6fc3a92b937b5560d26257a1">https://github.com/agherzan/meta-raspberrypi/commit/9cc89cb7341d633b6fc3a92b937b5560d26257a1</a><br></div><div>uses conf/machine/include/tune-cortexa53.inc I was expecting it to use cortexa53 specific TUNE_PKGARCH (and stop messing with other MACHINEs which are using aarch64 package feed).</div><div><br></div><div>There is indeed:</div><div>DEFAULTTUNE="cortexa53"<br></div><div>and mcpu=cortex-a53+crc in CC:</div><div><div>export CC="aarch64-webos-linux-gcc -mcpu=cortex-a53+crc --sysroot=/OE/build/luneos-warrior/webos-ports/tmp-glibc/work/aarch64-webos-linux/zlib/1.2.11-r0/recipe-sysroot"</div></div><div><br></div><div>But</div><div>ARMPKGARCH="cortexa53"<br></div><div><div><br></div><div># $TUNE_PKGARCH_32</div><div># set /OE/build/luneos-warrior/webos-ports/openembedded-core/meta/conf/machine/include/arm/arch-arm64.inc:29</div><div># "${ARMPKGARCH}${ARMPKGSFX_THUMB}${ARMPKGSFX_DSP}${ARMPKGSFX_EABI}${ARMPKGSFX_ENDIAN}${ARMPKGSFX_FPU}"</div><div>TUNE_PKGARCH_32="cortexa53"</div><div>#</div><div># $TUNE_PKGARCH_64</div><div># set /OE/build/luneos-warrior/webos-ports/openembedded-core/meta/conf/machine/include/arm/arch-arm64.inc:23</div><div># "aarch64${ARMPKGSFX_ENDIAN_64}"</div><div>TUNE_PKGARCH_64="aarch64"</div></div><div><br></div><div><div># "${@bb.utils.contains('TUNE_FEATURES', 'aarch64', '${TUNE_PKGARCH_64}', '${TUNE_PKGARCH_32}' ,d)}"</div><div>TUNE_PKGARCH="aarch64"</div></div><div><br></div><div>so the packages built with -mcpu=cortex-a53+crc (and rpi overrides) end in the same TUNE_PKGARCH as other MACHINEs which include e.g.</div><div>conf/machine/include/arm/arch-arm64.inc and DEFAULTTUNE="aarch64" which surprisingly uses aarch64 in both TUNE_PKGARCH_32/64:<br></div><div><br></div><div><div># "${@bb.utils.contains('TUNE_FEATURES', 'aarch64', '${TUNE_PKGARCH_64}', '${TUNE_PKGARCH_32}' ,d)}"</div><div>TUNE_PKGARCH="aarch64"</div><div>#</div><div># $TUNE_PKGARCH_32</div><div># set /OE/build/luneos-warrior/webos-ports/openembedded-core/meta/conf/machine/include/arm/arch-arm64.inc:29</div><div># "${ARMPKGARCH}${ARMPKGSFX_THUMB}${ARMPKGSFX_DSP}${ARMPKGSFX_EABI}${ARMPKGSFX_ENDIAN}${ARMPKGSFX_FPU}"</div><div>TUNE_PKGARCH_32="aarch64"</div><div>#</div><div># $TUNE_PKGARCH_64</div><div># set /OE/build/luneos-warrior/webos-ports/openembedded-core/meta/conf/machine/include/arm/arch-arm64.inc:23</div><div># "aarch64${ARMPKGSFX_ENDIAN_64}"</div><div>TUNE_PKGARCH_64="aarch64"</div></div><div><br></div><div>Looks like aarch64 are even bigger mess than arm tunes already :/.</div></div></div></div></div></div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 3, 2019 at 10:48 PM Andre McCurdy <<a href="mailto:armccurdy@gmail.com">armccurdy@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wed, Apr 3, 2019 at 1:24 PM Adrian Bunk <<a href="mailto:bunk@stusta.de" target="_blank">bunk@stusta.de</a>> wrote:<br>
> On Wed, Apr 03, 2019 at 12:29:29PM -0700, Andre McCurdy wrote:<br>
> > On Tue, Apr 2, 2019 at 11:23 PM Adrian Bunk <<a href="mailto:bunk@stusta.de" target="_blank">bunk@stusta.de</a>> wrote:<br>
> > > On Tue, Apr 02, 2019 at 09:26:46PM +0100, Richard Purdie wrote:<br>
> > > >...<br>
> > > > "armv4t" is defined in the arm tune files to mean "add -march=armv4t"<br>
> > > > which is the convention used throughout all the tune files.<br>
> > > >...<br>
> > ><br>
> > > Unfortunately this is not true.<br>
> > ><br>
> > > OE has both armv7a and armv7at tunes.<br>
> > ><br>
> > > There is no armv7a without Thumb support,<br>
> > > so no -march=armv7-at exists in gcc.<br>
> > ><br>
> > > Both armv7a and armv7at tunes pass the same march to gcc,<br>
> > > but [1] is not true:<br>
> > > Default to using the Thumb-2 instruction set for armv7a and above.<br>
> > ><br>
> > > The hardware supports Thumb-2 in any case, the actual difference between<br>
> > > the armv7a and armv7at OE tunes is whether OE tells the compiler to<br>
> > > generate ARM or Thumb-2 code.<br>
> > ><br>
> > > OE has both armv6 and armv6t tunes.<br>
> > ><br>
> > > There is no armv6 without Thumb support<br>
> > > so no -march=armv6t exists in gcc.<br>
> > ><br>
> > > Some v6 support only Thumb-1 and some v6 support also Thumb-2,<br>
> > > so what gcc does have is an -march=armv6t2.<br>
> > > But OE lacks tunes for that.<br>
> > ><br>
> > > For matching the gcc options it would be correct to remove all<br>
> > > armv6t and armv7at tunes that have no coresponding gcc options,<br>
> > > and add armv6t2 tunes.<br>
> ><br>
> > Aligning the tuning options exposed via the machine config files to<br>
> > those supported by gcc seems like a worthy goal... but would be a big<br>
> > upheaval at this point.<br>
> ><br>
> > Note that the problem isn't specific to ARM. There are similar issues<br>
> > for x86, but there we seem happy to provide a very minimal abstraction<br>
> > with no attempt to track gcc. e.g. "corei7" hasn't been a documented<br>
> > -march option since gcc 4.8 and we (somewhat arbitrarily) map it to<br>
> > -march=nehalem to hide that fact from end users.<br>
> ><br>
> > So the high level question seems to be: should DEFAULTTUNE even<br>
> > attempt to provide a full featured mapping to the options provided by<br>
> > gcc? Are we happy to expose a limited subset without a 1:1 mapping for<br>
> > the options we do expose (current ARM approach) or is it better for<br>
> > DEFAULTTUNE to hide away all the complexity of the options provided by<br>
> > gcc (current x86 approach).<br>
><br>
> The current 32bit ARM[1] approach seems to be an attempt<br>
> of a 1:1 mapping.<br>
><br>
> For ARMv8 it is already obvious that DEFAULTTUNE is not long-term<br>
> maintainable, and duplicating all the gcc rules regarding feature<br>
> flags[2] also sounds like a pointless exercise.<br>
><br>
> What are actually the benefits of DEFAULTTUNE with all the tune files,<br>
> compared to just let the user provide a string that is passed to -march?<br>
<br>
Restricting the user to a certain set of DEFAULTTUNE options means<br>
there will always be a valid mapping from DEFAULTTUNE to<br>
PACKAGE_EXTRA_ARCHS.<br>
<br>
If we let the user pass an arbitrary string to -march then we lose the<br>
ability to determine that (for example) it's safe for a<br>
"armv7athf-vfpv3" machine to pull from a "armv7athf-vfpv3d16" package<br>
feed.<br>
<br>
Whether or not anyone in the real world actually maintains a generic<br>
package feed and pulls from it from multiple machine specific builds<br>
(verses setting up separate package feeds for each DEFAULTTUNE they<br>
care about) would be an interesting question...<br>
<br>
> cu<br>
> Adrian<br>
><br>
> [1] ARM <= v7, not the differing 32bit ABI of ARMv8<br>
> [2] example:<br>
> 'fp16fml'<br>
> Enable FP16 fmla extension. This also enables FP16 extensions and<br>
> floating-point instructions. This option is enabled by default for<br>
> '-march=armv8.4-a'. Use of this option with architectures prior to<br>
> Armv8.2-A is not supported.<br>
><br>
><br>
> --<br>
><br>
> "Is there not promise of rain?" Ling Tan asked suddenly out<br>
> of the darkness. There had been need of rain for many days.<br>
> "Only a promise," Lao Er said.<br>
> Pearl S. Buck - Dragon Seed<br>
><br>
-- <br>
_______________________________________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org" target="_blank">Openembedded-core@lists.openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
</blockquote></div>