Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Make-based cpu feature tests and language #741
At this time we seem to have been running between the cracks. It seems we have been using English testers and modern Linux systems that have all the feature support. I think we need to fix the gap before it becomes a widespread problem.
We have several choices:
All of the choices are pretty shitty except (4) and (5). Item (4) may be a good choice as it proves the toolchain can consume the options and produce an artifact like
Item (5) may be a good choice long as we stay warning-free, which is what we do anyways. For example, here is the SSE2 test under normal conditions. Notice there are no messages, and we can deduce the option was accepted:
And here's what happens when the compiler cannot handle an option. Notice the presence of output when things go sideways.
We may be able to combine options (4) and (5).
The caveat I am aware for option (5) is, some OS X compilers generate a warning stating
We'll keep this report open to solicit ideas and gather feedback.
referenced this issue
Nov 18, 2018
We started testing Method (5), "clean compile as the gate", at Commit 1ac7207545f3 . 1ac7207 is limited to PowerPC at the moment. PowerPC is not all that limited. For us, it covers (1) AIX, Linux and OS X operating systems; (2) Apple, Clang, IBM, and GCC compilers; and (3) Altivec, POWER4, POWER7, POWER8 and POWER9. It gets a lot of exercise.
Method (5) is testing better than the English-language only version we are using from Master because there are no language dependencies. Method (5) outperforms the past version that relied on toolchain versions.
The new feature test version is also very robust. It only accepts clean compiles, and it always rejects problems. It does not matter what combinations of toolchain and hardware we try to use. And it requires less work that the current version in Master because
I've seen this before on Power7/Power8 but I don't have a fix for it. The problem is this...
The compiler will optimize things a bit and a POWER7 instruction will percolate up into
The only workaround I know of is to manually add
added a commit
Nov 21, 2018
Could you perhaps put it on a separate branch for now? I'd like to pull that branch and try it on MacOS and a couple of Linux systems.
Also, I'd like you to take a look at GNUmakefile in my fork: I found it necessary for Macports GCC to add all the assembly flags, and disable the unavailable instructions via defines like -DCRYPTOPP_DISABLE_SSE2 and such. The current master was not detecting features properly for me.
Built git-master from today with the CXXFLAGS you suggested.
Now the tests error out at:
BLAKE2s validation suite running...
passed algorithm name
added a commit
Nov 28, 2018
We changed the Altivec flag to use only