aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/meson.bbclass
AgeCommit message (Collapse)Author
2018-01-12meson.bbclass: use HOST_CC_ARCH, not TARGET_CC_ARCHChristopher Larson
Using TARGET_CC_ARCH is inconsistent with CC, which uses HOST_CC_ARCH, and the rest of meson.bbclass, which uses HOST_PREFIX, HOST_OS, etc. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-05meson: export native env only for native buildMartin Kelly
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. 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>
2018-01-04meson: add a recipe and class from meta-oeAlexander Kanavin
The original recipe has been provided and improved by: Ross Burton <ross.burton@intel.com> Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Adam C. Foltzer <acfoltzer@galois.com> Peter Kjellerstedt <peter.kjellerstedt@axis.com> Linus Svensson <linussn@axis.com> I have added patches to fix up gtk-doc and gobject-introspection in cross-compilation environments, and also change the order of linker arguments to replicate autotools more closely (and fix linking errors in some corner cases). Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>