diff --git a/Makefile.dep b/Makefile.dep index 0ff91fe2d36194748b9d46727739508c6618e653..6ee5f19892f4244250eee11d4cee7e2c2984a3a9 100644 --- a/Makefile.dep +++ b/Makefile.dep @@ -270,6 +270,11 @@ ifneq (,$(filter gnrc_pktdump,$(USEMODULE))) endif ifneq (,$(filter newlib,$(USEMODULE))) + # allow custom newlib syscalls implementations by adding + # newlib_syscalls_XXX to USEMODULE + ifeq (,$(filter newlib_syscalls_%,$(USEMODULE))) + USEMODULE += newlib_syscalls_default + endif USEMODULE += uart_stdio endif diff --git a/sys/Makefile.include b/sys/Makefile.include index eb3523ce0e3a36dea6d5032334467094749651c0..b0f203d0c3670631a56213f690c3f69e13fe33f8 100644 --- a/sys/Makefile.include +++ b/sys/Makefile.include @@ -61,7 +61,7 @@ ifneq (,$(filter log_%,$(USEMODULE))) include $(RIOTBASE)/sys/log/Makefile.include endif -ifneq (,$(filter newlib,$(USEMODULE))) +ifneq (,$(filter newlib_syscalls_default,$(USEMODULE))) include $(RIOTBASE)/sys/newlib/Makefile.include endif diff --git a/sys/newlib/Makefile b/sys/newlib/Makefile index 48422e909a47d7cd428d10fa73825060ccc8d8c2..586bc62601f730c33345fc66f7f1acda95dd0eb4 100644 --- a/sys/newlib/Makefile +++ b/sys/newlib/Makefile @@ -1 +1,3 @@ +MODULE = newlib_syscalls_default + include $(RIOTBASE)/Makefile.base diff --git a/sys/newlib/Makefile.include b/sys/newlib/Makefile.include index 9a497e610247e7375f2163522eafe60e680a3290..28197b32798a56ffed358bbf02fa8859be31f891 100644 --- a/sys/newlib/Makefile.include +++ b/sys/newlib/Makefile.include @@ -1,4 +1,4 @@ -UNDEF := $(BINDIR)newlib/syscalls.o $(UNDEF) +UNDEF := $(BINDIR)newlib_syscalls_default/syscalls.o $(UNDEF) # Search for Newlib include directories