From: Khem Raj <raj.khem@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] classes/meson.bbclass: Explicitly mark functions as missing in MinGW
Date: Thu, 20 Feb 2020 11:30:22 -0800 [thread overview]
Message-ID: <e81900d2-4692-ca05-841d-d2fbceac70c2@gmail.com> (raw)
In-Reply-To: <20200220185150.23422-1-JPEWhacker@gmail.com>
On 2/20/20 10:51 AM, Joshua Watt wrote:
> meson (with some help from GCC) misdetects certain builtin functions as
> being present on MinGW, when in fact they are not. Fix it by explicitly
> marking the functions as missing. This requires rearranging the
> meson.cross file to put the [properties] section at the end so the
> append works properly (meson can't handle duplicate sections).
>
patch is fine workaround, but I think meson should look for strndup in
string.h
> Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
> ---
> meta/classes/meson.bbclass | 25 +++++++++++++++++--------
> 1 file changed, 17 insertions(+), 8 deletions(-)
>
> diff --git a/meta/classes/meson.bbclass b/meta/classes/meson.bbclass
> index 06034e8b47..5c74658d01 100644
> --- a/meta/classes/meson.bbclass
> +++ b/meta/classes/meson.bbclass
> @@ -96,14 +96,6 @@ readelf = ${@meson_array('READELF', d)}
> pkgconfig = 'pkg-config'
> llvm-config = 'llvm-config${LLVMVERSION}'
>
> -[properties]
> -needs_exe_wrapper = true
> -c_args = ${@meson_array('CFLAGS', d)}
> -c_link_args = ${@meson_array('LDFLAGS', d)}
> -cpp_args = ${@meson_array('CXXFLAGS', d)}
> -cpp_link_args = ${@meson_array('LDFLAGS', d)}
> -gtkdoc_exe_wrapper = '${B}/gtkdoc-qemuwrapper'
> -
> [host_machine]
> system = '${@meson_operating_system('HOST_OS', d)}'
> cpu_family = '${@meson_cpu_family('HOST_ARCH', d)}'
> @@ -115,6 +107,23 @@ system = '${@meson_operating_system('TARGET_OS', d)}'
> cpu_family = '${@meson_cpu_family('TARGET_ARCH', d)}'
> cpu = '${TARGET_ARCH}'
> endian = '${@meson_endian('TARGET', d)}'
> +
> +[properties]
> +needs_exe_wrapper = true
> +c_args = ${@meson_array('CFLAGS', d)}
> +c_link_args = ${@meson_array('LDFLAGS', d)}
> +cpp_args = ${@meson_array('CXXFLAGS', d)}
> +cpp_link_args = ${@meson_array('LDFLAGS', d)}
> +gtkdoc_exe_wrapper = '${B}/gtkdoc-qemuwrapper'
> +EOF
> +}
> +
> +do_write_config_append_mingw32() {
> + # meson mis-detects the presence of several builtin functions in MinGW
> + # (see https://github.com/mesonbuild/meson/issues/3672).
> + # Explicitly mark these functions as missing in the cross file
> + cat >>${WORKDIR}/meson.cross <<EOF
> +has_function_strndup = false
> EOF
> }
>
>
next prev parent reply other threads:[~2020-02-20 19:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-20 18:51 [PATCH] classes/meson.bbclass: Explicitly mark functions as missing in MinGW Joshua Watt
2020-02-20 19:30 ` Khem Raj [this message]
2020-02-20 20:44 ` Joshua Watt
2020-02-20 22:50 ` Joshua Watt
2020-02-20 22:59 ` Khem Raj
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e81900d2-4692-ca05-841d-d2fbceac70c2@gmail.com \
--to=raj.khem@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox