diff options
author | Chih-Min Chao <chihmin.chao@sifive.com> | 2019-06-13 22:54:55 -0700 |
---|---|---|
committer | Chih-Min Chao <chihmin.chao@sifive.com> | 2019-06-14 00:44:24 -0700 |
commit | a52257ed25a5b5fbd4a6f70080a75fcf4fd3c0f1 (patch) | |
tree | 23352e35e2b4395dbd5cbd61f60a14a9664c3a0e /configure | |
parent | 68072a8c64486a7209dedbbb50ab6b9e50073751 (diff) | |
download | spike-a52257ed25a5b5fbd4a6f70080a75fcf4fd3c0f1.zip spike-a52257ed25a5b5fbd4a6f70080a75fcf4fd3c0f1.tar.gz spike-a52257ed25a5b5fbd4a6f70080a75fcf4fd3c0f1.tar.bz2 |
rvv: add __int128_t check to autoconf
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 66 |
1 files changed, 66 insertions, 0 deletions
@@ -1646,6 +1646,60 @@ $as_echo "$ac_res" >&6; } } # ac_fn_cxx_check_header_compile +# ac_fn_cxx_check_type LINENO TYPE VAR INCLUDES +# --------------------------------------------- +# Tests whether TYPE exists after having included INCLUDES, setting cache +# variable VAR accordingly. +ac_fn_cxx_check_type () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=no" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof ($2)) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof (($2))) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + +else + eval "$3=yes" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_cxx_check_type + # ac_fn_cxx_try_link LINENO # ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. @@ -4295,6 +4349,18 @@ fi #------------------------------------------------------------------------- +# Checks for type +#------------------------------------------------------------------------- + +ac_fn_cxx_check_type "$LINENO" "__int128_t" "ac_cv_type___int128_t" "$ac_includes_default" +if test "x$ac_cv_type___int128_t" = xyes; then : + +else + echo "error: spike requires 128 integer suuport"; exit 1 +fi + + +#------------------------------------------------------------------------- # Default compiler flags #------------------------------------------------------------------------- |