[Release-testers] Issue with ThinLTO and gcc-9 [was: Re: [9.0.0 Release] Release Candidate 3 is here]
Sylvestre Ledru via Release-testers
release-testers at lists.llvm.org
Mon Sep 9 08:36:48 PDT 2019
Le 30/08/2019 à 18:38, Hans Wennborg via Release-testers a écrit :
> Hello everyone,
> 9.0.0-rc3 was tagged today from the release_90 branch at r370450. In
> the Git monorepo, it's tagged as llvmorg-9.0.0-rc3.
I experienced an issue with lto. Initially not clang related but might be.
For a few months, I have been building packages using ThinLTO (
-DLLVM_ENABLE_LTO="Thin" ) and stage2. gcc for stage1.
Debian unstable and the next Ubuntu updated to gcc-9. This version is stricter
on -flto (only accept understood values ().
It caused the build to fail on polly with "No ffs implementation found" (which is just
cmake failing with -flto=thin) 
This clearly makes sense.
So, I tried to use -DBOOTSTRAP_LLVM_ENABLE_LTO="Thin" to have only -flto=Thin used in the stage2.
However, this caused two issues:
* Some packages became much bigger (21M => 141M)
* Linking failed for some packages with:
/usr/bin/ld: /usr/lib/llvm-9/lib/libclangCodeGen.a: error adding symbols: archive has no index; run ranlib to
I tried to play with clang cmake file  but I haven't been able to fix it.
For now, I am forcing the usage of gcc-8 but this won't scale.
Anyway, probably not a blocker for the 9 release but I prefer to report this in case other are getting this issue.
More information about the Release-testers