sys: newlib: conditionally ignore wchar warning

For certain versions of newlib this warning is ignored.
This commit is contained in:
Oleg Hahm 2016-08-29 19:14:01 +02:00
parent 6d65494ae9
commit 00dd2fdcd8

View File

@ -6,6 +6,7 @@ ifneq (,$(filter newlib_nano,$(USEMODULE)))
USE_NEWLIB_NANO = 1 USE_NEWLIB_NANO = 1
ifeq ($(shell echo "int main(){} void _exit(int n) {(void)n;while(1);}" | LC_ALL=C $(CC) -xc - -o /dev/null -lc -specs=nano.specs -Wall -Wextra -pedantic 2>&1 | grep -q "use of wchar_t values across objects may fail" ; echo $$?),0) ifeq ($(shell echo "int main(){} void _exit(int n) {(void)n;while(1);}" | LC_ALL=C $(CC) -xc - -o /dev/null -lc -specs=nano.specs -Wall -Wextra -pedantic 2>&1 | grep -q "use of wchar_t values across objects may fail" ; echo $$?),0)
CFLAGS += -fshort-wchar CFLAGS += -fshort-wchar
LINKFLAGS += -Wl,--no-wchar-size-warning
endif endif
endif endif
endif endif