News for hackers. Stuff that matters.
Re:The cpu_features library by EKLM-ZK88 on Wednesday February 07, 2018 @04:18PM (#16328093)
The CPU you compile on will probably not be the CPU your program runs on. If you know what CPU you're running on I guess you can just make assumptions about what features that chip supports, but it's much safer to use something like this to verify at runtime that you support avx or whatever features you need.
Re:The cpu_features library by saagarjha on Wednesday February 07, 2018 @04:22PM (#16328120)
I was getting at cross-compilation, where you do know the CPU you're running on, but I see that this breaks down because the binaries can run on CPUs that support different features.