diff --git a/c_check b/c_check index 9801b8778..40db57470 100755 --- a/c_check +++ b/c_check @@ -335,7 +335,14 @@ if [ "$architecture" = "arm64" ]; then fi no_sme=0 +is_appleclang=0 if [ "$architecture" = "arm64" ]; then + if [ "$compiler" = "CLANG" ]; then + data=`$compiler_name --version` + case "$data" in Apple*) + is_appleclang=1 + esac + fi tmpd=$(mktemp -d 2>/dev/null || mktemp -d -t 'OBC') tmpf="$tmpd/a.S" printf ".text \n.global sme_test\n\nsme_test:\nsmstart\nsmstop\nret\n">> "$tmpf" @@ -469,6 +476,7 @@ done [ "$no_avx512bf" -eq 1 ] && printf "NO_AVX512BF16=1\n" [ "$no_avx2" -eq 1 ] && printf "NO_AVX2=1\n" [ "$oldgcc" -eq 1 ] && printf "OLDGCC=1\n" + [ "$is_appleclang" -eq 1 ] && printf "APPLECLANG=1\n" exit 0 } @@ -499,6 +507,7 @@ done [ "$no_avx512bf" -eq 1 ] && printf "NO_AVX512BF16=1\n" [ "$no_avx2" -eq 1 ] && printf "NO_AVX2=1\n" [ "$oldgcc" -eq 1 ] && printf "OLDGCC=1\n" + [ "$is_appleclang" -eq 1 ] && printf "APPLECLANG=1\n" [ "$no_lsx" -eq 1 ] && printf "NO_LSX=1\n" [ "$no_lasx" -eq 1 ] && printf "NO_LASX=1\n" } >> "$makefile"