diff options
Diffstat (limited to 'libstdc++-v3/configure')
-rwxr-xr-x | libstdc++-v3/configure | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 9ea8042a1ca..d55a9efa0b1 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -70621,6 +70621,48 @@ $as_echo "#define _GLIBCXX_LONG_DOUBLE_COMPAT 1" >>confdefs.h esac +# Check if assembler supports rdrand opcode. + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rdrand support in assembler" >&5 +$as_echo_n "checking for rdrand support in assembler... " >&6; } + if { as_var=$ac_cv_x86_rdrand; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + + ac_cv_x86_rdrand=no + case "$target" in + i?86-*-* | \ + x86_64-*-*) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +asm("rdrand %eax"); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_x86_rdrand=yes +else + ac_cv_x86_rdrand=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + esac + +fi + + if test $ac_cv_x86_rdrand = yes; then + +$as_echo "#define _GLIBCXX_X86_RDRAND 1" >>confdefs.h + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x86_rdrand" >&5 +$as_echo "$ac_cv_x86_rdrand" >&6; } + + # This depends on GLIBCXX_ENABLE_SYMVERS and GLIBCXX_IS_NATIVE. if $GLIBCXX_IS_NATIVE ; then |