From b81b66672eae56f3836efc3aa55ce88db9530f9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Nohlg=C3=A5rd?= Date: Wed, 1 Mar 2017 10:03:41 +0100 Subject: [PATCH] newlib: Split newlib into one generic part and one default syscalls part --- sys/newlib/Makefile.include => makefiles/libc/newlib.mk | 4 +--- sys/Makefile.include | 6 +++++- sys/{newlib => newlib_syscalls_default}/Makefile | 2 -- sys/newlib_syscalls_default/Makefile.include | 1 + sys/{newlib => newlib_syscalls_default}/syscalls.c | 0 5 files changed, 7 insertions(+), 6 deletions(-) rename sys/newlib/Makefile.include => makefiles/libc/newlib.mk (97%) rename sys/{newlib => newlib_syscalls_default}/Makefile (50%) create mode 100644 sys/newlib_syscalls_default/Makefile.include rename sys/{newlib => newlib_syscalls_default}/syscalls.c (100%) diff --git a/sys/newlib/Makefile.include b/makefiles/libc/newlib.mk similarity index 97% rename from sys/newlib/Makefile.include rename to makefiles/libc/newlib.mk index 2e1c6b8cf9..4d8a784a1e 100644 --- a/sys/newlib/Makefile.include +++ b/makefiles/libc/newlib.mk @@ -1,5 +1,3 @@ -UNDEF := $(BINDIR)/newlib_syscalls_default/syscalls.o $(UNDEF) - ifneq (,$(filter newlib_nano,$(USEMODULE))) # Test if nano.specs is available ifeq ($(shell $(LINK) -specs=nano.specs -E - 2>/dev/null >/dev/null /dev/null))/../$(TARGET_ARCH)/include)) endif ifeq ($(TOOLCHAIN),llvm) diff --git a/sys/Makefile.include b/sys/Makefile.include index 680f655b17..092bb68792 100644 --- a/sys/Makefile.include +++ b/sys/Makefile.include @@ -65,8 +65,12 @@ ifneq (,$(filter log_%,$(USEMODULE))) include $(RIOTBASE)/sys/log/Makefile.include endif +ifneq (,$(filter newlib,$(USEMODULE))) + include $(RIOTMAKE)/libc/newlib.mk +endif + ifneq (,$(filter newlib_syscalls_default,$(USEMODULE))) - include $(RIOTBASE)/sys/newlib/Makefile.include + include $(RIOTBASE)/sys/newlib_syscalls_default/Makefile.include endif ifneq (,$(filter arduino,$(USEMODULE))) diff --git a/sys/newlib/Makefile b/sys/newlib_syscalls_default/Makefile similarity index 50% rename from sys/newlib/Makefile rename to sys/newlib_syscalls_default/Makefile index 586bc62601..48422e909a 100644 --- a/sys/newlib/Makefile +++ b/sys/newlib_syscalls_default/Makefile @@ -1,3 +1 @@ -MODULE = newlib_syscalls_default - include $(RIOTBASE)/Makefile.base diff --git a/sys/newlib_syscalls_default/Makefile.include b/sys/newlib_syscalls_default/Makefile.include new file mode 100644 index 0000000000..419a6feddc --- /dev/null +++ b/sys/newlib_syscalls_default/Makefile.include @@ -0,0 +1 @@ +UNDEF += $(BINDIR)/newlib_syscalls_default/syscalls.o diff --git a/sys/newlib/syscalls.c b/sys/newlib_syscalls_default/syscalls.c similarity index 100% rename from sys/newlib/syscalls.c rename to sys/newlib_syscalls_default/syscalls.c