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