summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorMartin Kelly <mkelly@xevo.com>2018-01-04 15:12:37 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-01-05 12:02:37 +0000
commitf43713878453473b1be65fc5669c9c8147ed496f (patch)
treeb26b51738994fbd12310ad5a009ef1a8b0edda73 /meta/recipes-devtools
parent0131136504e5cc16e8c95ab12d366d7ad2530fc4 (diff)
downloadpoky-f43713878453473b1be65fc5669c9c8147ed496f.tar.gz
meson: export native env only for native build
Although the meson crossfile should take care of setting the right cross environment for a target build, meson slurps any set CFLAGS, CXXFLAGS, LDFLAGS, and CPPFLAGS from the environment and injects them into the build (see mesonbuild/environment.py:get_args_from_envvars for details). This means that we are seeing native CFLAGS, CXXFLAGS, LDFLAGS, and CPPFLAGS in the target build, which is wrong and causes build failures when target and native have libraries in common (the linker gets confused and bails). That said, we *do* need to set certain vars for all builds so that meson can find the right build tools. Without this, meson will fail during its sanity checking step because it will determine the build tools to be unrunnable since they output target instead of native artifacts. The solution to all of this is to set CC, CXX, LD, and AR globally to the native tools while setting the other native vars *only* for the native build. For target builds, these vars will get overridden by the cross file as we expect. (From OE-Core rev: de7ae028c65a978969b2e06fdc1a2d08bc141a5b) Signed-off-by: Martin Kelly <mkelly@xevo.com> Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
0 files changed, 0 insertions, 0 deletions