Debug why GCC fails to build on K3 #36

Open
opened 2026-10-08 14:40:51 +00:00 by kashyapc · 13 comments
Owner

@davidlt says GCC hasn't built successfully on K3 for months. We need to solve this for Fedora ELN bootstrap (#32).

Here's a failed build on K3: https://riscv-koji.fedoraproject.org/koji/taskinfo?taskID=251308

From the build.log:

[...]

libiberty.a ../libdecnumber/libdecnumber.a  -ldl -lmpc -lmpfr -lgmp -rdynamic  -lz -lzstd 
cc1plus: note: self-tests are not enabled in this build
echo timestamp > s-selftest-c++
../../gcc/config/riscv/thead-peephole.md: In function ‘maybe_code_for_pred’:
../../gcc/config/riscv/thead-peephole.md:17485:1: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without
../../gcc/config/riscv/thead-peephole.md: In function ‘maybe_code_for_pred’:
../../gcc/config/riscv/thead-peephole.md:38629:1: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without
../../gcc/simplify-rtx.cc: In member function ‘simplify_subreg’:
../../gcc/simplify-rtx.cc:8599:10: warning: ‘MEM[(struct scalar_int_mode *)&int_outermode]’ may be used uninitialized [-Wmaybe-uninitialized]
 8599 |       && known_eq (byte, subreg_lowpart_offset (int_outermode, int_innermode)))
      |          ^
../../gcc/simplify-rtx.cc:8570:19: note: ‘MEM[(struct scalar_int_mode *)&int_outermode]’ was declared here
 8570 |   scalar_int_mode int_outermode, int_innermode;
      |                   ^
during IPA pass: static-var
lto1: internal compiler error: Segmentation fault
0x30a39d1 internal_error(char const*, ...)
	../../gcc/diagnostic-global-context.cc:787
0x7c1f71 crash_signal
	../../gcc/toplev.cc:328
0x590676 stream_read_tree_ref(lto_input_block*, data_in*)
	../../gcc/lto-streamer-in.cc:1886
0xa7ce7d lto_input_ts_exp_tree_pointers
	../../gcc/tree-streamer-in.cc:962
0xa7d469 streamer_read_tree_body(lto_input_block*, data_in*, tree_node*)
	../../gcc/tree-streamer-in.cc:1160
0x5901d1 lto_read_tree_1
	../../gcc/lto-streamer-in.cc:1725
0x59039f lto_read_tree
	../../gcc/lto-streamer-in.cc:1797
0x5908c5 lto_input_tree_1(lto_input_block*, data_in*, LTO_tags, unsigned int)
	../../gcc/lto-streamer-in.cc:1942
0x5909a3 lto_input_tree(lto_input_block*, data_in*)
	../../gcc/lto-streamer-in.cc:1966
0x58fe15 input_constructor
	../../gcc/lto-streamer-in.cc:1588
0x58ffdf lto_read_body_or_constructor
	../../gcc/lto-streamer-in.cc:1650
0x59018b lto_input_variable_constructor(lto_file_decl_data*, varpool_node*, char const*)
	../../gcc/lto-streamer-in.cc:1705
0xbd672f varpool_node::get_constructor()
	../../gcc/varpool.cc:306
0xbd6c75 ctor_for_folding(tree_node*)
	../../gcc/varpool.cc:466
0x4efb9d symbol_table::remove_unreachable_nodes(_IO_FILE*)
	../../gcc/ipa.cc:645
0x84121 read_cgraph_and_symbols(unsigned int, char const**)
	../../gcc/lto/lto-common.cc:3027
0x5c899 lto_main()
	../../gcc/lto/lto.cc:663
