zephyr/cmake
Kumar Gala 7aa8e43add libc: newlib: Cleanup/fix setting of system include paths
When we build with newlib we don't set -nostdinc.  In that case make
sure that we leave it to the toolchain to set the system include paths.

The one exception to leaving to the toolchain to set the system include
paths is the path to the newlib headers.  Since we build
with -ffreestanding we need to make sure the newlib header path is the
before the toolchain headers. Otherwise the toolchain's 'freestanding'
headers get picked up and that causes issues (for example getting PRI*64
defined properly from inttypes.h due to __STDC_HOSTED__ being '0').

For newlib we accomplish this by having the only system header specified
by zephyr_system_include_directories() being just the newlib headers.

Note: for minlibc we leave things alone as things just happen to work as
the -I include of the libc headers takes precedence over -isystem so we
get the libc headers over the toolchain ones.  For the newlib case it
appears that setting both -I and -isystem for the same dir causes the
-I to be ignored.

Fixes #14310

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-03-13 06:50:23 -05:00
..
app cmake: Deprecate 'set_conf_file' 2019-03-01 09:44:09 +01:00
backports cmake: Fixed python detection bug 2018-12-21 11:13:03 +01:00
compiler libc: newlib: Cleanup/fix setting of system include paths 2019-03-13 06:50:23 -05:00
emu sanitycheck: Add Renode cmake configuration 2019-01-14 09:12:07 -05:00
flash cmake: Use west installation directly 2019-01-29 10:15:01 +01:00
ide cmake: Eclipse CDT4 generator amendment 2018-10-17 18:16:55 -04:00
reports
toolchain toolchain: Fix typo and grammar in error message 2019-03-05 08:28:40 -05:00
usage cmake: Fix how usage finds board names 2019-01-31 03:17:19 -06:00
util cmake: Whitespace and commentary fixes 2018-12-20 12:23:50 +01:00
ccache.cmake
cfb.cmake subsys: fb: add support for generating CFB font headers at build time 2018-11-28 11:46:00 +01:00
dts.cmake cmake: Run dts before kconfig 2019-02-01 10:16:06 -06:00
extensions.cmake cmake: dtc: silence output from check_dtc_flag 2019-01-25 23:14:54 -05:00
extra_flags.cmake lib/os: Conditionally eliminate alloca/VLA usage 2019-02-28 10:06:35 -08:00
fpu-for-gcc-m-cpu.cmake soc: arm: Kconfig option to indicate double-precision FP 2019-02-08 14:09:18 -06:00
gcc-m-cpu.cmake
generic_toolchain.cmake x86_64: use host toolchain 2019-02-10 11:57:17 -06:00
git.cmake cmake: more deterministic git describe --abbrev=12 2019-02-27 10:27:47 +01:00
hex.cmake
host-tools.cmake cmake: add west version checking 2019-03-11 20:37:27 -07:00
kconfig.cmake kconfig: Have ninja Re-run CMake when Kconfig sources change 2019-03-07 10:40:00 +01:00
kobj.cmake cmake: Use variables for target names 2019-01-19 07:21:55 -05:00
pristine.cmake
python.cmake cmake: boilerplate: Move out finding git+python to separate cmake files 2018-12-27 19:24:51 -05:00
target_toolchain.cmake cmake: Document CMAKE_SYSTEM_-variables, and add CMAKE_SYSTEM_VERSION 2018-12-20 11:15:20 +01:00
version.cmake
zephyr_module.cmake cmake: west: Allow mono-repo to build when west is installed 2019-03-11 20:38:03 -07:00