<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Feb 20, 2020, 1:30 PM Khem Raj <<a href="mailto:raj.khem@gmail.com">raj.khem@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
On 2/20/20 10:51 AM, Joshua Watt wrote:<br>
> meson (with some help from GCC) misdetects certain builtin functions as<br>
> being present on MinGW, when in fact they are not. Fix it by explicitly<br>
> marking the functions as missing. This requires rearranging the<br>
> meson.cross file to put the [properties] section at the end so the<br>
> append works properly (meson can't handle duplicate sections).<br>
> <br>
<br>
patch is fine workaround, but I think meson should look for strndup in <br>
string.h<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Agreed. I think the upstream fix would be better, and I will look at that also.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
> Signed-off-by: Joshua Watt <<a href="mailto:JPEWhacker@gmail.com" target="_blank" rel="noreferrer">JPEWhacker@gmail.com</a>><br>
> ---<br>
> meta/classes/meson.bbclass | 25 +++++++++++++++++--------<br>
> 1 file changed, 17 insertions(+), 8 deletions(-)<br>
> <br>
> diff --git a/meta/classes/meson.bbclass b/meta/classes/meson.bbclass<br>
> index 06034e8b47..5c74658d01 100644<br>
> --- a/meta/classes/meson.bbclass<br>
> +++ b/meta/classes/meson.bbclass<br>
> @@ -96,14 +96,6 @@ readelf = ${@meson_array('READELF', d)}<br>
> pkgconfig = 'pkg-config'<br>
> llvm-config = 'llvm-config${LLVMVERSION}'<br>
> <br>
> -[properties]<br>
> -needs_exe_wrapper = true<br>
> -c_args = ${@meson_array('CFLAGS', d)}<br>
> -c_link_args = ${@meson_array('LDFLAGS', d)}<br>
> -cpp_args = ${@meson_array('CXXFLAGS', d)}<br>
> -cpp_link_args = ${@meson_array('LDFLAGS', d)}<br>
> -gtkdoc_exe_wrapper = '${B}/gtkdoc-qemuwrapper'<br>
> -<br>
> [host_machine]<br>
> system = '${@meson_operating_system('HOST_OS', d)}'<br>
> cpu_family = '${@meson_cpu_family('HOST_ARCH', d)}'<br>
> @@ -115,6 +107,23 @@ system = '${@meson_operating_system('TARGET_OS', d)}'<br>
> cpu_family = '${@meson_cpu_family('TARGET_ARCH', d)}'<br>
> cpu = '${TARGET_ARCH}'<br>
> endian = '${@meson_endian('TARGET', d)}'<br>
> +<br>
> +[properties]<br>
> +needs_exe_wrapper = true<br>
> +c_args = ${@meson_array('CFLAGS', d)}<br>
> +c_link_args = ${@meson_array('LDFLAGS', d)}<br>
> +cpp_args = ${@meson_array('CXXFLAGS', d)}<br>
> +cpp_link_args = ${@meson_array('LDFLAGS', d)}<br>
> +gtkdoc_exe_wrapper = '${B}/gtkdoc-qemuwrapper'<br>
> +EOF<br>
> +}<br>
> +<br>
> +do_write_config_append_mingw32() {<br>
> + # meson mis-detects the presence of several builtin functions in MinGW<br>
> + # (see <a href="https://github.com/mesonbuild/meson/issues/3672" rel="noreferrer noreferrer" target="_blank">https://github.com/mesonbuild/meson/issues/3672</a>).<br>
> + # Explicitly mark these functions as missing in the cross file<br>
> + cat >>${WORKDIR}/meson.cross <<EOF<br>
> +has_function_strndup = false<br>
> EOF<br>
> }<br>
> <br>
> <br>
-- <br>
_______________________________________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org" target="_blank" rel="noreferrer">Openembedded-core@lists.openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer noreferrer" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
</blockquote></div></div></div>