http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54419
--- Comment #34 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-09-05 12:40:49 UTC --- No, the #c24 and #c25 comments make no sense at all. In void f(void) { asm ("rdrand %eax"); } rdrand shouldn't be optimized out, at least not by gcc, asm in this case is implicitly volatile. AC_TRY_RUN is not desirable for many reasons, as has been said and you can read in the code, the runtime detection is done in libstdc++ code (ctor which uses cpuid), all configury should test is whether assembler is able to assemble rdrand. Furthermore, never patch configure, you need to patch configure.ac resp. configure.in instead.