summaryrefslogtreecommitdiffstats
path: root/meta/classes/meson.bbclass
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2019-07-15 13:25:48 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-07-16 13:53:17 +0100
commit314fc656d967da78db8024684e1829b81c3e0d81 (patch)
treecc6b37382222cade0a9961afdb38bd3e3feef050 /meta/classes/meson.bbclass
parent8e63ec13b408c2fe64acc512a6a6eeebf56c51af (diff)
downloadpoky-314fc656d967da78db8024684e1829b81c3e0d81.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: 300f4ac59d4b96fc25a40565b22441b51ab08ede) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/meson.bbclass')
-rw-r--r--meta/classes/meson.bbclass15
1 files changed, 5 insertions, 10 deletions
diff --git a/meta/classes/meson.bbclass b/meta/classes/meson.bbclass
index 0edbfc1815..70b3653738 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
33MESON_TOOLCHAIN_ARGS = "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
34MESON_C_ARGS = "${MESON_TOOLCHAIN_ARGS} ${CFLAGS}"
35MESON_CPP_ARGS = "${MESON_TOOLCHAIN_ARGS} ${CXXFLAGS}"
36MESON_LINK_ARGS = "${MESON_TOOLCHAIN_ARGS} ${LDFLAGS}"
37
38EXTRA_OEMESON_append = " ${PACKAGECONFIG_CONFARGS}" 33EXTRA_OEMESON_append = " ${PACKAGECONFIG_CONFARGS}"
39 34
40MESON_CROSS_FILE = "" 35MESON_CROSS_FILE = ""
@@ -78,7 +73,7 @@ def meson_endian(prefix, d):
78 bb.fatal("Cannot determine endianism for %s-%s" % (arch, os)) 73 bb.fatal("Cannot determine endianism for %s-%s" % (arch, os))
79 74
80addtask write_config before do_configure 75addtask write_config before do_configure
81do_write_config[vardeps] += "MESON_C_ARGS MESON_CPP_ARGS MESON_LINK_ARGS CC CXX LD AR NM STRIP READELF" 76do_write_config[vardeps] += "CC CXX LD AR NM STRIP READELF CFLAGS CXXFLAGS LDFLAGS"
82do_write_config() { 77do_write_config() {
83 # This needs to be Py to split the args into single-element lists 78 # This needs to be Py to split the args into single-element lists
84 cat >${WORKDIR}/meson.cross <<EOF 79 cat >${WORKDIR}/meson.cross <<EOF
@@ -95,10 +90,10 @@ llvm-config = 'llvm-config8.0.0'
95 90
96[properties] 91[properties]
97needs_exe_wrapper = true 92needs_exe_wrapper = true
98c_args = ${@meson_array('MESON_C_ARGS', d)} 93c_args = ${@meson_array('CFLAGS', d)}
99c_link_args = ${@meson_array('MESON_LINK_ARGS', d)} 94c_link_args = ${@meson_array('LDFLAGS', d)}
100cpp_args = ${@meson_array('MESON_CPP_ARGS', d)} 95cpp_args = ${@meson_array('CXXFLAGS', d)}
101cpp_link_args = ${@meson_array('MESON_LINK_ARGS', d)} 96cpp_link_args = ${@meson_array('LDFLAGS', d)}
102gtkdoc_exe_wrapper = '${B}/gtkdoc-qemuwrapper' 97gtkdoc_exe_wrapper = '${B}/gtkdoc-qemuwrapper'
103 98
104[host_machine] 99[host_machine]