From a75ae3c9384a5c84f1659eeb8b47e698fe533261 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Wed, 25 Aug 2021 10:53:00 +0200 Subject: [PATCH] cpu/riscv_common: move C lib selection to common place --- cpu/fe310/Makefile.dep | 7 ------- cpu/gd32v/Makefile.dep | 10 ++-------- cpu/riscv_common/Makefile.dep | 7 +++++++ 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/cpu/fe310/Makefile.dep b/cpu/fe310/Makefile.dep index b3097f251e..684361a387 100644 --- a/cpu/fe310/Makefile.dep +++ b/cpu/fe310/Makefile.dep @@ -1,10 +1,3 @@ - -FEATURES_REQUIRED_ANY += newlib|picolibc -ifneq (,$(filter newlib,$(USEMODULE))) - DEFAULT_MODULE += newlib_nano - USEMODULE += newlib_syscalls_default -endif - USEMODULE += periph USEMODULE += sifive_drivers_fe310 diff --git a/cpu/gd32v/Makefile.dep b/cpu/gd32v/Makefile.dep index b5500510a4..7ac5b8a1aa 100644 --- a/cpu/gd32v/Makefile.dep +++ b/cpu/gd32v/Makefile.dep @@ -1,12 +1,6 @@ -FEATURES_REQUIRED += periph_clic -FEATURES_REQUIRED_ANY += newlib|picolibc -ifneq (,$(filter newlib,$(USEMODULE))) - USEMODULE += newlib_nano - USEMODULE += newlib_syscalls_default -endif - USEMODULE += periph -USEMODULE += riscv_common + +FEATURES_REQUIRED += periph_clic ifneq (,$(filter periph_pm,$(USEMODULE))) FEATURES_REQUIRED += periph_wdt diff --git a/cpu/riscv_common/Makefile.dep b/cpu/riscv_common/Makefile.dep index 70aa523b8c..a141e51efc 100644 --- a/cpu/riscv_common/Makefile.dep +++ b/cpu/riscv_common/Makefile.dep @@ -1,3 +1,10 @@ +# Select a C library +FEATURES_REQUIRED_ANY += newlib|picolibc +ifneq (,$(filter newlib,$(USEMODULE))) + DEFAULT_MODULE += newlib_nano + USEMODULE += newlib_syscalls_default +endif + # Tell the build system that the CPU depends on the risc-v common files: USEMODULE += riscv_common