[LLVMbugs] [Bug 19236] New: -march=native doesn't work in virtualized environment

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Mar 24 11:57:50 PDT 2014


            Bug ID: 19236
           Summary: -march=native doesn't work in virtualized environment
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: mikulas at artax.karlin.mff.cuni.cz
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

I have x86-64 Debian sid installed in kvm-qemu. I have 64-bit clang-3.5
installed from Debian repository.

When compiling a simple program with -march=native, clang fails.
$ cat hello.c
#include <stdio.h>

int main(void)
        printf("Hello World!\n");
        return 0;
$ clang -march=native hello.c
error: unknown target CPU 'athlon'

Apparently, there is some bug in processor detection, even if the system is
64-bit, clang detects a 32-bit "athlon" processor and subsequently fails,
the 64-bit target doesn't know this processor.

Note that kvm reports some features of the underlying CPU (the CPU is
istanbul-class Opteron) as not present in order to allow the program to be
migrated. This probably confuses clang, so that it clasifies the CPU as 32-bit

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140324/eaea834c/attachment.html>

More information about the llvm-bugs mailing list