Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Describe HOSTCC/HOSTCFLAGS changes.

...

See git commit #d32e9c38dfb0659a7f3c0cf586ba1584cd7eb3d6 in the main NuttX repository. See also the preceding commit, 6abd03d53ff9164fb17ea4aca701a49fbbf751c0.

Custom Boards Don't Need HOSTCC and HOSTCFLAGS Definitions

The NuttX build system uses several binary utilities that it compiles and runs on the host computer. To build these binaries, it needs to know the host C compiler and C flags. Previously, every board's scripts/Make.defs file had to provide this information via HOSTCC and HOSTCFLAGS Definitions. As part of an effort to simplify the build system, these definitions are now automatically provided by logic in tools/Config.mk. Boards included in the NuttX repository have been updated, but if you are building NuttX for a custom board, you may want to make the following changes:

In your custom board's scripts/Make.defs file, remove lines like these:

HOSTCC = gcc
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -g -pipe

Sometimes they may look like this:

ifeq ($(CONFIG_WINDOWS_NATIVE),y)
HOSTCC = mingw32-gcc.exe
else
HOSTCC = gcc
endif

Note: These changes are OPTIONAL.

You may still set these definitions in your board's scripts/Make.defs, and your definitions will override the ones in tools/Config.mk.

Also, you may override these definitions for a single run by providing them on the make command line. This is useful if, for example, you wish to build debug versions of these host binaries: define HOSTCFLAGS with -g on the command line.

Known Problems In This Release

...