diff options
author | Peter Kjellerstedt <peter.kjellerstedt@axis.com> | 2019-11-05 23:08:32 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-11-18 14:42:12 +0000 |
commit | f61f37bef1eb234e1de85f10da0056250950704f (patch) | |
tree | bc788f7583416b07903a35947508fda67e91fa4c /meta/classes | |
parent | 8855a1ec4de0762038590ff06355af7ba8beea29 (diff) | |
download | poky-f61f37bef1eb234e1de85f10da0056250950704f.tar.gz |
meson.bbclass: Remove the MESON_*_ARGS variables
The options in ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} are already passed
via ${CC}/${CXX} and there is no reason to pass them a second time. Thus
we can remove MESON_TOOLCHAIN_ARGS. And when it is removed, the other
MESON_*_ARGS variables revert to the standard CFLAGS, CXXFLAGS and
LDFLAGS, so just use them directly instead.
Apart from the obvious improvement with not passing a lot of options
twice, this also solves a problem where -pie would be passed on the
command line in a way that it would prevent building any dynamic
libraries using meson if using a toolchain that is not built with
--enable-default-pie and if security_flags.inc is used.
(From OE-Core rev: 650aa572f96266ea532666b5896d259ceb0dc1da)
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/meson.bbclass | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/meta/classes/meson.bbclass b/meta/classes/meson.bbclass index 115d1aedcb..5c0139f02a 100644 --- a/meta/classes/meson.bbclass +++ b/meta/classes/meson.bbclass | |||
@@ -30,11 +30,6 @@ MESONOPTS = " --prefix ${prefix} \ | |||
30 | -Dcpp_args='${BUILD_CPPFLAGS} ${BUILD_CXXFLAGS}' \ | 30 | -Dcpp_args='${BUILD_CPPFLAGS} ${BUILD_CXXFLAGS}' \ |
31 | -Dcpp_link_args='${BUILD_LDFLAGS}'" | 31 | -Dcpp_link_args='${BUILD_LDFLAGS}'" |
32 | 32 | ||
33 | MESON_TOOLCHAIN_ARGS = "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" | ||
34 | MESON_C_ARGS = "${MESON_TOOLCHAIN_ARGS} ${CFLAGS}" | ||
35 | MESON_CPP_ARGS = "${MESON_TOOLCHAIN_ARGS} ${CXXFLAGS}" | ||
36 | MESON_LINK_ARGS = "${MESON_TOOLCHAIN_ARGS} ${LDFLAGS}" | ||
37 | |||
38 | EXTRA_OEMESON_append = " ${PACKAGECONFIG_CONFARGS}" | 33 | EXTRA_OEMESON_append = " ${PACKAGECONFIG_CONFARGS}" |
39 | 34 | ||
40 | MESON_CROSS_FILE = "" | 35 | MESON_CROSS_FILE = "" |
@@ -76,7 +71,7 @@ def meson_endian(prefix, d): | |||
76 | bb.fatal("Cannot determine endianism for %s-%s" % (arch, os)) | 71 | bb.fatal("Cannot determine endianism for %s-%s" % (arch, os)) |
77 | 72 | ||
78 | addtask write_config before do_configure | 73 | addtask write_config before do_configure |
79 | do_write_config[vardeps] += "MESON_C_ARGS MESON_CPP_ARGS MESON_LINK_ARGS CC CXX LD AR NM STRIP READELF" | 74 | do_write_config[vardeps] += "CC CXX LD AR NM STRIP READELF CFLAGS CXXFLAGS LDFLAGS" |
80 | do_write_config() { | 75 | do_write_config() { |
81 | # This needs to be Py to split the args into single-element lists | 76 | # This needs to be Py to split the args into single-element lists |
82 | cat >${WORKDIR}/meson.cross <<EOF | 77 | cat >${WORKDIR}/meson.cross <<EOF |
@@ -93,10 +88,10 @@ llvm-config = 'llvm-config8.0.0' | |||
93 | 88 | ||
94 | [properties] | 89 | [properties] |
95 | needs_exe_wrapper = true | 90 | needs_exe_wrapper = true |
96 | c_args = ${@meson_array('MESON_C_ARGS', d)} | 91 | c_args = ${@meson_array('CFLAGS', d)} |
97 | c_link_args = ${@meson_array('MESON_LINK_ARGS', d)} | 92 | c_link_args = ${@meson_array('LDFLAGS', d)} |
98 | cpp_args = ${@meson_array('MESON_CPP_ARGS', d)} | 93 | cpp_args = ${@meson_array('CXXFLAGS', d)} |
99 | cpp_link_args = ${@meson_array('MESON_LINK_ARGS', d)} | 94 | cpp_link_args = ${@meson_array('LDFLAGS', d)} |
100 | gtkdoc_exe_wrapper = '${B}/gtkdoc-qemuwrapper' | 95 | gtkdoc_exe_wrapper = '${B}/gtkdoc-qemuwrapper' |
101 | 96 | ||
102 | [host_machine] | 97 | [host_machine] |