[PATCH][darwin] revert to .weak_definition on darwin<10

Jim Grosbach grosbach at apple.com
Mon Dec 9 16:37:07 PST 2013

On Dec 9, 2013, at 4:30 PM, Iain Sandoe <iain at codesourcery.com> wrote:

> Hi Jim,
> On 10 Dec 2013, at 00:17, Jim Grosbach wrote:
>>> We can then key codegen on the correct thing.
>>> ISTM that when a compiler is "inherently a cross compiler" *and* is under development *and* might be used with a bunch of different exterior tools, that passing the linker and assembler version to the codegen is a sensible step (at least during the development phase).
>> Having the compiler output be used by a bunch of different exterior tools has never been a goal before. It’s always been required to use a “recent enough” binutils/cctools+ld64.
> Hmm. well, I can imagine this being useful even if one was only covering the "last two editions of binutils on various platforms" + ld64 &&|| lld on the native platform ..
> .. which was why i suggested it - however, certainly not an intention to jump through hoops to achieve it.

Yeah, it’s not necessarily a bad goal or anything. It’s just never been done. We’ve always (for a sufficient definition of “always”) been in the situation where it wasn’t necessary or desirable. What you’re doing is a bit of an edge case compared to prior practice, so things aren’t fitting in cleanly. That’s a good thing as it gives us motivation to make things more robust.

>> You guys are in a tricky spot, though, working on a platform that realistically can’t get new low level tools (other than what clang itself builds/ships with).
> well, the alternative is to back-port a "sufficiently modern" ld64/as set to the system(s) we want to support .. it's also under consideration - the down side is that anyone wanting to adopt clang on such a system then has to build a bunch more stuff (not sure that's a biggie but…).

Yeah, that’s always been the canonical answer before. For non-darwin platforms, it’s easy enough, which is why this typically doesn’t come up. “You need a newer binutils” and so on. But darwin has it’s own set of tools, and while there’s no obvious reason why a recent cctools and ld64 wouldn’t build and run on/for darwin8/ppc, I’m pretty sure we don’t do any testing of that. ;)

More information about the llvm-commits mailing list