From 45270dada0af1269f8499f04e4f82329230e6944 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Wed, 14 Oct 2020 11:08:36 +0200 Subject: [PATCH] cpu/fe310: blacklist picolibc on CI The RISC-V toolchain in riotdocker has issues with picolibc and will still include newlib headers. This leads to conflicts like ``` In file included from [01m[Knanostubs.c:22[m[K: [01m[K/usr/local/picolibc/riscv-none-embed/include/stdio.h:270:23:[m[K [01;31m[Kerror: [m[Kconflicting types for '[01m[K__FILE[m[K' typedef struct __file [01;31m[K__FILE[m[K; [01;31m[K^~~~~~[m[K In file included from [01m[K/opt/gnu-mcu-eclipse/riscv-none-gcc/8.2.0-2.2-20190521-0004/riscv-none-embed/include/reent.h:93[m[K, from [01m[Knanostubs.c:20[m[K: [01m[K/opt/gnu-mcu-eclipse/riscv-none-gcc/8.2.0-2.2-20190521-0004/riscv-none-embed/include/sys/reent.h:287:26:[m[K [01;36m[Knote: [m[Kprevious declaration of '[01m[K__FILE[m[K' was here typedef struct __sFILE [01;36m[K__FILE[m[K; [01;36m[K^~~~~~[m[K ``` The problem does not occur when installing both the toolchain and picolibc directly from the Debian / Ubuntu repositories, but CI uses an older Ubuntu version that does not have those packages yet, so it builds them manually. Blacklist RISC-V until CI has been updated. --- cpu/fe310/Kconfig | 2 +- cpu/fe310/Makefile.features | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cpu/fe310/Kconfig b/cpu/fe310/Kconfig index 1dc1554eac..d1be703e52 100644 --- a/cpu/fe310/Kconfig +++ b/cpu/fe310/Kconfig @@ -8,7 +8,7 @@ config CPU_ARCH_RISCV bool select HAS_ARCH_RISCV - select HAS_PICOLIBC + select HAS_PICOLIBC if '$(RIOT_CI_BUILD)' != '1' config CPU_CORE_RV32M bool diff --git a/cpu/fe310/Makefile.features b/cpu/fe310/Makefile.features index b60d9bd97e..5830696231 100644 --- a/cpu/fe310/Makefile.features +++ b/cpu/fe310/Makefile.features @@ -7,5 +7,9 @@ FEATURES_PROVIDED += periph_gpio periph_gpio_irq FEATURES_PROVIDED += periph_plic FEATURES_PROVIDED += periph_pm FEATURES_PROVIDED += periph_wdt -FEATURES_PROVIDED += picolibc FEATURES_PROVIDED += ssp + +# RISC-V toolchain on CI does not work properly with picolibc yet +ifeq (,$(RIOT_CI_BUILD)) + FEATURES_PROVIDED += picolibc +endif