[llvm-bugs] [Bug 24927] New: LC_VERSION_MIN_MACOSX: Darwin kernel version vs SDK version
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Sep 24 10:26:18 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=24927
Bug ID: 24927
Summary: LC_VERSION_MIN_MACOSX: Darwin kernel version vs SDK
version
Product: libraries
Version: trunk
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: Common Code Generator Code
Assignee: unassignedbugs at nondot.org
Reporter: benoit.belley at autodesk.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
Using the Xcode 7 linker, one gets messages such as the following when linking
objects generated using llvm:
ld: warning: object file (foo.o) was built for newer OS X version (14.5) than
being linked (10.9)
The issue is the following:
a) In lib/Support/Unix/Host.inc, sys::getDefaultTargetTriple() sets the OS name
to darwin14.5 when running on MaxOS X 10.10. 14.5 is the Darwin kernel version
as reported by uname.
b) In lib/CodeGen/AsmPrinter.cpp, AsmPrinter::doInitialization() writes out
this version number to the LC_VERSION_MIN_MACOSX of the generated object.
c) The XCode 7 linker seems to expect that LC_VERSION_MIN_MACOSX contains the
minimum version number of the MacOS X SDK (10.9, 10.11, ...), NOT the Darwin
kernel version number!
AFAICT, LLVM had this wrong behaviour for a long time. The only new thing with
the Xcode 7 linker is that it is now reporting a warning for the version
mismatch.
--
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/20150924/f31c258d/attachment-0001.html>
More information about the llvm-bugs
mailing list