/builddir/build/BUILD/gcc-16.1.1-build/gcc-16.1.1-20260703/obj-riscv64-redhat-linux/./prev-gcc/lto1 -quiet -dumpbase ./d21.ltrans31.ltrans -misa-spec=20191213 -mtls-dialect=trad -mabi=lp64d -misa-spec=20191213 -mtls-dialect=trad -march=rv64imafdc_zicsr_zifencei_zmmul_zaamo_zalrsc_zca_zcd -march=rv64imafdc_zicsr_zifencei_zmmul_zaamo_zalrsc_zca_zcd -g -g -g -grecord-gcc-switches -O2 -O2 -O2 -Wno-complain-wrong-lang -Wextra -Wno-error=narrowing -Wpedantic -fno-openmp -fno-openacc -fcf-protection=none -fno-PIE -funwind-tables -fstack-clash-protection -fno-checking -frandom-seed=1 -fprofile-generate -frandom-seed=1 -fno-exceptions -fasynchronous-unwind-tables -fltrans /tmp/cc70Zc2r.ltrans31.o -o /tmp/ccwL6S67.s
Please submit a full bug report, with preprocessed source.
Please include the complete backtrace with any bug report.
See <https://bugzilla.redhat.com/> for instructions.
make[4]: *** [/tmp/cc56Hpzv.mk:64: /tmp/cc70Zc2r.ltrans31.ltrans.o] Error 1
make[4]: *** Waiting for unfinished jobs....
lto-wrapper: fatal error: make returned 2 exit status
compilation terminated.
/usr/bin/ld.bfd: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
make[3]: *** [../../gcc/d/Make-lang.in:245: d21] Error 1
rm gcc.pod gfortran.pod ga68.pod gcov-dump.pod gcov-tool.pod fsf-funding.pod gccgo.pod gfdl.pod gpl.pod cpp.pod gcov.pod lto-dump.pod gdc.pod
make[3]: Leaving directory '/builddir/build/BUILD/gcc-16.1.1-build/gcc-16.1.1-20260703/obj-riscv64-redhat-linux/gcc'
make[2]: *** [Makefile:5331: all-stageprofile-gcc] Error 2
make[2]: Leaving directory '/builddir/build/BUILD/gcc-16.1.1-build/gcc-16.1.1-20260703/obj-riscv64-redhat-linux'
make[1]: *** [Makefile:31211: stageprofile-bubble] Error 2
make[1]: Leaving directory '/builddir/build/BUILD/gcc-16.1.1-build/gcc-16.1.1-20260703/obj-riscv64-redhat-linux'
make: *** [Makefile:31465: profiledbootstrap] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.nGVVaX (%build)
RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.nGVVaX (%build)
Child return code was: 1
@davidlt says GCC hasn't built successfully on K3 for months. We need to solve this for Fedora ELN bootstrap (https://forge.fedoraproject.org/riscv/planning/issues/32). Here's a failed build on K3: https://riscv-koji.fedoraproject.org/koji/taskinfo?taskID=251308 From the build.log: ``` [...] libiberty.a ../libdecnumber/libdecnumber.a -ldl -lmpc -lmpfr -lgmp -rdynamic -lz -lzstd cc1plus: note: self-tests are not enabled in this build echo timestamp > s-selftest-c++ ../../gcc/config/riscv/thead-peephole.md: In function ‘maybe_code_for_pred’: ../../gcc/config/riscv/thead-peephole.md:17485:1: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without ../../gcc/config/riscv/thead-peephole.md: In function ‘maybe_code_for_pred’: ../../gcc/config/riscv/thead-peephole.md:38629:1: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without ../../gcc/simplify-rtx.cc: In member function ‘simplify_subreg’: ../../gcc/simplify-rtx.cc:8599:10: warning: ‘MEM[(struct scalar_int_mode *)&int_outermode]’ may be used uninitialized [-Wmaybe-uninitialized] 8599 | && known_eq (byte, subreg_lowpart_offset (int_outermode, int_innermode))) | ^ ../../gcc/simplify-rtx.cc:8570:19: note: ‘MEM[(struct scalar_int_mode *)&int_outermode]’ was declared here 8570 | scalar_int_mode int_outermode, int_innermode; | ^ during IPA pass: static-var lto1: internal compiler error: Segmentation fault 0x30a39d1 internal_error(char const*, ...) ../../gcc/diagnostic-global-context.cc:787 0x7c1f71 crash_signal ../../gcc/toplev.cc:328 0x590676 stream_read_tree_ref(lto_input_block*, data_in*) ../../gcc/lto-streamer-in.cc:1886 0xa7ce7d lto_input_ts_exp_tree_pointers ../../gcc/tree-streamer-in.cc:962 0xa7d469 streamer_read_tree_body(lto_input_block*, data_in*, tree_node*) ../../gcc/tree-streamer-in.cc:1160 0x5901d1 lto_read_tree_1 ../../gcc/lto-streamer-in.cc:1725 0x59039f lto_read_tree ../../gcc/lto-streamer-in.cc:1797 0x5908c5 lto_input_tree_1(lto_input_block*, data_in*, LTO_tags, unsigned int) ../../gcc/lto-streamer-in.cc:1942 0x5909a3 lto_input_tree(lto_input_block*, data_in*) ../../gcc/lto-streamer-in.cc:1966 0x58fe15 input_constructor ../../gcc/lto-streamer-in.cc:1588 0x58ffdf lto_read_body_or_constructor ../../gcc/lto-streamer-in.cc:1650 0x59018b lto_input_variable_constructor(lto_file_decl_data*, varpool_node*, char const*) ../../gcc/lto-streamer-in.cc:1705 0xbd672f varpool_node::get_constructor() ../../gcc/varpool.cc:306 0xbd6c75 ctor_for_folding(tree_node*) ../../gcc/varpool.cc:466 0x4efb9d symbol_table::remove_unreachable_nodes(_IO_FILE*) ../../gcc/ipa.cc:645 0x84121 read_cgraph_and_symbols(unsigned int, char const**) ../../gcc/lto/lto-common.cc:3027 0x5c899 lto_main() ../../gcc/lto/lto.cc:663 /builddir/build/BUILD/gcc-16.1.1-build/gcc-16.1.1-20260703/obj-riscv64-redhat-linux/./prev-gcc/lto1 -quiet -dumpbase ./d21.ltrans31.ltrans -misa-spec=20191213 -mtls-dialect=trad -mabi=lp64d -misa-spec=20191213 -mtls-dialect=trad -march=rv64imafdc_zicsr_zifencei_zmmul_zaamo_zalrsc_zca_zcd -march=rv64imafdc_zicsr_zifencei_zmmul_zaamo_zalrsc_zca_zcd -g -g -g -grecord-gcc-switches -O2 -O2 -O2 -Wno-complain-wrong-lang -Wextra -Wno-error=narrowing -Wpedantic -fno-openmp -fno-openacc -fcf-protection=none -fno-PIE -funwind-tables -fstack-clash-protection -fno-checking -frandom-seed=1 -fprofile-generate -frandom-seed=1 -fno-exceptions -fasynchronous-unwind-tables -fltrans /tmp/cc70Zc2r.ltrans31.o -o /tmp/ccwL6S67.s Please submit a full bug report, with preprocessed source. Please include the complete backtrace with any bug report. See <https://bugzilla.redhat.com/> for instructions. make[4]: *** [/tmp/cc56Hpzv.mk:64: /tmp/cc70Zc2r.ltrans31.ltrans.o] Error 1 make[4]: *** Waiting for unfinished jobs.... lto-wrapper: fatal error: make returned 2 exit status compilation terminated. /usr/bin/ld.bfd: error: lto-wrapper failed collect2: error: ld returned 1 exit status make[3]: *** [../../gcc/d/Make-lang.in:245: d21] Error 1 rm gcc.pod gfortran.pod ga68.pod gcov-dump.pod gcov-tool.pod fsf-funding.pod gccgo.pod gfdl.pod gpl.pod cpp.pod gcov.pod lto-dump.pod gdc.pod make[3]: Leaving directory '/builddir/build/BUILD/gcc-16.1.1-build/gcc-16.1.1-20260703/obj-riscv64-redhat-linux/gcc' make[2]: *** [Makefile:5331: all-stageprofile-gcc] Error 2 make[2]: Leaving directory '/builddir/build/BUILD/gcc-16.1.1-build/gcc-16.1.1-20260703/obj-riscv64-redhat-linux' make[1]: *** [Makefile:31211: stageprofile-bubble] Error 2 make[1]: Leaving directory '/builddir/build/BUILD/gcc-16.1.1-build/gcc-16.1.1-20260703/obj-riscv64-redhat-linux' make: *** [Makefile:31465: profiledbootstrap] Error 2 error: Bad exit status from /var/tmp/rpm-tmp.nGVVaX (%build) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.nGVVaX (%build) Child return code was: 1 ```
kashyapc changed title from Investigate why GCC fails to build on K3 to Debug why GCC fails to build on K3 2026-10-08 15:05:29 +00:00
Author
Owner

David points to an upstream thread about it:

