[coreboot] Problem in building the toolchain with gcc-8.1

Akendo akendo at akendo.eu
Tue Jun 5 12:58:20 CEST 2018

Hello everyone,

I currently having a problem build the toolchain from a freshly checkout
coreboot repository. I've tried to build with different options: For
example with all platforms and only with i386 support. Multi core
(CPUS=4) and with a single core. Here an example build:

Building toolchain using 1 thread(s).

Target architecture is i386-elf

Found compatible Ada compiler, enabling Ada support by default.

Downloading and verifing tarballs ...
 * gmp-6.1.2.tar.xz (cached)... hash verified

 * mpfr-3.1.5.tar.xz (cached)... hash verified

 * mpc-1.0.3.tar.gz (cached)... hash verified

 * binutils-2.29.1.tar.xz (cached)... hash verified

 * gcc-6.3.0.tar.bz2 (cached)... hash verified

Downloaded tarballs ... ok
Unpacking and patching ...
 * gmp-6.1.2.tar.xz
   o gmp-6.1.2_freebsd-configure.patch
 * mpfr-3.1.5.tar.xz
 * mpc-1.0.3.tar.gz
 * binutils-2.29.1.tar.xz
   o binutils-2.29.1_mips-gold.patch
   o binutils-2.29.1_no-bfd-doc.patch
 * gcc-6.3.0.tar.bz2
   o gcc-6.3.0_ada-musl_workaround.patch
   o gcc-6.3.0_ada-raise.patch
   o gcc-6.3.0_elf_biarch.patch
   o gcc-6.3.0_gnat.patch
   o gcc-6.3.0_libgcc.patch
   o gcc-6.3.0_memmodel.patch
   o gcc-6.3.0_nds32_ite.patch
   o gcc-6.3.0_no-p-var.patch
   o gcc-6.3.0_pointer_integer.patch
   o gcc-6.3.0_riscv.patch
Unpacked and patched ... ok
Building packages ...
Building GMP v6.1.2 for host ... ok
Building MPFR v3.1.5 for host ... ok
Building MPC v1.0.3 for host ... ok
Building BINUTILS v2.29.1 for target ... ok
Building GCC v6.3.0 for target ... failed. Check

make[3]: *** [Makefile:26: build_gcc] Error 1
make[2]: *** [Makefile:48: build-i386] Error 2
make[1]: *** [Makefile:16: all_without_gdb] Error 2
make: *** [util/crossgcc/Makefile.inc:37: crossgcc] Error 2

I also tried to do this with clang, with similar result.

Here is the log from clang:

[ 52%] Building CXX object

In function 'int __s$
error: aggreg$
te 'sigaltstack handler_stack' has incomplete type and cannot be defined
   struct sigaltstack handler_stack;
make[2]: ***
Error 1
make[1]: *** [CMakeFiles/Makefile2:14006:
Error 2
make: *** [Makefile:152: all] Error 2
./buildgcc: line 840: cd:
/home/akendo/src/coreboot/util/crossgcc/xgcc/lib/clang/4.0.0/lib: No
such file or directory

A look into the build log from GCC seems to disclose a similar error:

make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory
make[1]: Entering directory
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory
make[1]: Entering directory
gnatgcc -c -O2  -fomit-frame-pointer -m64   -gnatpg -gnatwG  -W -Wall
-nostdinc -I- -I. -Iada/generated -Iada -I../../gcc-6.3.0/gcc/ada
../../gcc-6.3.0/gcc/ada/aspects.adb -o ada/aspects.o
aspects.adb:38:29: warning: use clause for package "HTable" has no effect
make[1]: *** [../../gcc-6.3.0/gcc/ada/gcc-interface/Make-lang.in:119:
ada/aspects.o] Error 1
make[1]: Leaving directory
make: *** [Makefile:4108: all-gcc] Error 2
/bin/sh ../gcc-6.3.0/mkinstalldirs
/bin/sh: line 3: cd: i386-elf/libgcc: No such file or directory
make: *** [Makefile:10796: install-target-libgcc] Error 1

I'm using ArchLinux with a Linux kernel 4.16.13-1 and gcc 8.1.0-1,
gcc-ada 8.1.0-1

I checkout the git code in different version (4.8, 4.8.1, latest master
commit). I quite sure that's the problem is the compiler. However I do
not know how to fix this in the moment.

I added the compressed logs from the  i386-elf build. Hope this can
help. Thank you for reading.

best regards,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build-i386-elf-GCC_build.log.7z
Type: application/x-7z-compressed
Size: 81436 bytes
Desc: not available
URL: <http://mail.coreboot.org/pipermail/coreboot/attachments/20180605/5687bd40/attachment-0001.7z>

More information about the coreboot mailing list