Do CPU features detection from 'constructor' function when compiled with gcc
There is attribute 'constructor' supported since gcc 2.7 which allows
to have a constructor function for library initialization. This eliminates
an extra branch for each composite operation and also helps to avoid
complains from race condition detection tools like helgrind.
The other compilers may or may not support this attribute properly.
Ideally, the compilers should fail to compile the code with unknown
attribute, so the configure check should do the right job. But in
reality the problems are surely possible. Fortunately such problems
should be quite easy to find because NULL pointer dereference should
happen almost immediately if the constructor fails to run.
clang 2.7:
supports __attribute__((constructor)) properly and pretends to be gcc
tcc 0.9.25:
ignores __attribute__((constructor)), but does not pretend to be gcc