From: Peter Kjellerstedt Date: Tue, 5 Nov 2019 22:08:32 +0000 (+0100) Subject: meson.bbclass: Remove the MESON_*_ARGS variables X-Git-Tag: 2019-04.3-warrior~99 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=650aa572f96266ea532666b5896d259ceb0dc1da;p=openembedded-core.git 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. Signed-off-by: Peter Kjellerstedt Signed-off-by: Richard Purdie Signed-off-by: Armin Kuster --- 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} \ -Dcpp_args='${BUILD_CPPFLAGS} ${BUILD_CXXFLAGS}' \ -Dcpp_link_args='${BUILD_LDFLAGS}'" -MESON_TOOLCHAIN_ARGS = "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" -MESON_C_ARGS = "${MESON_TOOLCHAIN_ARGS} ${CFLAGS}" -MESON_CPP_ARGS = "${MESON_TOOLCHAIN_ARGS} ${CXXFLAGS}" -MESON_LINK_ARGS = "${MESON_TOOLCHAIN_ARGS} ${LDFLAGS}" - EXTRA_OEMESON_append = " ${PACKAGECONFIG_CONFARGS}" MESON_CROSS_FILE = "" @@ -76,7 +71,7 @@ def meson_endian(prefix, d): bb.fatal("Cannot determine endianism for %s-%s" % (arch, os)) addtask write_config before do_configure -do_write_config[vardeps] += "MESON_C_ARGS MESON_CPP_ARGS MESON_LINK_ARGS CC CXX LD AR NM STRIP READELF" +do_write_config[vardeps] += "CC CXX LD AR NM STRIP READELF CFLAGS CXXFLAGS LDFLAGS" do_write_config() { # This needs to be Py to split the args into single-element lists cat >${WORKDIR}/meson.cross <