From 34bbcad7bb084892aa9c9c0ad02c610de109731e Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Tue, 12 Jul 2016 19:50:44 +0200 Subject: [PATCH] sys: newlib: check if toolchain is compiled with -fshort-wchar, set CFLAGS accordingly --- sys/newlib/Makefile.include | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/newlib/Makefile.include b/sys/newlib/Makefile.include index 5afff12d3..d9c9617c2 100644 --- a/sys/newlib/Makefile.include +++ b/sys/newlib/Makefile.include @@ -4,6 +4,9 @@ ifneq (,$(filter newlib_nano,$(USEMODULE))) # Test if nano.specs is available ifeq ($(shell $(LINK) -specs=nano.specs -E - 2>/dev/null >/dev/null &1 | grep -q "use of wchar_t values across objects may fail" ; echo $$?),0) + CFLAGS += -fshort-wchar + endif endif endif