1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #5627 from kaspar030/newlib_fix_short_whar

sys: newlib: check if toolchain is compiled with -fshort-wchar, set CFLAGS accordingly
This commit is contained in:
Kaspar Schleiser 2016-07-13 15:57:50 +02:00 committed by GitHub
commit 58baba58bb

View File

@ -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 </dev/null ; echo $$?),0)
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)
CFLAGS += -fshort-wchar
endif
endif
endif