Created attachment 849341 [details] build.log dev-libs/rocm-opencl-runtime is suffering similar issue with https://bugs.gentoo.org/890377 When testing, AMDGPU opencl kernels are compiled with `-fstack-protector-strong` defined at /etc/clang/gentoo-hardened.cfg, which is not supported by ROCm and causes this issue.
This also causes media-gfx/darktable to stop working with OpenCL. Hacking /etc/clang/gentoo-hardened.cfg solves the issue. No idea why hardened config affects my system, [5] default/linux/amd64/17.1/desktop (stable) * but it's how it is. I suppose there'll be more apps affected, so please fix it properly. Thanks!
(In reply to Nick from comment #1) > This also causes media-gfx/darktable to stop working with OpenCL. > Hacking /etc/clang/gentoo-hardened.cfg solves the issue. No idea why > hardened config affects my system, ROCm use clang to compile GPU kernels for AMD GPUs including opencl, and it does not fully support `-fstack-protector` [1] [1] https://docs.amd.com/bundle/ROCm-Compiler-Reference-Guide-v5.4/page/Appendix_A.html
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ae32bce0b823140512aaf748572216e4e91e98b1 commit ae32bce0b823140512aaf748572216e4e91e98b1 Author: Yiyang Wu <xgreenlandforwyy@gmail.com> AuthorDate: 2023-01-28 09:31:48 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-02-02 12:53:04 +0000 dev-libs/rocm-comgr: append -fno-stack-protector at runtime Closes: https://bugs.gentoo.org/892371 Signed-off-by: Yiyang Wu <xgreenlandforwyy@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/29291 Signed-off-by: Sam James <sam@gentoo.org> .../files/rocm-comgr-5.3.3-fno-stack-protecter.patch | 14 ++++++++++++++ ...cm-comgr-5.1.3-r2.ebuild => rocm-comgr-5.1.3-r3.ebuild} | 1 + dev-libs/rocm-comgr/rocm-comgr-5.3.3-r1.ebuild | 1 + 3 files changed, 16 insertions(+)
(In reply to Nick from comment #1) > This also causes media-gfx/darktable to stop working with OpenCL. > Hacking /etc/clang/gentoo-hardened.cfg solves the issue. No idea why > hardened config affects my system, > [5] default/linux/amd64/17.1/desktop (stable) * > but it's how it is. I suppose there'll be more apps affected, so please fix > it properly. Thanks! It's because this is part of the baseline set of hardening we apply to GCC. We just now do it for Clang. USE=hardened triggers more.