[coreboot] How to build coreboot with alternate toolchain?

Paul Menzel paulepanter at users.sourceforge.net
Thu May 12 22:03:14 CEST 2016


Dear coreboot folks,


GCC 6 is in Debian Sid/unstable [1] in parallel to the default GCC 5.3.
The binary is `/usr/bin/gcc-6`. I’d like to quickly test this with
coreboot to see if everything still builds and runs fine.

Running `make HOSTCC=gcc-6 CC=gcc-6` partially works. GCC 6 is used for
the utilities, but not for building coreboot.

```
$ gcc --version
gcc (Debian 5.3.1-19) 5.3.1 20160509
[…]
$ gcc-6 --version
gcc-6 (Debian 6.1.1-3) 6.1.1 20160511
[…]
$ make HOSTCC=gcc-6 CC=gcc-6
    CC         ramstage/console/post.o
gcc -MMD -Isrc -Isrc/include -Isrc/commonlib/include -Ibuild -Isrc/device/oprom/include -I3rdparty/vboot/firmware/include -include src/include/kconfig.h -I3rdparty -Isrc/arch/x86/include -Isrc/mainboard/asrock/e350m1 -Isrc/vendorcode/amd/agesa/f14 -Isrc/vendorcode/amd/agesa/f14/../common -Isrc/vendorcode/amd/agesa/f14/Include -Isrc/vendorcode/amd/agesa/f14/Lib -Isrc/vendorcode/amd/agesa/f14/Legacy -Isrc/vendorcode/amd/agesa/f14/Proc/Common -Isrc/vendorcode/amd/agesa/f14/Proc/CPU -Isrc/vendorcode/amd/agesa/f14/Proc/CPU/Family -Isrc/vendorcode/amd/agesa/f14/Proc/CPU/Family/0x14 -Isrc/vendorcode/amd/agesa/f14/Proc/CPU/Family/0x14/ON -Isrc/vendorcode/amd/agesa/f14/Proc/CPU/Feature  -Isrc/vendorcode/amd/agesa/f14/Proc/GNB -Isrc/vendorcode/amd/agesa/f14/Proc/GNB/Common -Isrc/vendorcode/amd/agesa/f14/Proc/GNB/Gfx -Isrc/vendorcode/amd/agesa/f14/Proc/GNB/Gfx/Family -Isrc/vendorcode/amd/agesa/f14/Proc/GNB/Modules/GnbCommonLib -Isrc/vendorcode/amd/agesa/f14/Proc/GNB/Nb -Isrc/vendorcode/amd/agesa/f14/Proc/GNB/Nb/Family -Isrc/vendorcode/amd/agesa/f14/Proc/GNB/Nb/Family/0x14 -Isrc/vendorcode/amd/agesa/f14/Proc/GNB/Nb/Feature -Isrc/vendorcode/amd/agesa/f14/Proc/GNB/PCIe -Isrc/vendorcode/amd/agesa/f14/Proc/GNB/PCIe/Family -Isrc/vendorcode/amd/agesa/f14/Proc/GNB/PCIe/Family/0x14 -Isrc/vendorcode/amd/agesa/f14/Proc/GNB/PCIe/Feature -Isrc/vendorcode/amd/agesa/f14/Proc/HT -Isrc/vendorcode/amd/agesa/f14/Proc/IDS -Isrc/vendorcode/amd/agesa/f14/Proc/Mem -Isrc/vendorcode/amd/agesa/f14/Proc/Mem/NB/ON -Isrc/vendorcode/amd/agesa/f14/Proc/Recovery/GNB -Isrc/vendorcode/amd/agesa/f14/Proc/Recovery/CPU -Isrc/vendorcode/amd/agesa/f14/Proc/Recovery/Mem -Isrc/mainboard/asrock/e350m1 -Isrc/southbridge/amd/cimx/sb800 -Isrc/include/cpu/amd/common -Isrc/vendorcode/amd/cimx/sb800 -D__ARCH_x86_32__ -pipe -g -nostdinc -nostdlib -Wall -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -Wredundant-decls -Wno-trigraphs -Wstrict-aliasing -Wshadow -Wdate-time -fno-common -ffreestanding -fno-builtin -fomit-frame-pointer -ffunction-sections -fdata-sections -Wno-unused-but-set-variable -Werror -Os -m32  -fuse-ld=bfd -fno-stack-protector -Wl,--build-id=none -march=i686 -mno-mmx  -march=k8-sse3 -mtune=k8-sse3 -fno-zero-initialized-in-bss -fno-strict-aliasing -MT build/ramstage/console/post.o -D__RAMSTAGE__ -c -o build/ramstage/console/post.o src/console/post.c
[…]
    HOSTCC     cbfstool/rmodtool (link)
gcc-6  -o build/util/cbfstool/rmodtool build/util/cbfstool/rmodtool.o build/util/cbfstool/rmodule.o build/util/cbfstool/common.o build/util/cbfstool/elfheaders.o build/util/cbfstool/xdr.o
cp build/util/cbfstool/rmodtool build/rmodtool
printf "\nBuilt %s (%s)\n" "asrock/e350m1" \
```

What variable do I need to set, so that GCC 6 is used for everything?


Thanks,

Paul


PS: I am well aware, that only the coreboot toolchain is officially
supported, but I have good experiences with the Debian toolchain on the
ASRock E350M1 and Lenovo X60, and it really saves me the time of
building the toolchain myself, which takes quite some time on the
ASRock E350M1 and Lenovo X60.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20160512/e96f08eb/attachment-0001.asc>


More information about the coreboot mailing list