too long lines were shrinked: make[3]: Leaving directory '/var/tmp/portage/sys-devel/gcc-14.1.1_p20240518/work/build/x86_64-pc-linux-gnu/libgcc' make[5]: Entering directory '/var/tmp/portage/sys-devel/gcc-14.1.1_p20240518/work/build/x86_64-pc-linux-gnu/32/libgcc' echo timestamp > libgcc_tm.stamp make[5]: Leaving directory '/var/tmp/portage/sys-devel/gcc-14.1.1_p20240518/work/build/x86_64-pc-linux-gnu/32/libgcc' make[5]: Entering directory '/var/tmp/portage/sys-devel/gcc-14.1.1_p20240518/work/build/x86_64-pc-linux-gnu/32/libgcc' /var/tmp/portage/sys-devel/gcc-14.1.1_p20240518/work/build/./gcc/xgcc -B/var/tmp/portage/sys-devel/gcc-14.1.1_p20240518/work/build/./gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include -fno-che cc1: error: '-fcf-protection' is not compatible with this target make[5]: *** [/var/tmp/portage/sys-devel/gcc-14.1.1_p20240518/work/gcc-14-20240518/libgcc/shared-object.mk:36: avx_savms64_s.o] Error 1 make[5]: Leaving directory '/var/tmp/portage/sys-devel/gcc-14.1.1_p20240518/work/build/x86_64-pc-linux-gnu/32/libgcc' ------------------------------------------------------------------- This is an unstable amd64 chroot image at a tinderbox (==build bot) name: 23.0_llvm-20240607-115521 UNMASKED: ~dev-libs/icu-75.1 ~dev-libs/icu-layoutex-75.1 The attached etc.portage.tar.xz has all details. ------------------------------------------------------------------- gcc-config -l: [1] x86_64-pc-linux-gnu-13 * clang/llvm (if any): clang version 18.1.6+libcxx Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/lib/llvm/18/bin Configuration file: /etc/clang/x86_64-pc-linux-gnu-clang.cfg /usr/lib/llvm/18 18.1.6+libcxx Python 3.12.3 Available Ruby profiles: (none found) php cli (if any): HEAD of ::gentoo commit 53e6779fb42ba449740b8aae94de19960bbb1d5b Author: Repository mirror & CI <repomirrorci@gentoo.org> Date: Fri Jun 7 18:28:18 2024 +0000 2024-06-07 18:28:17 UTC emerge -qpvO sys-devel/gcc [ebuild NS ] sys-devel/gcc-14.1.1_p20240518 [13.2.1_p20240210] USE="cet (cxx) debug* (default-stack-clash-protection) (default-znow) fortran (multilib) openmp (pie) sanitize ssp valgrind* -ada (-custom-cflags) -d -doc (-fixed-point) -go -graphite -hardened (-ieee-long-double) -jit (-libssp) -lto -modula2 -nls* -objc -objc++ -objc-gc (-pch) -pgo -rust% -systemtap -test -vanilla -vtv -zstd*"
Created attachment 895335 [details] emerge-info.txt
Created attachment 895336 [details] emerge-history.txt
Created attachment 895337 [details] environment
Created attachment 895338 [details] etc.clang.tar.xz
Created attachment 895339 [details] etc.portage.tar.xz
Created attachment 895340 [details] gcc-build-logs.tar.xz
Created attachment 895341 [details] logs.tar.xz
Created attachment 895342 [details] qlist-info.txt
Created attachment 895343 [details] sys-devel:gcc-14.1.1_p20240518:20240607-185945.log.xz
Created attachment 895344 [details] temp.tar.xz
*** Bug 934790 has been marked as a duplicate of this bug. ***
Happens when building with Clang.
Wasn't bug 928460 supposed to fix this?
Well apparently, it didn't
(In reply to zachariah.cabelly from comment #14) > Well apparently, it didn't It wasn't really a question to you, more a note to whoever is going to work on it...
(In reply to Sam James from comment #15) > (In reply to zachariah.cabelly from comment #14) > > Well apparently, it didn't > > It wasn't really a question to you, more a note to whoever is going to work > on it... Ok, I was making a joke, but to each their own
Forcing GCC on sys-devel/gcc in the meantime. That's the workaround I have.
Root cause: xgcc (bootstrapper) in 14.1.1 does not resolve `-march=native`, then in cc1 invocation there is no -march=..., due to `-m32` cc1 fallbacks to some ancient i386, which does not support stack-protection. This problem applies only to xgcc; final gcc-14 resolves `-march=native` fine. The issue occurs only with `sys-devel/gcc[hardened]`. Workaround in make.conf: replace `-march=native` with `-march=<whatever arch you use>`. Or remove `-march=native` (in that case xgcc adds `-march=x86-64` to cc1 which prevents fallback to i386). Minimal reproducer: /var/tmp/portage/sys-devel/gcc-14.1.1_p20240622/work/build/gcc/xgcc -B/var/tmp/portage/sys-devel/gcc-14.1.1_p20240622/work/build/gcc/ -march=native -m32 -fcf-protection test.c -### 2>&1 | grep cc1 >>> .../cc1 ... test.c ... -m32 "-fcf-protection=full" ... It worked fine in gcc-13.2.1: /var/tmp/portage/sys-devel/gcc-13.2.1_p20240210/work/build/gcc/xgcc -B/var/tmp/portage/sys-devel/gcc-13.2.1_p20240210/work/build/gcc/ -march=native -m32 -fcf-protection test.c -### 2>&1 | grep cc1 >>> .../cc1 ... test.c "-march=znver4" -mmmx -mpopcnt -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -mavx -mavx2 -msse4a -mno-fma4 -mno-xop -mfma -mavx512f -mbmi -mbmi2 -maes -mpclmul -mavx512vl -mavx512bw -mavx512dq -mavx512cd -mno-avx512er -mno-avx512pf -mavx512vbmi -mavx512ifma -mno-avx5124vnniw -mno-avx5124fmaps -mavx512vpopcntdq -mavx512vbmi2 ... -m32 "-fcf-protection=full" ...
(In reply to Sv. Lockal from comment #18) > Root cause: xgcc (bootstrapper) in 14.1.1 does not resolve `-march=native`, > then in cc1 invocation there is no -march=..., due to `-m32` cc1 fallbacks > to some ancient i386, which does not support stack-protection. This problem > applies only to xgcc; final gcc-14 resolves `-march=native` fine. > Note that depending on the point in the process you're at, `xgcc` is sometimes just a wrapper around the original CC (e.g. clang). But if it worked with GCC 13, that's obviously far more curious...