Project

General

Profile

Actions

Support #636

closed
AO AO

Building GCC v14.2.0 for target ... failed. Check 'build-i386-elf-GCC/build.log'.

Support #636: Building GCC v14.2.0 for target ... failed. Check 'build-i386-elf-GCC/build.log'.

Added by Ahmet Ozkesek about 1 month ago. Updated 24 days ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
build system
Target version:
Start date:
03/22/2026
Due date:
% Done:

100%

Estimated time:
Affected versions:
Needs backport to:
Affected hardware:
Affected OS:

Description

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) config.log Ahmet Ozkesek, 03/22/2026 10:35 AM
build.log (284 KB) build.log Ahmet Ozkesek, 03/22/2026 10:35 AM

AO Updated by Ahmet Ozkesek about 1 month ago Actions #1

Update-1:
I managed to make clang instead of crossgcc-i386.

  • In case of a backup plan-b I got coreboot-sdk container. -
    Made nconfig, then only changed u-boot as payload other then
    defaults. Now I got error you can see below. I am digging
    from here now, if I missed some elf-tools.

Some help still much appreciated.

MAKE       U-Boot v2025.07

objcopy: lib/efi_loader/helloworld_efi.so: file format not recognized
make[5]: *** [scripts/Makefile.lib:494: lib/efi_loader/helloworld.efi] Error 1
make[4]: *** [/home/aozkesek/fw/coreboot/payloads/external/U-Boot/u-boot/scripts/Makefile.build:398: lib/efi_loader] Error 2
make[3]: *** [/home/aozkesek/fw/coreboot/payloads/external/U-Boot/u-boot/Makefile:1919: lib] Error 2
make[2]: *** [Makefile:177: sub-make] Error 2
make[1]: *** [Makefile:49: build] Error 2
make: *** [payloads/external/Makefile.mk:341: payloads/external/U-Boot/build/u-boot.bin] Error 2

AO Updated by Ahmet Ozkesek about 1 month ago ยท Edited Actions #2

Looks like backup plan-b, coreboot-sdk container, solves the pain-in-the-neck.

You may now ignore this, as I will go for full container.

Update : coreboot-sdk container is still lets me down, built my own container instead.
Hope this help out for someone.

Update-2 : finally I managed to compile coreboot with u-boot it's payload, then
saw it's booting with qemu. I deleted previous update, add this one instead.

Here are the steps I followed;

  1. this is the container I built first, named it as "cross-compile:d13" ;

--- copy starts here --------------
FROM debian:13

VOLUME /home/cross-compile
WORKDIR /home/cross-compile

RUN <<EOT
set -e

apt update
apt upgrade -y

apt install -y bison flex gettext git m4 make bzip2 curl bc wget patch python3
crossbuild-essential-armhf crossbuild-essential-arm64 device-tree-compiler
autoconf automake autopoint autoconf-archive pkg-config unifont golang
libelf-dev libssl-dev python3-dev libnss3-dev libncurses-dev zlib1g-dev
libfreetype-dev libcmocka-dev libgnutls28-dev u-boot-tools gnat

EOT

CMD /bin/bash
---copy ends here------

  1. created a container volume, named it cross-compile as well.
  2. ran the container, used the volume, so all the next steps things are permanent.
  3. inside the container, cloned the coreboot source, from it's repo, then,
    4.1. made the crossgcc-i386 first, -I used BUILD_LANGUAGES=c -
    4.2. followed the guideline, with one exemption, that was configured u-boot as payload
    4.3. made it, then got it coreboot.rom that can I used as bios for qemu.

So I will close this issue, as it is not an issue anymore.

AO Updated by Ahmet Ozkesek 24 days ago Actions #3

  • Status changed from New to Needs Testing
  • Assignee set to Ahmet Ozkesek
  • % Done changed from 0 to 100

AO Updated by Ahmet Ozkesek 24 days ago Actions #4

  • Status changed from Needs Testing to Closed
Actions

Also available in: PDF Atom