public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "howarth at nitro dot med.uc.edu" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug bootstrap/54419] [4.8 Regression] Compiling libstdc++-v3/src/c++11/random.cc fails on platforms not knowing rdrand
Date: Tue, 04 Sep 2012 16:38:00 -0000	[thread overview]
Message-ID: <bug-54419-4-XbP6iYP1O8@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-54419-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54419

--- Comment #26 from Jack Howarth <howarth at nitro dot med.uc.edu> 2012-09-04 16:37:07 UTC ---
(In reply to comment #23)
> Why do you talk about clang?  This has nothing to do with it.  And, there is
> already runtime check for whether RDRAND can be used in random.cc (though,
> apparently insufficient for i?86 - it should use either __get_cpuid, or
> __get_cpuid_max before __cpuid).  Not sure if on x86_64 it is guaranteed that
> max basic level is always >= 1, if not, it also needs to test __get_cpuid_max.

I mention clang because it is the system compiler on both Lion and Mountain
Lion
as of Xcode 4.4. The Apple clang 4.0 compiler defaults to its integrated
assembler
such that the simple test case...


int
main ()
{
  asm("rdrand %eax");
  return 0;
}

is compiled without errors into the assembly....


        .section        __TEXT,__text,regular,pure_instructions
        .globl  _main
        .align  4, 0x90
_main:                                  ## @main
        .cfi_startproc
## BB#0:
        pushq   %rbp
Ltmp2:
        .cfi_def_cfa_offset 16
Ltmp3:
        .cfi_offset %rbp, -16
        movq    %rsp, %rbp
Ltmp4:
        .cfi_def_cfa_register %rbp
        movl    $0, %eax
        movl    $0, -4(%rbp)
        ## InlineAsm Start
        rdrand %eax
        ## InlineAsm End
        popq    %rbp
        ret
        .cfi_endproc


.subsections_via_symbols

This leaves config.log with ac_cv_x86_rdrand=yes which fails later in the
bootstrap when the newly built FSF gcc compiler is used and the legacy system
assembler is used.


  parent reply	other threads:[~2012-09-04 16:38 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-30 14:07 [Bug bootstrap/54419] New: [4.8 Regression] Compiling libstdc++-v3/src/c++11/random.cc fails on x86_64-apple-darwin10 dominiq at lps dot ens.fr
2012-08-30 19:41 ` [Bug bootstrap/54419] [4.8 Regression] Compiling libstdc++-v3/src/c++11/random.cc fails on platforms not knowing rdrand dominiq at lps dot ens.fr
2012-08-30 20:20 ` drepper.fsp at gmail dot com
2012-08-30 20:38 ` dominiq at lps dot ens.fr
2012-08-31 12:55 ` dominiq at lps dot ens.fr
2012-08-31 14:00 ` dominiq at lps dot ens.fr
2012-08-31 14:49 ` howarth at nitro dot med.uc.edu
2012-08-31 15:40 ` howarth at nitro dot med.uc.edu
2012-08-31 17:17 ` paolo.carlini at oracle dot com
2012-08-31 17:47 ` drepper.fsp at gmail dot com
2012-09-01 19:21 ` tkoenig at gcc dot gnu.org
2012-09-01 19:31 ` tkoenig at gcc dot gnu.org
2012-09-02 17:46 ` pault at gcc dot gnu.org
2012-09-02 17:54 ` polacek at redhat dot com
2012-09-02 18:04 ` hjl.tools at gmail dot com
2012-09-02 20:06 ` drepper.fsp at gmail dot com
2012-09-03  8:32 ` jakub at gcc dot gnu.org
2012-09-03  9:44 ` glisse at gcc dot gnu.org
2012-09-03  9:49 ` jakub at gcc dot gnu.org
2012-09-03 10:13 ` glisse at gcc dot gnu.org
2012-09-04  1:08 ` drepper.fsp at gmail dot com
2012-09-04 10:29 ` dominiq at lps dot ens.fr
2012-09-04 14:21 ` howarth at nitro dot med.uc.edu
2012-09-04 15:54 ` jakub at gcc dot gnu.org
2012-09-04 15:57 ` dominiq at lps dot ens.fr
2012-09-04 16:15 ` dominiq at lps dot ens.fr
2012-09-04 16:38 ` howarth at nitro dot med.uc.edu [this message]
2012-09-04 16:49 ` howarth at nitro dot med.uc.edu
2012-09-04 17:26 ` howarth at nitro dot med.uc.edu
2012-09-04 18:26 ` glisse at gcc dot gnu.org
2012-09-05  9:40 ` dominiq at lps dot ens.fr
2012-09-05  9:46 ` dominiq at lps dot ens.fr
2012-09-05 10:48 ` glisse at gcc dot gnu.org
2012-09-05 12:32 ` dominiq at lps dot ens.fr
2012-09-05 12:42 ` jakub at gcc dot gnu.org
2012-09-05 13:00 ` dominiq at lps dot ens.fr
2012-09-05 13:26 ` drepper.fsp at gmail dot com
2012-09-05 13:59 ` drepper.fsp at gmail dot com
2012-09-06 14:05 ` howarth at nitro dot med.uc.edu
2012-09-06 14:13 ` howarth at nitro dot med.uc.edu
2012-09-06 14:17 ` jakub at gcc dot gnu.org
2012-09-06 14:19 ` jakub at gcc dot gnu.org
2012-09-06 14:22 ` paolo.carlini at oracle dot com
2012-09-06 14:33 ` howarth at nitro dot med.uc.edu
2012-09-06 14:49 ` paolo.carlini at oracle dot com
2012-09-06 15:00 ` jakub at gcc dot gnu.org
2012-09-06 15:33 ` paolo.carlini at oracle dot com
2012-09-06 16:02 ` dominiq at lps dot ens.fr
2012-09-06 16:16 ` howarth at nitro dot med.uc.edu
2012-09-06 16:48 ` dominiq at lps dot ens.fr
2012-09-07 13:52 ` howarth at nitro dot med.uc.edu
2012-09-08  0:28 ` howarth at nitro dot med.uc.edu
2012-09-08 10:43 ` redi at gcc dot gnu.org
2012-09-08 11:03 ` redi at gcc dot gnu.org
2012-09-09 15:24 ` dominiq at lps dot ens.fr
2012-09-09 16:17 ` paolo.carlini at oracle dot com
2012-09-09 16:21 ` redi at gcc dot gnu.org
2012-09-09 16:24 ` redi at gcc dot gnu.org
2012-09-09 17:23 ` redi at gcc dot gnu.org
2012-09-09 17:33 ` redi at gcc dot gnu.org
2012-09-09 18:19 ` dominiq at lps dot ens.fr
2012-09-09 19:49 ` redi at gcc dot gnu.org
2012-09-09 20:47 ` redi at gcc dot gnu.org
2012-09-10 10:02 ` paul.richard.thomas at gmail dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-54419-4-XbP6iYP1O8@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).