s390/ibm/linuxone compatibility
Dragonfly does not build on s390.
First impressions:
- lua patch request - requires changes. line 79 - remove the error. line 83 - add "-march=native" before $(OPTFLAGS)
- configuring requires
-DMARCH_OPT="-march=native"support - sse instruction are not supported and
emmintrin.his not present. however__s390__,__s390x__,__zarch__are defined. therefore we can fallback on scalar code for this architecture. Requires changes in dashtable and bitpacking.cc
Thank you @romange for giving this a go.
I hope some of the info I'm sharing here will be useful: https://github.com/simd-everywhere/simde/commit/5b9b2af4ce3a9ab2d9dab5850d024eca2d5802dc https://github.com/simd-everywhere/simde/commit/fec505381cddc565067ce76979824de0f3e11d48 https://gcc.gnu.org/onlinedocs/gcc/S_002f390-and-zSeries-Options.html
In summary, -march=native and -mzvector seem important.
That's about as far as I understand 😛
Below 2 links are from docs of a newer Clang-based compiler toolchain for IBM Z (Open XL C/C++ for zOS): https://www.ibm.com/docs/en/open-xl-c-cpp-zos/1.1?topic=options-qvector https://www.ibm.com/docs/en/open-xl-c-cpp-zos/1.1?topic=support-options
Although s390x runs linux and not zOS, some of the info may be useful for reference.
EDIT: s390 refers to 32-bit arch (but 31-bit addressing), whereas s390x refers to the 64-bit arch 😄
https://en.wikipedia.org/wiki/31-bit_computing#Linux/390
Also, I hope this also helps for reference - https://src.fedoraproject.org/rpms/gcc/blob/rawhide/f/gcc.spec
... contains mentions of s390intrin.h, for when building with gcc.
Can't remember where I found that DF builds with gcc.
@romange, Can you assign this issue to me, please?
Done @iko1
May be off-topic, but out of curiosity, is anyone still using System/390 in production today?
Uh, yes @ThatOneCalculator. The question is like asking if anyone is using x86 today. Just like we're on whatever upgraded bunch of instruction set extensions in the x86 family today, S390 is where one such thing started. s390 refers to 32-bit arch, and s390x refers to 64-bit arch... and s390x arch usage is very much alive & kicking. I don't personally know the actual figures, but you can look up figures from IBM and have a pinch of salt next to ya :)
Ah, gotcha. Thanks for the clarification!