[cfe-dev] Issue with ThinLTO and gcc-9 [was: Re: [Release-testers] [9.0.0 Release] Release Candidate 3 is here]
Sylvestre Ledru via cfe-dev
cfe-dev at lists.llvm.org
Mon Sep 9 08:36:48 PDT 2019
Hello,
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 ([1]).
It caused the build to fail on polly with "No ffs implementation found" (which is just
cmake failing with -flto=thin) [2]
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
one [3]
I tried to play with clang cmake file [4] 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.
Cheers,
Sylvestre
[1] https://github.com/gcc-mirror/gcc/commit/907e3499443d0e441fcb3b7575d6432598413bff#diff-439a293950478cb6a956c187f26afb48
[2] https://bugs.llvm.org/show_bug.cgi?id=43193
[3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=939472
[4] https://github.com/llvm/llvm-project/blob/release/9.x/clang/CMakeLists.txt#L626
More information about the cfe-dev
mailing list