When building with '-D_FORTIFY_SOURCE=2' in the CLFAGS/CXXFLAGS the build fails, when the flag isn’t present the build doesn’t fail. I found this issue (http://llvm.1065342.n5.nabble.com/llvm-dev-Thin-LTO-llvm-build-td100633i120.html) leading me to it.
Created attachment 502690 [details] lzma /var/tmp/portage/sys-libs/compiler-rt-sanitizers-4.0.1/temp/build.log
I have this bug again on 5.0.1 btw.
I have the same problem with 8.0.1. -D_FORTIFY_SOURCE=1 doesn't work either.
I have the same problem with 10.0.1. FYI: CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer -frename-registers -fstack-clash-protection -D_FORTIFY_SOURCE=2"
btw https://bugs.llvm.org/show_bug.cgi?id=47163 seems to be related.
I can build it with GCC hardened
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=20fcc3fcd7ca910136a74dee6b951154a203a7ee commit 20fcc3fcd7ca910136a74dee6b951154a203a7ee Author: Michał Górny <mgorny@gentoo.org> AuthorDate: 2021-04-24 09:38:41 +0000 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: 2021-04-24 09:43:42 +0000 sys-libs/compiler-rt-sanitizers: Backport -D_FORTIFY_SOURCE fix Closes: https://bugs.gentoo.org/636604 Signed-off-by: Michał Górny <mgorny@gentoo.org> sys-libs/compiler-rt-sanitizers/Manifest | 6 +++--- ...tizers-10.0.1.ebuild => compiler-rt-sanitizers-10.0.1-r1.ebuild} | 2 +- ...tizers-11.0.0.ebuild => compiler-rt-sanitizers-11.0.0-r1.ebuild} | 2 +- ...tizers-11.0.1.ebuild => compiler-rt-sanitizers-11.0.1-r1.ebuild} | 2 +- ...tizers-11.1.0.ebuild => compiler-rt-sanitizers-11.1.0-r1.ebuild} | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-)