On Mon, Oct 9, 2017 at 5:49 PM, Khem Raj <[email protected]> wrote: > On Mon, Oct 9, 2017 at 9:16 AM, Paul Barker <[email protected]> wrote: >> On Mon, Oct 9, 2017 at 5:04 PM, Khem Raj <[email protected]> wrote: >>> On Mon, Oct 9, 2017 at 6:15 AM, Paul Barker <[email protected]> wrote: >>>> >>>> I'm looking at what I can use to determine if sse2 is supported for a >>>> given machine/tune. >>>> >>>> In TUNE_FEATURES I could check for "core2" or "corei7" based on what's >>>> in oe-core, but not sure this will cover tunings which might be >>>> defined in other layers. >>>> >>>> Alternatively I could check TUNE_CCARGS for "-msse2" or later but that >>>> feels dirty. >>>> >>>> Any suggestions on this? >>>> >>> >>> For cross compile there is no easy way, I would think using a map is >>> probably the >>> best thing we can do, >> >> This is my intention, just trying to work out what I can map from. >> What I'm currently thinking is, in rough pseudocode: >> >> go_map_386(): >> if "core2" or "corei7" in TUNE_FEATURES: >> return "sse2" >> else: >> return "387" >> > > Perhaps inverse is easier, meaning, set 387 for i586, i486 and i386 > and leave the > defaults as it is for other variants >
Sadly that won't cover it. We'd also need to cover Pentium variants pre-Pentium4 and early AMD variants. It's SSE2 which is needed not the original SSE instructions. Do the names in TUNE_FEATURES match those in https://gcc.gnu.org/onlinedocs/gcc-7.2.0/gcc/x86-Options.html#x86-Options? If so I might be able to build a rough map from that documentation. Cheers, -- Paul Barker Togán Labs Ltd -- _______________________________________________ Openembedded-core mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-core
