Summary: | sys-libs/libomp-10.0.1 fails with LTO - Attribute after last parameter! call void @llvm.x86.sse.sfence() #6 in function __kmp_parallel_initialize LLVM ERROR: Broken function found, compilation aborted! | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Thomas Schneider <qsx> |
Component: | Current packages | Assignee: | Bernard Cafarelli <voyageur> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | eschwartz93, llvm |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=870127 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 618550 | ||
Attachments: |
build.log
emerge --info |
Created attachment 651430 [details]
emerge --info
Same here CXX=clang++ CXXFLAGS='-march=native -O3 -pipe -flto=thin' LDFLAGS='-Wl,-O3 -fuse-ld=lld -rtlib=compiler-rt' -flto :: broken -flto=thin :: broken -fno-lto :: works In bug 870127, a filter-lto was added to the libomp ebuild so this cannot happen anymore. |
Created attachment 651428 [details] build.log sys-libs/libomp-10.0.1 fails to build (more precisely, to link libomp.so) when building with clang(++), lld, and LTO. See attached build.log for details # emerge -pqv '=sys-libs/libomp-10.0.1::gentoo' [ebuild U ] sys-libs/libomp-10.0.1 [10.0.0] USE="-cuda -hwloc -offload -ompt -test" ABI_X86="(64) -32 (-x32)" Relevant toolchain config: ``` % cat /etc/portage/env/clang CC="clang" CXX="clang++" CFLAGS="${CFLAGS} -flto=thin" CXXFLAGS="${CXXFLAGS} -flto=thin" LDFLAGS="-fuse-ld=lld -Wl,-O2 -Wl,--as-needed" AR="llvm-ar" NM="llvm-nm" RANLIB="llvm-ranlib" ```