[LLVMbugs] [Bug 19945] New: clang: building cross compiler for Mac results in incorrect Darwin kernel version

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Jun 4 13:31:14 PDT 2014


            Bug ID: 19945
           Summary: clang: building cross compiler for Mac results in
                    incorrect Darwin kernel version
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: inkscapebrony at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

I'm building a cross-compiling toolchain for OS X. This sounds ridiculous, but
I'm on an iMac that can no longer run OS X. It can only boot Linux, and I can't
use any "good" GPU functionality as it immediately corrupts the screen.
nomodeset it stays.

I configured llvm in my chroot like this:
../configure --prefix=/usr/clang_3_4 --enable-optimized
--enable-targets=x86_64,x86 --disable-compiler-version-checks
--host=x86_64-unknown-linux-gnu --build=x86_64-unknown-linux-gnu

Whenever I run clang, I get this message:
# /usr/clang_3_4/bin/x86_64-apple-darwin11.4.2-clang++
x86_64-apple-darwin11.4.0-clang: error: invalid Darwin version number:
x86_64-apple-darwin11.4.0-clang: error: invalid version number in

Darwin version number? Let's check uname:
# uname -a
Linux liam-iMac 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014
x86_64 x86_64 x86_64 GNU/Linux
"3.13.0" is the important part there. It perfectly matches my kernel version.
Output from uname on a real Mac machine might be something like
# uname -a
Darwin liams-mac-pro.home 11.4.0 Darwin Kernel Version 11.4.0: Mon Apr  9
19:32:15 PDT 2014; root:xnu-1699.26.8~1/RELEASE_X86_64 x86_64

Here is a (somewhat) related MacPorts bug which also affects me:

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/20140604/1ca13080/attachment.html>

More information about the llvm-bugs mailing list