https://lore.kernel.org/linux-riscv/apSYF5x1Tu7PlyL1@aurel32.net/

David points to an upstream thread about it: https://lore.kernel.org/linux-riscv/apSYF5x1Tu7PlyL1@aurel32.net/
Author
Owner

A couple of things:

  • We've ruled out this is not RVA23-specific issue. It could be specific to K3, we don't know yet.

  • There seems to be a gigantic gap between a Debian RISC-V GCC build and a Fedora RISC-V GCC build:

    • Debian (SiFive HiFive Unmatched): 6h, 43n
    • Fedora (Milk-V Titan): 3 days, 4h, 20m
    • A note on hardware: Debian's build was on SiFive HiFive Unmatched ("Freedom U740" SoC), this has 4 cores and a clock speed of 1.2 GHz. In contrast, Fedora's Milk-V Titan build host has 8 cores with 2 GHz clock speed; and 4-5x faster single-core performance.

So it is very puzzling to see this huge difference, even if Debian is running some kind of trimmed build. We need to investigate this further.

A couple of things: - We've ruled out this is not RVA23-specific issue. It could be specific to K3, we don't know yet. - There seems to be a _gigantic_ gap between a [Debian RISC-V GCC build](https://buildd.debian.org/status/fetch.php?pkg=gcc-defaults&arch=riscv64&ver=1.233&stamp=1785688842&raw=0&pow_referer=) and a [Fedora RISC-V GCC build](https://riscv-koji.fedoraproject.org/koji/taskinfo?taskID=346704): - Debian (SiFive HiFive Unmatched): 6h, 43n - Fedora (Milk-V Titan): 3 days, 4h, 20m - A note on hardware: Debian's build was on *SiFive HiFive Unmatched* ("Freedom U740" SoC), this has 4 cores and a clock speed of 1.2 GHz. In contrast, Fedora's *Milk-V Titan* build host has 8 cores with 2 GHz clock speed; and 4-5x faster single-core performance. So it is very puzzling to see this _huge_ difference, even if Debian is running some kind of trimmed build. We need to investigate this further.

The Debian RISC-V build does not run the test suite:

else ifeq ($(derivative),Debian)
  # test suite times out on the buildds
  check_no_cpus += alpha
  # for some meaningful build times ...
  check_no_cpus += riscv64
endif

salsa.debian.org/toolchain-team/gcc/-@2a1da4d2b4/debian/rules.defs (L1822)

The Debian RISC-V build does not run the test suite: ``` else ifeq ($(derivative),Debian) # test suite times out on the buildds check_no_cpus += alpha # for some meaningful build times ... check_no_cpus += riscv64 endif ``` https://salsa.debian.org/toolchain-team/gcc/-/blob/2a1da4d2b4ac295e4c746155b9f843cd1acdf935/debian/rules.defs#L1822
Owner

Let's look at some recent numbers.

Fedora GCC build times

Debian GCC build times

So in Debian the riscv64 build "only" takes ~5x as long as the x86_64 build, using extremely outdated hardware. Whereas in Fedora, despite using some of the fastest riscv64 hardware that exists today, the build takes ~15x as the x86_64 one.

Why is GCC such a worst case scenario for Fedora? With other packages, the difference is still significant but the gap is not quite as severe. To me, that's the interesting question. Comparing build times between Fedora and Debian is not particularly useful, because as noted above they are doing wildly different things; but comparing the gap between different Fedora architectures to that between different Debian architectures could help us figure out how we can speed up our builds.

Let's look at some recent numbers. **Fedora GCC build times** * 5h30m ([x86_64](https://koji.fedoraproject.org/koji/taskinfo?taskID=150544224)) * 74h30m ([riscv64](https://riscv-koji.fedoraproject.org/koji/taskinfo?taskID=358599) on [Milk-V Titan](https://riscv-koji.fedoraproject.org/koji/hostinfo?hostID=8)) **Debian GCC build times** * 12h ([x86_64](https://buildd.debian.org/status/fetch.php?pkg=gcc-16&arch=amd64&ver=16.2.0-3&stamp=1789784979&raw=0)) * 60h ([riscv64](https://buildd.debian.org/status/fetch.php?pkg=gcc-16&arch=riscv64&ver=16.2.0-3&stamp=1789981243&raw=0) on [SiFive HiFive Unmatched](https://db.debian.org/machines.cgi?host=rv-manda-03)) So in Debian the riscv64 build "only" takes ~5x as long as the x86_64 build, using extremely outdated hardware. Whereas in Fedora, despite using some of the fastest riscv64 hardware that exists today, the build takes ~15x as the x86_64 one. Why is GCC such a worst case scenario for Fedora? With other packages, the difference is still significant but the gap is not quite as severe. To me, that's the interesting question. Comparing build times between Fedora and Debian is not particularly useful, because as noted above they are doing wildly different things; but comparing the gap between different Fedora architectures to that between different Debian architectures could help us figure out how we can speed up our builds.
Owner

That said, this ticket is about the failure to build GCC on K3. Performance considerations should be tracked separately.

That said, this ticket is about the failure to build GCC on K3. Performance considerations should be tracked separately.
Author
Owner

That said, this ticket is about the failure to build GCC on K3. Performance considerations should be tracked separately.

Sure. For completeness' sake, noting a correction to my message above after our chat elsewhere.

@kashyapc wrote in #36 (comment):

[...]

So it is very puzzling to see this huge difference, even if Debian is running some kind of trimmed build. We need to investigate this further.

So gcc-defaults is the wrong Debian package, as you point out, I should look for gcc-16. So I looked and the build time for Debian gcc-16 looks more reasonable: 2 days and 11 hours (~59h) on SiFive "Unmatched".

Still, it is faster than Titan. This additional time could be explained by other factors: Fedora GCC build more languages, and "stack protector is enabled by default, double the testing (with and without stack protector)", as per a RHEL GCC tech lead, Siddhesh. @davidlt on Matrix noted that we could build it faster too by removing "bootstrap, lto, pgo, and reducing the number of languages. We could try it for ELN, but that's a totally separate topic.

So that explains the "puzzle" of the huge gap.


And I agree, the relative diff b/n arches in Fedora and Debian is the interesting bit! (We can track it separately, and leave this to GCC on K3.)

> That said, this ticket is about the failure to build GCC on K3. Performance considerations should be tracked separately. Sure. For completeness' sake, noting a correction to my message above after our chat elsewhere. @kashyapc wrote in https://forge.fedoraproject.org/riscv/planning/issues/36#issuecomment-1367082: > [...] > > So it is very puzzling to see this _huge_ difference, even if Debian is running some kind of trimmed build. We need to investigate this further. So `gcc-defaults` is the wrong Debian package, as you point out, I should look for `gcc-16`. So I looked and the build time for Debian `gcc-16` looks more reasonable: [2 days and 11 hours (~59h)](https://buildd.debian.org/status/fetch.php?pkg=gcc-16&arch=riscv64&ver=16.2.0-3&stamp=1789981243&raw=0) on SiFive "Unmatched". Still, it is faster than Titan. This additional time could be explained by other factors: Fedora GCC build more languages, and "stack protector is enabled by default, double the testing (with and without stack protector)", as per a RHEL GCC tech lead, Siddhesh. @davidlt on Matrix noted that we could build it faster too by removing "bootstrap, `lto`, `pgo`, and reducing the number of languages. We could try it for ELN, but that's a totally separate topic. So that explains the "puzzle" of the huge gap. --- And I agree, the relative diff b/n arches in Fedora and Debian is the interesting bit! (We can track it separately, and leave this to GCC on K3.)
Owner

It was suggested disabling transparent_hugepages on the K3 might allow GCC to build. If so maybe it will gives a direction to investigate in, so I triggered a scratch build on one of my K3's to see if it will finish: https://riscv-koji.fedoraproject.org/koji/taskinfo?taskID=387659

Re: build time I also made a package that tries to mimic debian builds options to see what the build time looks like for same, or at least similar, options: https://riscv-koji.fedoraproject.org/koji/taskinfo?taskID=387658

It was suggested disabling transparent_hugepages on the K3 might allow GCC to build. If so maybe it will gives a direction to investigate in, so I triggered a scratch build on one of my K3's to see if it will finish: https://riscv-koji.fedoraproject.org/koji/taskinfo?taskID=387659 Re: build time I also made a package that tries to mimic debian builds options to see what the build time looks like for same, or at least similar, options: https://riscv-koji.fedoraproject.org/koji/taskinfo?taskID=387658
Owner

Building with options close to Debian takes about 8.5 hours on a Milk-V Titan. To be clear I am not suggesting Fedora should change anything, rather just wanted a more equal comparison, and to demonstrate what David was sharing about removing things like bootstrap, lto, pgo, etc.

https://riscv-koji.fedoraproject.org/koji/taskinfo?taskID=387648

Created	Mon, 19 Oct 2026 12:31:44 UTC
Started	Mon, 19 Oct 2026 12:31:45 UTC
Completed	Mon, 19 Oct 2026 21:04:57 UTC
Total time 	8:33:13
Task time 	8:33:11
Building with options close to Debian takes about 8.5 hours on a Milk-V Titan. To be clear I am not suggesting Fedora should change anything, rather just wanted a more equal comparison, and to demonstrate what David was sharing about removing things like bootstrap, lto, pgo, etc. https://riscv-koji.fedoraproject.org/koji/taskinfo?taskID=387648 ``` Created Mon, 19 Oct 2026 12:31:44 UTC Started Mon, 19 Oct 2026 12:31:45 UTC Completed Mon, 19 Oct 2026 21:04:57 UTC Total time 8:33:13 Task time 8:33:11 ```
Owner

The gcc build on the host with transparent_hugepages set to never is probably ~10-12 hours from finishing up

Jennifer Berringer had success building GCC with CONFIG_RISCV_ISA_V_UCOPY_THRESHOLD=-1 set in the kernel. There are some links below with more information. I kicked off another scratch build with THP enabled again on a kernel with CONFIG_RISCV_ISA_V_UCOPY_THRESHOLD=-1 set

$ cat /sys/kernel/mm/transparent_hugepage/enabled
always [madvise] never
$ grep UCOPY /boot/config-7.2.12-200.0.riscv64.omni.fc44.riscv64 
CONFIG_RISCV_ISA_V_UCOPY_THRESHOLD=-1

https://riscv-koji.fedoraproject.org/koji/taskinfo?taskID=389195

https://lore.kernel.org/linux-riscv/aqGNGp8PInSV4vty@aurel32.net/
https://patchew.org/linux/20240507-compile._5Fkernel._5Fwith._5Fextensions-v2-0-722c21c328c6@rivosinc.com/20240507-compile._5Fkernel._5Fwith._5Fextensions-v2-2-722c21c328c6@rivosinc.com/

The gcc build on the host with transparent_hugepages set to never is probably ~10-12 hours from finishing up Jennifer Berringer had success building GCC with CONFIG_RISCV_ISA_V_UCOPY_THRESHOLD=-1 set in the kernel. There are some links below with more information. I kicked off another scratch build with THP enabled again on a kernel with CONFIG_RISCV_ISA_V_UCOPY_THRESHOLD=-1 set ``` $ cat /sys/kernel/mm/transparent_hugepage/enabled always [madvise] never $ grep UCOPY /boot/config-7.2.12-200.0.riscv64.omni.fc44.riscv64 CONFIG_RISCV_ISA_V_UCOPY_THRESHOLD=-1 ``` https://riscv-koji.fedoraproject.org/koji/taskinfo?taskID=389195 https://lore.kernel.org/linux-riscv/aqGNGp8PInSV4vty@aurel32.net/ https://patchew.org/linux/20240507-compile._5Fkernel._5Fwith._5Fextensions-v2-0-722c21c328c6@rivosinc.com/20240507-compile._5Fkernel._5Fwith._5Fextensions-v2-2-722c21c328c6@rivosinc.com/
Owner

Jennifer Berringer had success building GCC with CONFIG_RISCV_ISA_V_UCOPY_THRESHOLD=-1 set in the kernel. [...] I kicked off another scratch build with THP enabled again on a kernel with CONFIG_RISCV_ISA_V_UCOPY_THRESHOLD=-1 set

I'm curious to see what your results are going to be, because unfortunately I've already had two failed attempts of my own with that workaround.

Granted, I was running a RHEL kernel/userspace and building the RHEL GCC package; still, that doesn't fill me with confidence that the CONFIG_RISCV_ISA_V_UCOPY_THRESHOLD=-1 workaround is going to work. I will also note that the Bianbu kernel, which I've been able to use (with RHEL userspace) to successfully build a RHEL GCC on K3, doesn't set that config option.

> Jennifer Berringer had success building GCC with CONFIG_RISCV_ISA_V_UCOPY_THRESHOLD=-1 set in the kernel. [...] I kicked off another scratch build with THP enabled again on a kernel with CONFIG_RISCV_ISA_V_UCOPY_THRESHOLD=-1 set I'm curious to see what your results are going to be, because unfortunately I've already had two failed attempts of my own with that workaround. Granted, I was running a RHEL kernel/userspace and building the RHEL GCC package; still, that doesn't fill me with confidence that the `CONFIG_RISCV_ISA_V_UCOPY_THRESHOLD=-1` workaround is going to work. I will also note that the Bianbu kernel, which I've been able to use (with RHEL userspace) to successfully build a RHEL GCC on K3, doesn't set that config option.
Owner

It sounds like it was decided that CONFIG_RISCV_ISA_V_UCOPY_THRESHOLD=-1 doesn't work and that success was maybe seen with an older version of gcc, so I canceled the scratch build.

The disabled THP build is still going, but I had forgotten we were carrying v1 of a patch to potentially resolve the problem, so if the build succeeds it unfortunately doesn't really tell us which might have allowed it to build successfully.

I removed CONFIG_RISCV_ISA_V_UCOPY_THRESHOLD=-1 from the config, updated the patch to v2 (https://lore.kernel.org/linux-riscv/20261020-vector_fpu_regs_status_rmw_fix-v2-1-474a59155e96@intel.com/), left THP enabled, and kicked off another scratch build. https://riscv-koji.fedoraproject.org/koji/taskinfo?taskID=389493

It sounds like it was decided that CONFIG_RISCV_ISA_V_UCOPY_THRESHOLD=-1 doesn't work and that success was maybe seen with an older version of gcc, so I canceled the scratch build. The disabled THP build is still going, but I had forgotten we were carrying v1 of a patch to potentially resolve the problem, so if the build succeeds it unfortunately doesn't really tell us which might have allowed it to build successfully. I removed CONFIG_RISCV_ISA_V_UCOPY_THRESHOLD=-1 from the config, updated the patch to v2 (https://lore.kernel.org/linux-riscv/20261020-vector_fpu_regs_status_rmw_fix-v2-1-474a59155e96@intel.com/), left THP enabled, and kicked off another scratch build. https://riscv-koji.fedoraproject.org/koji/taskinfo?taskID=389493
Owner

Using a kernel with the v2 patch mentioned above included, I was able to successfully build the RHEL GCC package on a K3 board running RHEL. So that looks very promising! I see that the Fedora GCC build that Jason kicked off is still going too, which is another encouraging sign.

Using a kernel with the v2 patch mentioned above included, I was able to successfully build the RHEL GCC package on a K3 board running RHEL. So that looks very promising! I see that the Fedora GCC build that Jason kicked off is still going too, which is another encouraging sign.
Owner

My scratch build failed with:

Linking f951 |============            | 50%
Linking go1 |============--          | 50%
/builddir/build/BUILD/gcc-16.2.1-build/gcc-16.2.1-20260819/obj-riscv64-redhat-linux/./prev-gcc/xg++ -B/builddir/build/BUILD/gcc-16.2.1-build/gcc-16.2.1-20260819/obj-riscv64-redhat-linux/./prev-gcc/ -B/usr/riscv64-redhat-linux/bin/ -nostdinc++ -B/builddir/build/BUILD/gcc-16.2.1-build/gcc-16.2.1-20260819/obj-riscv64-redhat-linux/prev-riscv64-redhat-linux/libstdc++-v3/src/.libs -B/builddir/build/BUILD/gcc-16.2.1-build/gcc-16.2.1-20260819/obj-riscv64-redhat-linux/prev-riscv64-redhat-linux/libstdc++-v3/libsupc++/.libs  -I/builddir/build/BUILD/gcc-16.2.1-build/gcc-16.2.1-20260819/obj-riscv64-redhat-linux/prev-riscv64-redhat-linux/libstdc++-v3/include/riscv64-redhat-linux  -I/builddir/build/BUILD/gcc-16.2.1-build/gcc-16.2.1-20260819/obj-riscv64-redhat-linux/prev-riscv64-redhat-linux/libstdc++-v3/include  -I/builddir/build/BUILD/gcc-16.2.1-build/gcc-16.2.1-20260819/libstdc++-v3/libsupc++ -L/builddir/build/BUILD/gcc-16.2.1-build/gcc-16.2.1-20260819/obj-riscv64-redhat-linux/prev-riscv64-redhat-linux/libstdc++-v3/src/.libs -L/builddir/build/BUILD/gcc-16.2.1-build/gcc-16.2.1-20260819/obj-riscv64-redhat-linux/prev-riscv64-redhat-linux/libstdc++-v3/libsupc++/.libs -no-pie   -O2 -fexceptions -g -grecord-gcc-switches -Wall -Wno-complain-wrong-lang -Wformat-security -Wp,-D_GLIBCXX_ASSERTIONS -fasynchronous-unwind-tables -fstack-clash-protection -flto=jobserver -frandom-seed=1 -flto=jobserver -frandom-seed=1 -DIN_GCC    -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-error=narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings  -DHAVE_CONFIG_H -no-pie -static-libstdc++ -static-libgcc  -o go1 \
      go/ast-dump.o go/embed.o go/escape.o go/export.o go/expressions.o go/go-backend.o go/go-diagnostics.o go/go-encode-id.o go/go-dump.o go/go-gcc.o go/go-gcc-diagnostics.o go/go-lang.o go/go-linemap.o go/go-optimize.o go/go-sha1.o go/go.o go/gogo.o go/import.o go/import-archive.o go/lex.o go/names.o go/parse.o go/runtime.o go/statements.o go/types.o go/unsafe.o go/wb.o attribs.o simple-diagnostic-path.o diagnostics/lazy-paths.o libbackend.a main.o libcommon-target.a libcommon.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a libcommon.a ../libcpp/libcpp.a   ../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a  -ldl -lmpc -lmpfr -lgmp -rdynamic  -lz -lzstd 
In function ‘copy’,
    inlined from ‘_S_copy’ at /builddir/build/BUILD/gcc-16.2.1-build/gcc-16.2.1-20260819/obj-riscv64-redhat-linux/prev-riscv64-redhat-linux/libstdc++-v3/include/bits/basic_string.h:457:21,
    inlined from ‘_S_copy’ at /builddir/build/BUILD/gcc-16.2.1-build/gcc-16.2.1-20260819/obj-riscv64-redhat-linux/prev-riscv64-redhat-linux/libstdc++-v3/include/bits/basic_string.h:452:7,
    inlined from ‘_S_copy_chars’ at /builddir/build/BUILD/gcc-16.2.1-build/gcc-16.2.1-20260819/obj-riscv64-redhat-linux/prev-riscv64-redhat-linux/libstdc++-v3/include/bits/basic_string.h:493:13,
    inlined from ‘_M_construct’ at /builddir/build/BUILD/gcc-16.2.1-build/gcc-16.2.1-20260819/obj-riscv64-redhat-linux/prev-riscv64-redhat-linux/libstdc++-v3/include/bits/basic_string.tcc:253:21,
    inlined from ‘__ct ’ at /builddir/build/BUILD/gcc-16.2.1-build/gcc-16.2.1-20260819/obj-riscv64-redhat-linux/prev-riscv64-redhat-linux/libstdc++-v3/include/bits/basic_string.h:738:14,
    inlined from ‘add_any_node_attrs’ at ../../gcc/diagnostics/digraphs-to-dot-from-cfg.cc:155:38:
/builddir/build/BUILD/gcc-16.2.1-build/gcc-16.2.1-20260819/obj-riscv64-redhat-linux/prev-riscv64-redhat-linux/libstdc++-v3/include/bits/char_traits.h:432:56: warning: ‘__builtin_memcpy’ reading between 16 and 9223372036854775805 bytes from a region of size 6 [-Wstringop-overread]
  432 |         return static_cast<char_type*>(__builtin_memcpy(__s1, __s2, __n));
      |                                                        ^
In member function ‘__ct ’,
    inlined from ‘make_table’ at ../../gcc/analyzer/access-diagram.cc:1801:18:
../../gcc/analyzer/store.h:330:5: warning: ‘MEM <long int> [(struct generic_wide_int *)&size_in_bytes + 8B]’ may be used uninitialized [-Wmaybe-uninitialized]
  330 |     m_size_in_bytes (size_in_bytes)
      |     ^
../../gcc/analyzer/access-diagram.cc: In member function ‘make_table’:
../../gcc/analyzer/access-diagram.cc:1797:28: note: ‘MEM <long int> [(struct generic_wide_int *)&size_in_bytes + 8B]’ was declared here
 1797 |                byte_size_t size_in_bytes
      |                            ^
during GIMPLE pass: dom
../../gcc/gimple-pretty-print.cc: In function ‘dump_gimple_assign’:
../../gcc/gimple-pretty-print.cc:634:1: internal compiler error: Segmentation fault
  634 | dump_gimple_assign (pretty_printer *pp, const gassign *gs, int spc,
      | ^
0x4159fff internal_error(char const*, ...)
	../../gcc/diagnostic-global-context.cc:787
0xbb2e95 crash_signal
	../../gcc/toplev.cc:328
0x11aeb58 global_range_query::range_of_expr(vrange&, tree_node*, gimple*)
	../../gcc/value-query.cc:551
0x119725b range_query::range_on_edge(vrange&, edge_def*, tree_node*)
	../../gcc/value-query.cc:41
0x532c67 fur_stmt::get_phi_operand(vrange&, tree_node*, edge_def*)
	../../gcc/gimple-range-fold.cc:119
0x53a947 fold_using_range::range_of_phi(vrange&, gphi*, fur_source&)
	../../gcc/gimple-range-fold.cc:1147
0x54eb47 fold_using_range::fold_stmt(vrange&, gimple*, fur_source&, tree_node*)
	../../gcc/gimple-range-fold.cc:683
0x54eedb fold_range(vrange&, gimple*, range_query*)
	../../gcc/gimple-range-fold.cc:321
0x5239d9 ranger_cache::range_of_def(vrange&, tree_node*, basic_block_def*)
	../../gcc/gimple-range-cache.cc:1179
0x529a45 ranger_cache::range_of_expr(vrange&, tree_node*, gimple*)
	../../gcc/gimple-range-cache.cc:1267
0x530ded gimple_ranger::range_of_expr(vrange&, tree_node*, gimple*)
	../../gcc/gimple-range.cc:132
0xdf8ad9 cprop_operand
	../../gcc/tree-ssa-dom.cc:2043
0xe076d1 cprop_into_stmt
	../../gcc/tree-ssa-dom.cc:2115
0xe076d1 dom_opt_dom_walker::optimize_stmt(basic_block_def*, gimple_stmt_iterator*, bool*)
	../../gcc/tree-ssa-dom.cc:2343
0xe09fef dom_opt_dom_walker::before_dom_children(basic_block_def*)
	../../gcc/tree-ssa-dom.cc:1753
0x3a601a5 dom_walker::walk(basic_block_def*)
	../../gcc/domwalk.cc:311
0xe057b7 execute
	../../gcc/tree-ssa-dom.cc:939
/builddir/build/BUILD/gcc-16.2.1-build/gcc-16.2.1-20260819/obj-riscv64-redhat-linux/./prev-gcc/lto1 -quiet -dumpbase ./go1.ltrans60.ltrans -misa-spec=20191213 -mtls-dialect=trad -mabi=lp64d -misa-spec=20191213 -mtls-dialect=trad -march=rv64imafdc_zicsr_zifencei_zmmul_zaamo_zalrsc_zca_zcd -march=rv64imafdc_zicsr_zifencei_zmmul_zaamo_zalrsc_zca_zcd -g -g -grecord-gcc-switches -O2 -O2 -Wno-complain-wrong-lang -Wextra -Wno-error=narrowing -Wpedantic -fno-openmp -fno-openacc -fcf-protection=none -fno-PIE -funwind-tables -fstack-clash-protection -frandom-seed=1 -frandom-seed=1 -fno-exceptions -fasynchronous-unwind-tables -fltrans /tmp/ccVh973o.ltrans60.o -o /tmp/ccmrpn2o.s
Please submit a full bug report, with preprocessed source.
Please include the complete backtrace with any bug report.
See <https://bugzilla.redhat.com/> for instructions.
make[4]: *** [/tmp/ccdXaXfc.mk:122: /tmp/ccVh973o.ltrans60.ltrans.o] Error 1
make[4]: *** Waiting for unfinished jobs....

lto-wrapper: fatal error: make returned 2 exit status
compilation terminated.
/usr/bin/ld.bfd: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
make[3]: *** [../../gcc/go/Make-lang.in:85: go1] Error 1
rm gcc.pod gfortran.pod ga68.pod gcov-dump.pod gcov-tool.pod fsf-funding.pod gccgo.pod gfdl.pod gpl.pod cpp.pod gcov.pod lto-dump.pod gdc.pod
make[3]: Leaving directory '/builddir/build/BUILD/gcc-16.2.1-build/gcc-16.2.1-20260819/obj-riscv64-redhat-linux/gcc'
make[2]: *** [Makefile:5373: all-stagetrain-gcc] Error 2
make[2]: Leaving directory '/builddir/build/BUILD/gcc-16.2.1-build/gcc-16.2.1-20260819/obj-riscv64-redhat-linux'
make[1]: *** [Makefile:31328: stagetrain-bubble] Error 2
make[1]: Leaving directory '/builddir/build/BUILD/gcc-16.2.1-build/gcc-16.2.1-20260819/obj-riscv64-redhat-linux'
make: *** [Makefile:31465: profiledbootstrap] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.8ZE54I (%build)
RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.8ZE54I (%build)
Child return code was: 1

Using

$ uname -r
7.2.13-200.0.riscv64.omni.fc44.riscv64

Which contains gitlab.com/jmontleon/kernel-ark/-@50c8abae88

My scratch build failed with: ``` Linking f951 |============ | 50% Linking go1 |============-- | 50% /builddir/build/BUILD/gcc-16.2.1-build/gcc-16.2.1-20260819/obj-riscv64-redhat-linux/./prev-gcc/xg++ -B/builddir/build/BUILD/gcc-16.2.1-build/gcc-16.2.1-20260819/obj-riscv64-redhat-linux/./prev-gcc/ -B/usr/riscv64-redhat-linux/bin/ -nostdinc++ -B/builddir/build/BUILD/gcc-16.2.1-build/gcc-16.2.1-20260819/obj-riscv64-redhat-linux/prev-riscv64-redhat-linux/libstdc++-v3/src/.libs -B/builddir/build/BUILD/gcc-16.2.1-build/gcc-16.2.1-20260819/obj-riscv64-redhat-linux/prev-riscv64-redhat-linux/libstdc++-v3/libsupc++/.libs -I/builddir/build/BUILD/gcc-16.2.1-build/gcc-16.2.1-20260819/obj-riscv64-redhat-linux/prev-riscv64-redhat-linux/libstdc++-v3/include/riscv64-redhat-linux -I/builddir/build/BUILD/gcc-16.2.1-build/gcc-16.2.1-20260819/obj-riscv64-redhat-linux/prev-riscv64-redhat-linux/libstdc++-v3/include -I/builddir/build/BUILD/gcc-16.2.1-build/gcc-16.2.1-20260819/libstdc++-v3/libsupc++ -L/builddir/build/BUILD/gcc-16.2.1-build/gcc-16.2.1-20260819/obj-riscv64-redhat-linux/prev-riscv64-redhat-linux/libstdc++-v3/src/.libs -L/builddir/build/BUILD/gcc-16.2.1-build/gcc-16.2.1-20260819/obj-riscv64-redhat-linux/prev-riscv64-redhat-linux/libstdc++-v3/libsupc++/.libs -no-pie -O2 -fexceptions -g -grecord-gcc-switches -Wall -Wno-complain-wrong-lang -Wformat-security -Wp,-D_GLIBCXX_ASSERTIONS -fasynchronous-unwind-tables -fstack-clash-protection -flto=jobserver -frandom-seed=1 -flto=jobserver -frandom-seed=1 -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-error=narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -no-pie -static-libstdc++ -static-libgcc -o go1 \ go/ast-dump.o go/embed.o go/escape.o go/export.o go/expressions.o go/go-backend.o go/go-diagnostics.o go/go-encode-id.o go/go-dump.o go/go-gcc.o go/go-gcc-diagnostics.o go/go-lang.o go/go-linemap.o go/go-optimize.o go/go-sha1.o go/go.o go/gogo.o go/import.o go/import-archive.o go/lex.o go/names.o go/parse.o go/runtime.o go/statements.o go/types.o go/unsafe.o go/wb.o attribs.o simple-diagnostic-path.o diagnostics/lazy-paths.o libbackend.a main.o libcommon-target.a libcommon.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a libcommon.a ../libcpp/libcpp.a ../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a -ldl -lmpc -lmpfr -lgmp -rdynamic -lz -lzstd In function ‘copy’, inlined from ‘_S_copy’ at /builddir/build/BUILD/gcc-16.2.1-build/gcc-16.2.1-20260819/obj-riscv64-redhat-linux/prev-riscv64-redhat-linux/libstdc++-v3/include/bits/basic_string.h:457:21, inlined from ‘_S_copy’ at /builddir/build/BUILD/gcc-16.2.1-build/gcc-16.2.1-20260819/obj-riscv64-redhat-linux/prev-riscv64-redhat-linux/libstdc++-v3/include/bits/basic_string.h:452:7, inlined from ‘_S_copy_chars’ at /builddir/build/BUILD/gcc-16.2.1-build/gcc-16.2.1-20260819/obj-riscv64-redhat-linux/prev-riscv64-redhat-linux/libstdc++-v3/include/bits/basic_string.h:493:13, inlined from ‘_M_construct’ at /builddir/build/BUILD/gcc-16.2.1-build/gcc-16.2.1-20260819/obj-riscv64-redhat-linux/prev-riscv64-redhat-linux/libstdc++-v3/include/bits/basic_string.tcc:253:21, inlined from ‘__ct ’ at /builddir/build/BUILD/gcc-16.2.1-build/gcc-16.2.1-20260819/obj-riscv64-redhat-linux/prev-riscv64-redhat-linux/libstdc++-v3/include/bits/basic_string.h:738:14, inlined from ‘add_any_node_attrs’ at ../../gcc/diagnostics/digraphs-to-dot-from-cfg.cc:155:38: /builddir/build/BUILD/gcc-16.2.1-build/gcc-16.2.1-20260819/obj-riscv64-redhat-linux/prev-riscv64-redhat-linux/libstdc++-v3/include/bits/char_traits.h:432:56: warning: ‘__builtin_memcpy’ reading between 16 and 9223372036854775805 bytes from a region of size 6 [-Wstringop-overread] 432 | return static_cast<char_type*>(__builtin_memcpy(__s1, __s2, __n)); | ^ In member function ‘__ct ’, inlined from ‘make_table’ at ../../gcc/analyzer/access-diagram.cc:1801:18: ../../gcc/analyzer/store.h:330:5: warning: ‘MEM <long int> [(struct generic_wide_int *)&size_in_bytes + 8B]’ may be used uninitialized [-Wmaybe-uninitialized] 330 | m_size_in_bytes (size_in_bytes) | ^ ../../gcc/analyzer/access-diagram.cc: In member function ‘make_table’: ../../gcc/analyzer/access-diagram.cc:1797:28: note: ‘MEM <long int> [(struct generic_wide_int *)&size_in_bytes + 8B]’ was declared here 1797 | byte_size_t size_in_bytes | ^ during GIMPLE pass: dom ../../gcc/gimple-pretty-print.cc: In function ‘dump_gimple_assign’: ../../gcc/gimple-pretty-print.cc:634:1: internal compiler error: Segmentation fault 634 | dump_gimple_assign (pretty_printer *pp, const gassign *gs, int spc, | ^ 0x4159fff internal_error(char const*, ...) ../../gcc/diagnostic-global-context.cc:787 0xbb2e95 crash_signal ../../gcc/toplev.cc:328 0x11aeb58 global_range_query::range_of_expr(vrange&, tree_node*, gimple*) ../../gcc/value-query.cc:551 0x119725b range_query::range_on_edge(vrange&, edge_def*, tree_node*) ../../gcc/value-query.cc:41 0x532c67 fur_stmt::get_phi_operand(vrange&, tree_node*, edge_def*) ../../gcc/gimple-range-fold.cc:119 0x53a947 fold_using_range::range_of_phi(vrange&, gphi*, fur_source&) ../../gcc/gimple-range-fold.cc:1147 0x54eb47 fold_using_range::fold_stmt(vrange&, gimple*, fur_source&, tree_node*) ../../gcc/gimple-range-fold.cc:683 0x54eedb fold_range(vrange&, gimple*, range_query*) ../../gcc/gimple-range-fold.cc:321 0x5239d9 ranger_cache::range_of_def(vrange&, tree_node*, basic_block_def*) ../../gcc/gimple-range-cache.cc:1179 0x529a45 ranger_cache::range_of_expr(vrange&, tree_node*, gimple*) ../../gcc/gimple-range-cache.cc:1267 0x530ded gimple_ranger::range_of_expr(vrange&, tree_node*, gimple*) ../../gcc/gimple-range.cc:132 0xdf8ad9 cprop_operand ../../gcc/tree-ssa-dom.cc:2043 0xe076d1 cprop_into_stmt ../../gcc/tree-ssa-dom.cc:2115 0xe076d1 dom_opt_dom_walker::optimize_stmt(basic_block_def*, gimple_stmt_iterator*, bool*) ../../gcc/tree-ssa-dom.cc:2343 0xe09fef dom_opt_dom_walker::before_dom_children(basic_block_def*) ../../gcc/tree-ssa-dom.cc:1753 0x3a601a5 dom_walker::walk(basic_block_def*) ../../gcc/domwalk.cc:311 0xe057b7 execute ../../gcc/tree-ssa-dom.cc:939 /builddir/build/BUILD/gcc-16.2.1-build/gcc-16.2.1-20260819/obj-riscv64-redhat-linux/./prev-gcc/lto1 -quiet -dumpbase ./go1.ltrans60.ltrans -misa-spec=20191213 -mtls-dialect=trad -mabi=lp64d -misa-spec=20191213 -mtls-dialect=trad -march=rv64imafdc_zicsr_zifencei_zmmul_zaamo_zalrsc_zca_zcd -march=rv64imafdc_zicsr_zifencei_zmmul_zaamo_zalrsc_zca_zcd -g -g -grecord-gcc-switches -O2 -O2 -Wno-complain-wrong-lang -Wextra -Wno-error=narrowing -Wpedantic -fno-openmp -fno-openacc -fcf-protection=none -fno-PIE -funwind-tables -fstack-clash-protection -frandom-seed=1 -frandom-seed=1 -fno-exceptions -fasynchronous-unwind-tables -fltrans /tmp/ccVh973o.ltrans60.o -o /tmp/ccmrpn2o.s Please submit a full bug report, with preprocessed source. Please include the complete backtrace with any bug report. See <https://bugzilla.redhat.com/> for instructions. make[4]: *** [/tmp/ccdXaXfc.mk:122: /tmp/ccVh973o.ltrans60.ltrans.o] Error 1 make[4]: *** Waiting for unfinished jobs.... lto-wrapper: fatal error: make returned 2 exit status compilation terminated. /usr/bin/ld.bfd: error: lto-wrapper failed collect2: error: ld returned 1 exit status make[3]: *** [../../gcc/go/Make-lang.in:85: go1] Error 1 rm gcc.pod gfortran.pod ga68.pod gcov-dump.pod gcov-tool.pod fsf-funding.pod gccgo.pod gfdl.pod gpl.pod cpp.pod gcov.pod lto-dump.pod gdc.pod make[3]: Leaving directory '/builddir/build/BUILD/gcc-16.2.1-build/gcc-16.2.1-20260819/obj-riscv64-redhat-linux/gcc' make[2]: *** [Makefile:5373: all-stagetrain-gcc] Error 2 make[2]: Leaving directory '/builddir/build/BUILD/gcc-16.2.1-build/gcc-16.2.1-20260819/obj-riscv64-redhat-linux' make[1]: *** [Makefile:31328: stagetrain-bubble] Error 2 make[1]: Leaving directory '/builddir/build/BUILD/gcc-16.2.1-build/gcc-16.2.1-20260819/obj-riscv64-redhat-linux' make: *** [Makefile:31465: profiledbootstrap] Error 2 error: Bad exit status from /var/tmp/rpm-tmp.8ZE54I (%build) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.8ZE54I (%build) Child return code was: 1 ``` Using ``` $ uname -r 7.2.13-200.0.riscv64.omni.fc44.riscv64 ``` Which contains https://gitlab.com/jmontleon/kernel-ark/-/commit/50c8abae88c07def8730298a9806be675b44c36d
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
riscv/planning#36
No description provided.