fixed inclusion of limits.h when building with newlib
The -nostdinc flag to GCC makes it not include its own directories when searching headers, which means they need to be added manually. The same Makefile line (~657) that adds the -nostdinc is also adding the correct path for the gcc used to build, using the "-print-file-name=include" switch to get the correct path for the respective gcc version. The problem is that including limits.h from newlib will try to include gcc's version too, which in every toolchain the SDK provides (and at least on my machine, the same thing applies for the system gcc), limits.h is found under gcc's "include-fixed" directory, not just include. So another -isystem should be added with the value from "-print-file-name=include-fixed". Jira: ZEP-142 Credits: Iván Briano Change-Id: I33b7d9808d000a7346df4f88df92dc76e31fb2dc Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
0c8564cacb
commit
ef2fc59cab
1 changed files with 1 additions and 0 deletions
1
Makefile
1
Makefile
|
@ -664,6 +664,7 @@ endif
|
|||
|
||||
# arch Makefile may override CC so keep this after arch Makefile is included
|
||||
NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
|
||||
NOSTDINC_FLAGS += -isystem $(shell $(CC) -print-file-name=include-fixed)
|
||||
CHECKFLAGS += $(NOSTDINC_FLAGS)
|
||||
|
||||
# disable pointer signed / unsigned warnings in gcc 4.0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue