This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug bootstrap/54419] [4.8 Regression] Compiling libstdc++-v3/src/c++11/random.cc fails on platforms not knowing rdrand
- From: "howarth at nitro dot med.uc.edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 04 Sep 2012 14:17:52 +0000
- Subject: [Bug bootstrap/54419] [4.8 Regression] Compiling libstdc++-v3/src/c++11/random.cc fails on platforms not knowing rdrand
- Auto-submitted: auto-generated
- References: <bug-54419-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54419
--- Comment #22 from Jack Howarth <howarth at nitro dot med.uc.edu> 2012-09-04 14:17:52 UTC ---
It seems that when clang is used as the system compiler we will have to use a
run-time test as well to determine drand support. On a 2009 Mac Pro, using...
int
main ()
{
asm("rdrand %eax");
return 0;
}
with Xcode 4.4.1's clang I get...
# clang test.c
#
# ./a.out
Illegal instruction
only by disabling clang's built-in assembler does the test fail at compile
time...
# clang -no-integrated-as test.c
/tmp/test-s3jHNR.s:15:no such instruction: `rdrand %eax'
clang: error: assembler command failed with exit code 1 (use -v to see
invocation)