Summary: | sys-devel/gcc-13.2.1 - compile with hardened profiles fails when using fully llvm based system | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Rahul Sandhu <rahul> |
Component: | Current packages | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | UNCONFIRMED --- | ||
Severity: | normal | CC: | contact |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=904426 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
config.log
build.log emerge --info sys-devel/gcc make.conf successful sys-devel:gcc-13.2.1_p20240113-r1:20240212-033941.log (gzip) |
Description
Rahul Sandhu
2023-09-20 23:16:15 UTC
Created attachment 871015 [details]
config.log
Created attachment 871016 [details]
build.log
Created attachment 871017 [details]
emerge --info sys-devel/gcc
Created attachment 871018 [details]
make.conf
Is this the same as bug 904426 or not? Does it happen w/ USE=-cet? (In reply to Sam James from comment #5) > Is this the same as bug 904426 or not? Does it happen w/ USE=-cet? Unfortunately both of those don't seem to be the case. Same thing for both of them. (In reply to Sam James from comment #5) > Is this the same as bug 904426 or not? Does it happen w/ USE=-cet? After a bit of digging, USE=-hardened results in gcc compiling successfully. (In reply to Sam James from comment #5) > Is this the same as bug 904426 or not? Does it happen w/ USE=-cet? Also important to note that it doesn't occur before completely rebuilding my system. For context, this is normally how things goes: - Stage3 (Normal systemd merged-usr stage3) - Switch to hardened profile - emerge -va1 sys-devel/gcc (happily builds with all appropriate use flags, including USE=hardened (set by hardened profile)) - emerge -va1 sys-devel/binutils sys-libs/glibc - emerge -va sys-devel/{clang,llvm,lld} sys-libs/llvm-libunwind - echo "sys-devel/clang-common default-lld" >> /etc/portage/package.use/sys-devel - emerge -va1 sys-devel/clang-common - emerge -e @world At any point after this, gcc will no longer build and will fail with the aforementioned boostrap comparison error. Also of note is the use of thinLTO on the system: CFLAGS="${COMMON_FLAGS} -flto=thin" CXXFLAGS="${COMMON_FLAGS} -flto=thin" I also use -O3 however I did test this on a -O2 box with the same result. Since I first filed the bug report I switched the the nomultilib stage + profile as well with the exact same error. More news. If using gcc to build with an env *and* setting USE="graphite lto" on sys-devel/gcc, it builds with USE="hardened". I used this environment to achieve these results: CC="gcc" CXX="g++" AR="${CHOST}-ar" NM="${CHOST}-nm" RANLIB="${CHOST}-ranlib" COMMON_FLAGS="-march=native -O2 -pipe" CFLAGS="${COMMON_FLAGS}" CXXFLAGS="${COMMON_FLAGS}" LDFLAGS="-Wl,--as-needed" OBJCOPY="objcopy" OBJDUMP="objdump" Created attachment 885212 [details]
successful sys-devel:gcc-13.2.1_p20240113-r1:20240212-033941.log (gzip)
Got this bug as well, interestingly I managed to build =sys-devel/gcc-13.2.1_p20240113-r1 on one box even after a lot of failed ones and with USE=hardened.
Can someone hitting this please upload all the bad+good objects mentioned in the error? (in separate directories for bad/good) |