[patch] Don't produce stubs on darwin x86

Iain Sandoe iain at codesourcery.com
Wed Dec 4 02:47:22 PST 2013


On 3 Dec 2013, at 15:28, Rafael EspĂ­ndola wrote:

> The attached patches disable the production of stubs on darwin x86.
> These were needed with older linkers, but Jim mentioned that using
> older tools (about 6 years in this case I think) with current clang is
> not supported.
> 
> The existing code also confuses the linker version with the OS being
> targeted. My understanding is that with this patch it is still
> possible to build code that will run on OS X 10.4, one just needs a
> newer linker.

As you say, it's the linker version that matters (the very old tools require the stubs).

However, I suspect that the reason the target system version is being used as a work-around is that "-target-linker-version" does not (yet) appear to be passed into the target creation process, so the information is not available at the point needed.

[AFAICT -target-linker-version gets to compiler invocation and is then discarded (and I don't see it anywhere in llc)].

---

So the questions are 
 do we want to be able to:
(a) self-host on earlier versions of OSX? (i.e. darwin8)
(b) build objects that can be linked by the native toolset on darwin8?

if either answer is "yes" then the stubs creation code would still be needed.

Also, really, the linker version should be passed through to the target - it's the best way of making the correct decision here.  Not sure whether it would be best to parse it into a version number (which is easier to test) or just leave it as a string (which is more flexible).

> I have split the test is two to make it clear that there is no
> functionality change with triples that use darwin9 and newer.
> 
> Cheers,
> Rafael
> <tests.patch><code.patch>_______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits





More information about the llvm-commits mailing list