0

I try to cross-compile for STM32 arm-none-eabi using zephyrproject.org. Zephyr adds -nostdinc flag to every C/C++ file. I cannot find how to override this without fixing build system sources.

Need option like -stdinc (unrecognized). Is there any?

kyb
  • 7,233
  • 5
  • 52
  • 105

3 Answers3

1

You can find out what the default include directories are, and add them back with the -I option.

1

This info is from the man page of gcc

Options for Directory Search These options specify directories to search for header files, for libraries and for parts of the compiler:

   -I dir
   -iquote dir
   -isystem dir
   -idirafter dir
user432989
  • 11
  • 1
1

@kyb I ran into the same problem and eventually found the proper solution for Zephyr:

simply add CONFIG_NEWLIB_LIBC=y to your prj.conf file !

Wheel
  • 11
  • 1