| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The cross file specifies the host/target cpu_family, which should be one of a
defined set of values[1] but if it isn't Meson won't complain and instead
recipes may behave unexpectedly.
[1] http://mesonbuild.com/Reference-tables.html#cpu-families
(From OE-Core rev: e33b902a1dc4294dac148715f4d3ca5b0a6ee1b7)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Ensure that the PACKAGECONFIG arguments are always in EXTRA_OEMESON
- Log the arguments that are being passed in do_configure.
- Do verbose builds so the compile logs are useful for debugging build problems
(From OE-Core rev: 3112ff268d095a65ecb893dd6ca88a85b0f70446)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There's a bug in Meson[1] where it find_program("foo") will fail if foo is
defined in the cross file as a list.
This is causing the Meson build of libdrm to fail, but for this instance we can
work around the problem by only using lists in the cross file if there are
arguments, and just using a string if there are not.
[1] https://github.com/mesonbuild/meson/issues/3737
(From OE-Core rev: 7fd8bc469c2caacc1c2021bd0aa83dd6da7fe1e7)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
| |
The native override is specified in two different places, so let's move
it into a function to reduce code duplication.
(From OE-Core rev: c455ec4a12d4966524da9436722476aa2d428765)
Signed-off-by: Martin Kelly <mkelly@xevo.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We should use the value of CC for the c compiler setting in cross
compilation configuration file for meson. For example, if we only
use ${HOST_PREFIX}gcc instead of ${CC}, we would meet the following
do_compile failure for systemd.
cc1: fatal error: linux/capability.h: No such file or directory
Do the same change for LD, AR, NM, STRIP and READELF.
(From OE-Core rev: 177bd96a531fcc85e62baff04aba327e2bccee07)
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
We need to use the meson.cross file when building for nativesdk.
Additionally, we need to trick meson's sanity tests, just as it is
done for target builds.
(From OE-Core rev: abcb330c462c2c06d36f8f3681a6bd07d562c1fe)
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove hardcoding c/c++ compiler to be gcc alone, its
possible to use clang as replacement for cross compilers
from meta-clang, therefore set clang/clang++ if
TOOLCHAIN = "clang"
(From OE-Core rev: 05789489d25a5ceac0403613ad789d78198be6ee)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, we include MESON_C_ARGS in write_config[vardeps], but we
don't include MESON_LINK_ARGS, which also affects meson.cross. In
addition, we include TOOLCHAIN_OPTIONS, from which both are derived.
Add MESON_LINK_ARGS, and remove TOOLCHAIN_OPTIONS, which does not
directly appear in meson.cross and should be pulled in indirectly by
MESON_C_ARGS and MESON_LINK_ARGS.
(From OE-Core rev: 4db37cc8d9139076682e2528d29e92fad2eb1c90)
Signed-off-by: Martin Kelly <mkelly@xevo.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, CFLAGS and CXXFLAGS are not making it into the compile line.
This is because meson appends CFLAGS/CXXFLAGS from the environment only
for native but not for cross builds (probably to keep cross-builds more
isolated). As a result, we need to make sure these vars goes into
meson.cross. This is similar to what cmake.bbclass does with
OECMAKE_C_FLAGS and OECMAKE_CXX_FLAGS.
Change c_args and cpp_args in meson.cross to include these vars, and
update write_config[vardeps] accordingly.
(From OE-Core rev: f435d1b75d3775f6ec0df6027766008b40209fd7)
Signed-off-by: Martin Kelly <mkelly@xevo.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
OE manages all the compile flags, so we don't want meson to inject its
own flags. Currently, it's injecting -O0 and causing build breaks when
security flags are enabled (because _FORTIFY_SOURCE requires an
optimized build and meson defaults to a debug -O0 build).
Add --buildtype plain so meson will not add its own optimization flags.
(From OE-Core rev: 73ff85986d82c8da601d7c7cf9a02961f2f66a09)
Signed-off-by: Martin Kelly <mkelly@xevo.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
| |
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.
(From OE-Core rev: 8a61e0c0c53275ebc623296f46676d920b11eb3b)
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
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).
(From OE-Core rev: 1f8dea686cdfd6d360ba4a97f62d274c39eaeb8e)
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|