Index: configure =================================================================== --- configure (revision 198135) +++ configure (working copy) @@ -71877,10 +71877,11 @@ rm -f core conftest.err conftest.$ac_objext confte fi + + if test $ac_cv_x86_rdrand = yes; then + $as_echo "#define _GLIBCXX_X86_RDRAND 1" >>confdefs.h -$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; } Index: acinclude.m4 =================================================================== --- acinclude.m4 (revision 198135) +++ acinclude.m4 (working copy) @@ -3484,9 +3484,15 @@ AC_DEFUN([GLIBCXX_CHECK_X86_RDRAND], [ [ac_cv_x86_rdrand=yes], [ac_cv_x86_rdrand=no]) esac ]) + AH_VERBATIM([_GLIBCXX_X86_RDRAND,], + [/* Defined if as can handle rdrand. + Disable when building with Clang. Google ref b/8680429 */ +#ifndef __clang__ +#undef _GLIBCXX_X86_RDRAND +#endif]) + if test $ac_cv_x86_rdrand = yes; then - AC_DEFINE(_GLIBCXX_X86_RDRAND, 1, - [ Defined if as can handle rdrand. ]) + AC_DEFINE(_GLIBCXX_X86_RDRAND, 1) fi AC_MSG_RESULT($ac_cv_x86_rdrand) ]) Index: config.h.in =================================================================== --- config.h.in (revision 198135) +++ config.h.in (working copy) @@ -872,8 +872,11 @@ /* Define to 1 if a verbose library is built, or 0 otherwise. */ #undef _GLIBCXX_VERBOSE -/* Defined if as can handle rdrand. */ +/* Defined if as can handle rdrand. + Disable when building with Clang. Google ref b/8680429 */ +#ifndef __clang__ #undef _GLIBCXX_X86_RDRAND +#endif /* Define to 1 if mutex_timedlock is available. */ #undef _GTHREAD_USE_MUTEX_TIMEDLOCK