s390x/DYNAMIC_ARCH: fixup broken merge and reapply simplification
authorMarius Hillenbrand <mhillen@linux.ibm.com>
Thu, 17 Sep 2020 14:45:07 +0000 (16:45 +0200)
committerMarius Hillenbrand <mhillen@linux.ibm.com>
Thu, 17 Sep 2020 15:09:03 +0000 (17:09 +0200)
commit75d440caa083a32ca3b30809f18f1e29c75a967b
tree80fbf662f28c007840263febe64d4d49499fdc36
parent4c10a1673dd351ce2e44f0203520d5a3818a10d9
s390x/DYNAMIC_ARCH: fixup broken merge and reapply simplification

An unrelated commit and merge inadvertently reverted our recent two
changes for simplifying DYNAMIC_ARCH on s390x. Simply reapply the
changes.

Simplify detection of which kernels we can compile on s390x. Instead of
decoding the gcc version in a complicated manner, just check if CC
supports a given -march=archXY flag. Together with the next patch, we
thereby gain support for builds with LLVM/clang with DYNAMIC_ARCH=1.

To enable builds with DYNAMIC_ARCH with older compiler releases, the
Makefile and drivers/other/dynamic_arch.c need a common view of the
architecture support built into the library.

We follow the notation from x86 when used with DYNAMIC_LIST, where
defines DYN_<ARCH NAME> denote support for a given generation to be
built in. Since there are far fewer architecture generations in OpenBLAS
for s390x, that does not bloat command lines too much.

Closes: #2842
Fixes: ba644378dce7 ("Copy BUILD_ options available to the compiler flags"

Signed-off-by: Marius Hillenbrand <mhillen@linux.ibm.com>
Makefile.system