From bdfda031c5140a40df849ea018af217a54842659 Mon Sep 17 00:00:00 2001 From: Francisco Molina Date: Wed, 24 Jun 2020 15:26:50 +0200 Subject: [PATCH] cpu/mips32r2_common: include newlib_syscalls_mips_uhi in Makefile.dep --- boards/6lowpan-clicker/Makefile.dep | 2 ++ boards/6lowpan-clicker/Makefile.include | 1 - boards/pic32-wifire/Makefile.dep | 2 ++ boards/pic32-wifire/Makefile.include | 1 - cpu/mips32r2_common/Makefile.dep | 7 ++----- cpu/mips32r2_common/Makefile.include | 8 +++----- 6 files changed, 9 insertions(+), 12 deletions(-) diff --git a/boards/6lowpan-clicker/Makefile.dep b/boards/6lowpan-clicker/Makefile.dep index 5472bf8b8d..2fa80dd76e 100644 --- a/boards/6lowpan-clicker/Makefile.dep +++ b/boards/6lowpan-clicker/Makefile.dep @@ -1,3 +1,5 @@ ifneq (,$(filter saul_default,$(USEMODULE))) USEMODULE += saul_gpio endif + +USEMODULE += newlib_syscalls_mips_uhi diff --git a/boards/6lowpan-clicker/Makefile.include b/boards/6lowpan-clicker/Makefile.include index e694dc7d5f..7d98f6ccb5 100644 --- a/boards/6lowpan-clicker/Makefile.include +++ b/boards/6lowpan-clicker/Makefile.include @@ -1,5 +1,4 @@ APPDEPS += $(RIOTCPU)/$(CPU)/$(CPU_MODEL)/$(CPU_MODEL).S -USE_UHI_SYSCALLS = 1 # use pic32prog by default to program this board PROGRAMMER ?= pic32prog diff --git a/boards/pic32-wifire/Makefile.dep b/boards/pic32-wifire/Makefile.dep index 5472bf8b8d..2fa80dd76e 100644 --- a/boards/pic32-wifire/Makefile.dep +++ b/boards/pic32-wifire/Makefile.dep @@ -1,3 +1,5 @@ ifneq (,$(filter saul_default,$(USEMODULE))) USEMODULE += saul_gpio endif + +USEMODULE += newlib_syscalls_mips_uhi diff --git a/boards/pic32-wifire/Makefile.include b/boards/pic32-wifire/Makefile.include index 3a9a5e83d2..3e77e46d03 100644 --- a/boards/pic32-wifire/Makefile.include +++ b/boards/pic32-wifire/Makefile.include @@ -1,5 +1,4 @@ APPDEPS += $(RIOTCPU)/$(CPU)/$(CPU_MODEL)/$(CPU_MODEL).S -USE_UHI_SYSCALLS = 1 PORT_LINUX ?= /dev/ttyUSB0 include $(RIOTMAKE)/tools/serial.inc.mk diff --git a/cpu/mips32r2_common/Makefile.dep b/cpu/mips32r2_common/Makefile.dep index af49a8d526..04339d6bec 100644 --- a/cpu/mips32r2_common/Makefile.dep +++ b/cpu/mips32r2_common/Makefile.dep @@ -5,10 +5,7 @@ USEMODULE += newlib # mips32 needs periph_timer for its gettimeofday() implementation FEATURES_REQUIRED += periph_timer -ifeq ($(USE_UHI_SYSCALLS),1) - #Use UHI to handle syscalls - USEMODULE += newlib_syscalls_mips_uhi -else - #Use RIOT to handle syscalls (default) +#Use RIOT to handle syscalls (default) +ifeq (,$(filter newlib_syscalls_mips_uhi,$(USEMODULE))) USEMODULE += newlib_syscalls_default endif diff --git a/cpu/mips32r2_common/Makefile.include b/cpu/mips32r2_common/Makefile.include index 5ad9e95238..bc0a62e75f 100644 --- a/cpu/mips32r2_common/Makefile.include +++ b/cpu/mips32r2_common/Makefile.include @@ -1,7 +1,5 @@ INCLUDES += -I$(RIOTCPU)/mips32r2_common/include -ifeq ($(USE_UHI_SYSCALLS),1) - #Use UHI to handle syscalls - LINKFLAGS += -luhi - CFLAGS += -DHAVE_HEAP_STATS -endif +# NOTE: This can be turned into normal conditional syntax once #9913 is fixed +CFLAGS += $(if $(filter newlib_syscalls_mips_uhi,$(USEMODULE)),-DHAVE_HEAP_STATS,) +LINKFLAGS += $(if $(filter newlib_syscalls_mips_uhi,$(USEMODULE)),-luhi,)