On Mon, Oct 3, 2016 at 3:50 PM, Teresa Johnson <tejohnson at google.com> wrote:> > On Sun, Oct 2, 2016 at 4:02 AM, Carsten Mattner <carstenmattner at gmail.com> wrote: >> >> On Sun, Oct 2, 2016 at 6:41 AM, Teresa Johnson <tejohnson at google.com> wrote: > > > > > I use trunk, but it depends on how close to the bleeding edge you > > > are comfortable with. But like I said, I also tried bootstrapping > > > with 3.9 (both trunk as well as 3.9 sources) and couldn't reproduce. >> >> Hmm, so you're saying neither fails for you, right? > > YesOkay. Do you mind focusing on the 3.9 branch? It's less of a moving target and lends itself more to figuring out what's failing for me. As soon as I get around to it, I'll send you my full configure and build steps as a shell script. Need to streamline it.
Aha - finally reproduced! The difference is using ld.bfd not ld.gold. With that I get the same failure (using 3.9 to build 3.9 sources): /usr/local/google/home/tejohnson/binutils_build/install/bin/ld: bin/lldb-3.9.1: hidden symbol `__morestack' in /usr/lib/gcc/x86_64-linux-gnu/4.8/libgcc.a(morestack.o) is referenced by DSO /usr/local/google/home/tejohnson/binutils_build/install/bin/ld: final link failed: Bad value clang-3.9: error: linker command failed with exit code 1 (use -v to see invocation) ninja: build stopped: subcommand failed. I am not sure what the official support story is for LLVMgold.so and ld.bfd. As mentioned earlier, the LLVM site indicates it should use the gold linker. Can you use that while I try to figure out whether this is something that should be supported/working? Thanks, Teresa On Mon, Oct 3, 2016 at 9:56 AM, Carsten Mattner <carstenmattner at gmail.com> wrote:> On Mon, Oct 3, 2016 at 3:50 PM, Teresa Johnson <tejohnson at google.com> > wrote: > > > > On Sun, Oct 2, 2016 at 4:02 AM, Carsten Mattner < > carstenmattner at gmail.com> wrote: > >> > >> On Sun, Oct 2, 2016 at 6:41 AM, Teresa Johnson <tejohnson at google.com> > wrote: > > > > > > > I use trunk, but it depends on how close to the bleeding edge you > > > > are comfortable with. But like I said, I also tried bootstrapping > > > > with 3.9 (both trunk as well as 3.9 sources) and couldn't reproduce. > >> > >> Hmm, so you're saying neither fails for you, right? > > > > Yes > > Okay. Do you mind focusing on the 3.9 branch? It's less of a moving target > and lends itself more to figuring out what's failing for me. > > As soon as I get around to it, I'll send you my full configure and build > steps as a shell script. Need to streamline it. >-- Teresa Johnson | Software Engineer | tejohnson at google.com | 408-460-2413 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161003/12819e3a/attachment.html>
Is -fsplit-stack option used anywhere? My wild guess is that with ld.bfd, the thinLTO link for the DSO does not bring in morestack.o from libgcc.a, but the hidden symbol is defined in lldb binary. David On Mon, Oct 3, 2016 at 1:54 PM, Teresa Johnson via llvm-dev < llvm-dev at lists.llvm.org> wrote:> Aha - finally reproduced! The difference is using ld.bfd not ld.gold. With > that I get the same failure (using 3.9 to build 3.9 sources): > > /usr/local/google/home/tejohnson/binutils_build/install/bin/ld: > bin/lldb-3.9.1: hidden symbol `__morestack' in > /usr/lib/gcc/x86_64-linux-gnu/4.8/libgcc.a(morestack.o) is referenced by > DSO > /usr/local/google/home/tejohnson/binutils_build/install/bin/ld: final > link failed: Bad value > clang-3.9: error: linker command failed with exit code 1 (use -v to see > invocation) > ninja: build stopped: subcommand failed. > > I am not sure what the official support story is for LLVMgold.so and > ld.bfd. As mentioned earlier, the LLVM site indicates it should use the > gold linker. Can you use that while I try to figure out whether this is > something that should be supported/working? > > Thanks, > Teresa > > On Mon, Oct 3, 2016 at 9:56 AM, Carsten Mattner <carstenmattner at gmail.com> > wrote: > >> On Mon, Oct 3, 2016 at 3:50 PM, Teresa Johnson <tejohnson at google.com> >> wrote: >> > >> > On Sun, Oct 2, 2016 at 4:02 AM, Carsten Mattner < >> carstenmattner at gmail.com> wrote: >> >> >> >> On Sun, Oct 2, 2016 at 6:41 AM, Teresa Johnson <tejohnson at google.com> >> wrote: >> > > >> > > > I use trunk, but it depends on how close to the bleeding edge you >> > > > are comfortable with. But like I said, I also tried bootstrapping >> > > > with 3.9 (both trunk as well as 3.9 sources) and couldn't reproduce. >> >> >> >> Hmm, so you're saying neither fails for you, right? >> > >> > Yes >> >> Okay. Do you mind focusing on the 3.9 branch? It's less of a moving target >> and lends itself more to figuring out what's failing for me. >> >> As soon as I get around to it, I'll send you my full configure and build >> steps as a shell script. Need to streamline it. >> > > > > -- > Teresa Johnson | Software Engineer | tejohnson at google.com | > 408-460-2413 > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161003/0692211e/attachment.html>
On Mon, Oct 3, 2016 at 10:54 PM, Teresa Johnson <tejohnson at google.com> wrote:> > Aha - finally reproduced! The difference is using ld.bfd not > ld.gold. With that I get the same failure (using 3.9 to build 3.9 > sources):Thanks a lot! [...]> I am not sure what the official support story is for LLVMgold.so and > ld.bfd. As mentioned earlier, the LLVM site indicates it should use > the gold linker. Can you use that while I try to figure out whether > this is something that should be supported/working?I'm probably confused but I was under the impression that I am using ld.gold due to the use of llvm-ar and llvm-ranlib and having enabled ThinLTO, which, if not strictly required with ld.bfd >=2.26, prefers ld.gold. Anyway, if I extend CFLAGS and CXXFLAGS with -fuse-ld=gold, then ld.gold terminates with /usr/bin/ld.gold: fatal error: --plugin-opt requires --plugin According to the manpage the compile driver, if passed -fuse-ld=gold, will use ld.gold, so I added that to CFLAGS and CXXFLAGS before running cmake. The above was how far I got without further insight what I might have missed. I also tried setting LD=ld.gold, but that wasn't really respected by cmake, judging by how the ld actually used complained about the unsupport -Wl options (those which you suggested for aggressive pruning and which are not universal). Which are: -Wl,--gc-sections -Wl,-plugin-opt,-function-sections -Wl,-plugin-opt,-data-sections" What's the right way to enable ld.gold explicitly when configuring llvm with cmake?