build: fix configure check for headers

When we are checking if a header is available we can't pass -I argument
to our missing/ directory. Otherwise we would end up telling the build
that a header is available when it actually isn't.

This fixes the build of sitl in MacOS with clang.
This commit is contained in:
Lucas De Marchi 2016-09-02 23:37:00 -03:00
parent 5c5ddc9d4a
commit 95d5752011
1 changed files with 5 additions and 4 deletions

View File

@ -56,15 +56,16 @@ class Board:
cfg.ap_common_checks()
cfg.env.prepend_value('INCLUDES', [
cfg.srcnode.find_dir('libraries/AP_Common/missing').abspath()
])
def configure_env(self, cfg, env):
# Use a dictionary instead of the convetional list for definitions to
# make easy to override them. Convert back to list before consumption.
env.DEFINES = {}
env.prepend_value('INCLUDES', [
cfg.srcnode.find_dir('libraries/AP_Common/missing').abspath()
])
env.CFLAGS += [
'-ffunction-sections',
'-fdata-sections',