• Shdwdrgn@mander.xyz
    link
    fedilink
    English
    arrow-up
    1
    ·
    9 months ago

    Is it really that hard to include a fallback though? Obviously there’s a way to collect the information without that flag. I suppose if you didn’t want to take a performance hitting checking the flag all the time it could become a compile option (I would think anyone running that old of hardware would be willing to learn how to compile the kernel anyway), but there should be options available to keep the support available some how?

    • Max-P@lemmy.max-p.me
      link
      fedilink
      English
      arrow-up
      2
      ·
      9 months ago

      That’s pretty much exactly how it works already. You compile with -march=x86-64-v4 and it’ll use SSE and AVX all over the place.

      glibc does the runtime thing, but only once on application startup where the dynamic linker will link the version of the function optimized for your CPU. But it’s a manual process on glibc’s part, the variants are written by hand.

      Not every project cares enough to do it dynamically like that and it would be a nightmare that way.

      The fallback is, recompile with -march=x86-64 which will only use the base set of instructions. Or -march=i486 if you want to run on absolutely ancient hardware.