Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 734554 - 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!
Summary: sys-libs/libomp-10.0.1 fails with LTO - Attribute after last parameter! cal...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Bernard Cafarelli
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: lto
  Show dependency tree
 
Reported: 2020-07-29 12:06 UTC by Thomas Schneider
Modified: 2021-08-25 02:21 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,42.35 KB, text/plain)
2020-07-29 12:06 UTC, Thomas Schneider
Details
emerge --info (emerge--info,20.53 KB, text/plain)
2020-07-29 12:06 UTC, Thomas Schneider
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Schneider 2020-07-29 12:06:03 UTC
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"
```
Comment 1 Thomas Schneider 2020-07-29 12:06:50 UTC
Created attachment 651430 [details]
emerge --info
Comment 2 Markus Peloquin 2020-09-30 00:50:45 UTC
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