Fix compilation failure on MacOS X 10.9 (and likely other very old platforms)#1945
Fix compilation failure on MacOS X 10.9 (and likely other very old platforms)#1945jkbonfield merged 3 commits intosamtools:developfrom
Conversation
Disable ref-cache if fstatat() doesn't work. Allows builds of the rest of HTSlib to complete if this interface is not available. This mainly affects fairly old systems, notable MacOS X 10.9, which is still supported by MacPorts.
|
Moving the Instead of the second commit, IMHO it would be better to also probe in configure for presence of the header file and conditionalise |
Add checks for `x86intrin.h` for both configure and make-only builds, and use it to gate x86intrin.h inclusion. Update `simd.c` to use it in preference to `immintrin.h`. While the latter is the one preferred by Intel, and possibly more portable than `x86intrin.h` (which was introduced by gcc and clang), htscodecs consistently uses `x86intrin.h` so it's easier to standardise on that one. The intel compiler now supports both, so the portability issue is less of a problem than it used to be.
Prevents failures on older compilers that don't have this builtin, or don't support using it to test for ssse3.
d801d6f to
21d57a4
Compare
|
I've pushed an improved version of this with, as suggested, configure checks for the intrinsics header. The file used has changed from I've also added a check for |
|
On an old clang 3.7 (2017ish era?) it has SSE4.1 support (albeit mislabeled as So this machine doesn't understand SSSE3, but does understand SSE4. The Makefile (non-configure mode) states: So this builds a config.h that claims to have SSSE3 despite hts-probe claiming it doesn't. |
|
Discussing this in the office, I now see my interpretation of what Besides, it's an old compiler and it's fair enough to ask someone to use autoconf if they want whacky or outdated build environments. |
Adds a configure check for
fstatat( , , , AT_SYMLINK_NOFOLLOW)so that theref-cachecan be disabled automatically on platforms that lack this interface. Also adjusts the position of theBUILDING_SIMD_NIBBLE2BASEguard insimd.cso that it doesn't try to includeimmintrin.hwhen the code that uses it is not going to be built.Fixes #1941