Issue #636 has been updated by Rahul Arasikere.

Leaving a note for anyone who shows up here for having the same build issue.
Using host GCC >= 16, using the host compiler will fail to build GCC target 
compiler as libcody will fail to build.
This is due to char8_t no longer being treated as char in the new C++ spec (c++ 
20 spec). You will need to specify -fno-char8_t to compile this but I was not 
sure how to insert the extra flag into the build command.

I solved this issue by adding `GCC_OPTIONS="CXXFLAGS=-fno-char8_t"`. This feels 
really hacky but it will add "-fno-char8_t" to the gcc build command allowing 
you to solve the above error.

I figured this out by looking at the buildgcc script in util/crossgcc and 
figuring out what environment variable I can target.

So your final build command looks like:  `make crossgcc-i386 
GCC_OPTIONS="CXXFLAGS=-fno-char8_t" CPUS=$(nproc)`

I am using GCC v16.1.1 on fedora 44 trying to build GCC 15.2 for coreboot.

----------------------------------------
Support #636: Building GCC v14.2.0 for target ... failed. Check 
'build-i386-elf-GCC/build.log'.
https://ticket.coreboot.org/issues/636#change-2283

* Author: Ahmet Ozkesek
* Status: Closed
* Priority: Low
* Assignee: Ahmet Ozkesek
* Category: build system
* Target version: none
* Start date: 2026-03-22
----------------------------------------
Hi all,

Thank you for coreboot, first of all.

I am looking for building coreboot with u-boot payload.
I started from scratch as documented on my Fedora 44 beta system.

I hit the error below, -please scroll-down for it- and hoping that 
someone already either fixed or done a workaround for this making 
crossgcc-i386.  

I somewhat did workaround for -V command-line argument error for 
gnatgcc and g++, and got version info out there, but no lock for 
this `error: no matching function for call to 'S2C(const char8_t [2])` .

I attached config&build log from util/crossgcc/build-i386-elf-GCC.

Welcome to the coreboot cross toolchain builder v2026-01-30_235bb1e617 

Building toolchain using 10 thread(s).

Target architecture is i386-elf

Found compatible Ada compiler, enabling Ada support by default.

Downloading and verifying tarballs ...
 * gmp-6.3.0.tar.xz (cached)... hash verified 
(b4043dd2964ab1a858109da85c44de224384f352)
 * mpfr-4.2.2.tar.xz (cached)... hash verified 
(a63a264b273a652e27518443640e69567da498ce)
 * mpc-1.3.1.tar.gz (cached)... hash verified 
(bac1c1fa79f5602df1e29e4684e103ad55714e02)
 * binutils-2.45.tar.xz (cached)... hash verified 
(09fd8a50a95be4a94412fe3847d16280996679c5)
 * gcc-14.2.0.tar.xz (cached)... hash verified 
(d91ecc3d20ce6298bd95f9b09cc51dc6d3c73ae3)
Downloaded tarballs ... ok
Unpacking and patching ...
 * gmp-6.3.0.tar.xz
   o gmp-6.3.0_fix-c23-prototypes.patch
   o gmp-6.3.0_generic-build.patch
 * mpfr-4.2.2.tar.xz
 * mpc-1.3.1.tar.gz
 * binutils-2.45.tar.xz
   o binutils-2.45_as-ipxe.patch
   o binutils-2.45_no-makeinfo.patch
 * gcc-14.2.0.tar.xz
   o gcc-14.2.0_asan_shadow_offset_callback.patch
   o gcc-14.2.0_gnat.patch
   o gcc-14.2.0_libcpp.patch
   o gcc-14.2.0_libgcc.patch
   o gcc-14.2.0_musl_poisoned_calloc.patch
   o gcc-14.2.0_rv32iafc.patch
Unpacked and patched ... ok
Building packages ...
Building GMP v6.3.0 for host ... ok
Building MPFR v4.2.2 for host ... ok
Building MPC v1.3.1 for host ... ok
Building BINUTILS v2.45 for target ... ok
Building GCC v14.2.0 for target ... failed. Check 
'build-i386-elf-GCC/build.log'.
make[2]: *** [Makefile:20: build_gcc] Error 1
make[1]: *** [Makefile:36: build-i386] Error 2
make: *** [util/crossgcc/Makefile.mk:32: crossgcc-i386] Error 2

---Files--------------------------------
config.log (39.2 KB)
build.log (284 KB)


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
https://ticket.coreboot.org/my/account
_______________________________________________
coreboot mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to