Initialize oldgcc,no_avx2 and add the rv64gv check

This commit is contained in:
Martin Kroeker 2022-05-12 13:23:24 +02:00 committed by Owen Rafferty
parent bd3214fddf
commit d5e9de115d
No known key found for this signature in database
GPG Key ID: A68B10E2554DEBCB
1 changed files with 19 additions and 0 deletions

19
c_check
View File

@ -222,6 +222,23 @@ if [ "$architecture" = "x86" ] || [ "$architecture" = "x86_64" ]; then
rm -rf "$tmpd" rm -rf "$tmpd"
fi fi
no_rv64gv= 0;
if [ "$architecture" = "riscv64" ]; then
tmpd=`mktemp -d`
tmpf="$tmpd/a.c
code = '"vsetvli zero, zero, e8, m1\n"'
printf "int main(void){ __asm__ volatile(%s); }\n" "$code" >> "$tmpf"
args = " -march=rv64gv -c -o $tmpf.o $tmpf"
no_rv64gv=0
{
$compiler_name $flags $args >/dev/null 2>&1
} || {
no_rv64gv=1
}
rm -rf "$tmpd"
fi
c11_atomics=0 c11_atomics=0
case "$data" in case "$data" in
*HAVE_C11*) *HAVE_C11*)
@ -240,6 +257,8 @@ case "$data" in
;; ;;
esac esac
oldgcc=0
no_avx2=0
if [ "$compiler" = "GCC" ]; then if [ "$compiler" = "GCC" ]; then
case "$architecture" in x86|x86_64) case "$architecture" in x86|x86_64)
no_avx2=0 no_avx2=0