Commit Graph

15 Commits

Author SHA1 Message Date
Ross Burton
8e2393a92b meson: set needs_exe_wrapper
Tell Meson that even if it looks like the architectures are compatible, not to
bother executing binaries: differences in tunes, C libraries and so on mean
binaries may not work.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-08-13 13:16:18 +02:00
Ross Burton
6fb9a9e7a2 meson: set native tool flag variables
As well as setting CC/CXX, export CFLAGS/CXXFLAGS and so on.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-07-01 09:59:26 +02:00
Ross Burton
6e2d975fc1 meson: export PKG_CONFIG to use pkg-config-native for native builds
By default Meson uses 'pkg-config' in native builds but as that is the cross
pkg-config, export PKG_CONFIG to use the correct pkg-config-native binary.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-07-01 09:59:26 +02:00
Ross Burton
685db49681 meson: don't pass localedir
For historic reasons the localedir directory is where binary locales are stored
(/usr/lib/locale) , not where application translations belong (typically,
/usr/share/locale).  Don't pass localedir explicitly, and let Meson use the
default of $datadir/locale to match the behaviour of autotools.bbclass and the
expectations of the system.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-07-01 09:59:26 +02:00
Ross Burton
11951f01d9 Revert "meson: fix build/host confusion for bbclass"
This patch was incorrect: meson and autotools (thus OE) don't have conflicting
terminology, and using HOST_* for the host_machine variables is correct.

This reverts commit 77eae90ef5.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-07-01 09:59:26 +02:00
Ross Burton
f0d77f8501 meson: revert changes which shouldn't have been submitted
>From Adam Foltzer:

  Apologies, this line was inadvertently committed. It was a fix I tried before
  learning that adding TARGET_CC_ARCH was the solution to linking the wrong
  ld.so.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-07-01 09:59:26 +02:00
Adam C. Foltzer
d84b4b0bab meson: add LDFLAGS to bbclass C/C++ link arguments
This adds compiler flags for C++ projects, and fixes the linker
arguments for both C and C++ to avoid the GNU_HASH qa failure

Signed-off-by: Adam C. Foltzer <acfoltzer@galois.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-06-14 14:51:15 +02:00
Adam C. Foltzer
77eae90ef5 meson: fix build/host confusion for bbclass
Meson and Bitbake use different terminology for the build and host;
this provides the correct build machine info to Meson.

Signed-off-by: Adam C. Foltzer <acfoltzer@galois.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-06-14 14:51:15 +02:00
Ricardo Ribalda Delgado
9df4c37a12 meson: Suport for c++ cross-compilation
cpp_args and cpp_link_args must be set on the meson.cross file to
compile c++ applications. Otherwise variables such as the sysroot
are not set correctly and libraries/headers are not found.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-06-05 11:01:45 +02:00
Peter Kjellerstedt
40fd946e1b meson.bbclass: Use the correct C++ compiler when cross compiling
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-03-16 23:32:40 +01:00
Peter Kjellerstedt
7fb45590ff meson.bbclass: Support building for native
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-03-16 23:32:40 +01:00
Peter Kjellerstedt
08164e4c9d meson.bbclass: Make changes to meson.build files trigger reconfiguration
When externalsrc.bbclass is used, any changes to meson.build files
should trigger do_configure to be re-run.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-03-16 23:32:40 +01:00
Peter Kjellerstedt
b9534442f0 meson.bbclass: Add support for more standard installation directories
A couple of more standard installation directories are supported with
meson 0.37.1, so make sure they are configured.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-03-16 23:32:40 +01:00
Peter Kjellerstedt
c10c1c0cfd meson.bbclass: Add progress support for do_compile()
ninja provides progress information when building so let's make use of
it.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-03-07 13:30:26 +01:00
Linus Svensson
c4445538f8 meson.bbclass: Add meson.bbclass
Add a class for packages that uses the meson build system.

Meson uses a cross-file that contain needed tools and information about
the host and target system. Such a file will be created in {WORKDIR}.

Meson only allows installation directories to be specified as relative
to prefix, except for sysconfdir, which can be absolute.

This patch is based on a prototype patch by
Ross Burton <ross.burton@intel.com>.

Signed-off-by: Linus Svensson <linussn@axis.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-02-20 11:50:12 +01:00