Gentoo Archives: gentoo-alt

From: Michael Weiser <michael@×××××××××××××××.net>
To: gentoo-alt@l.g.o
Subject: Re: [gentoo-alt] clang on Mac OS X (Was: Question before setting up sage-on-gentoo)
Date: Tue, 03 Feb 2015 02:00:33
Message-Id: 20150203013153.GC16447@weiser.dinsnail.net
In Reply to: Re: [gentoo-alt] clang on Mac OS X (Was: Question before setting up sage-on-gentoo) by Michael Weiser
1 Hi Fabian,
2
3 On Sat, Jan 31, 2015 at 07:25:43PM +0100, Michael Weiser wrote:
4
5 > > > Finally it croaked on linking cctools stuff:
6 > > >
7 > > > undef: _prune_trie
8 > > > Undefined symbols for architecture x86_64:
9 > > > "_prune_trie", referenced from:
10 > > > _strip_symtab in strip.private.o
11 > > > ld: symbol(s) not found for architecture x86_64
12 > > >
13 > > > Most likely the -flto was missing when compiling some file. So there's
14 > > > definitely some work to be done there.
15 > > Ok. Recently I saw a problem like this with Apple's Clang which was
16 > > caused by the respective functions declared inline (e.g. bug). But I
17 > > guess this is a different issue.
18 > Mhmm, it's always the same: Up until this writeup, LTO wasn't really on
19 > my project list. Now I've got to know. I'll give it some digging. :)
20
21 I was able to make ld64 shut up about LTO remarks
22 (https://bugs.gentoo.org/show_bug.cgi?id=538604). And it turns out that
23 when the running ld64 is linked against llvm 3.4.2's libLTO binutils
24 compile fine with -flto.
25
26 The error above only appears when the currently installed ld64 is linked
27 against llvm 3.5's libLTO. It croaks because the symbol is in an LLVM
28 bytecode file in an archive (libprunetrie.a). Linking the object file
29 directly works fine again.
30
31 Since it works when linked against 3.4.2 I guess it's some sort of
32 regression in library archive handling or just that 3.5 is just too
33 current for ld64-241.9. I'd leave it at that and wait for the next
34 Xcode.
35 --
36 bye, Micha
37 I hate forms!