This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug bootstrap/54419] [4.8 Regression] Compiling libstdc++-v3/src/c++11/random.cc fails on platforms not knowing rdrand


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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]