* [PATCH] classes/meson.bbclass: Explicitly mark functions as missing in MinGW
@ 2020-02-20 18:51 Joshua Watt
2020-02-20 19:30 ` Khem Raj
0 siblings, 1 reply; 5+ messages in thread
From: Joshua Watt @ 2020-02-20 18:51 UTC (permalink / raw)
To: openembedded-core
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).
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
}
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] classes/meson.bbclass: Explicitly mark functions as missing in MinGW
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
2020-02-20 20:44 ` Joshua Watt
0 siblings, 1 reply; 5+ messages in thread
From: Khem Raj @ 2020-02-20 19:30 UTC (permalink / raw)
To: openembedded-core
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
> }
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] classes/meson.bbclass: Explicitly mark functions as missing in MinGW
2020-02-20 19:30 ` Khem Raj
@ 2020-02-20 20:44 ` Joshua Watt
2020-02-20 22:50 ` Joshua Watt
0 siblings, 1 reply; 5+ messages in thread
From: Joshua Watt @ 2020-02-20 20:44 UTC (permalink / raw)
To: Khem Raj; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 2774 bytes --]
On Thu, Feb 20, 2020, 1:30 PM Khem Raj <raj.khem@gmail.com> wrote:
>
>
> 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
>
Agreed. I think the upstream fix would be better, and I will look at that
also.
> > 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
> > }
> >
> >
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
[-- Attachment #2: Type: text/html, Size: 4236 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] classes/meson.bbclass: Explicitly mark functions as missing in MinGW
2020-02-20 20:44 ` Joshua Watt
@ 2020-02-20 22:50 ` Joshua Watt
2020-02-20 22:59 ` Khem Raj
0 siblings, 1 reply; 5+ messages in thread
From: Joshua Watt @ 2020-02-20 22:50 UTC (permalink / raw)
To: Khem Raj; +Cc: OE-core
On Thu, Feb 20, 2020 at 2:44 PM Joshua Watt <jpewhacker@gmail.com> wrote:
>
>
>
> On Thu, Feb 20, 2020, 1:30 PM Khem Raj <raj.khem@gmail.com> wrote:
>>
>>
>>
>> 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
>
>
> Agreed. I think the upstream fix would be better, and I will look at that also.
Fixed in http://lists.openembedded.org/pipermail/openembedded-core/2020-February/293233.html
if that is preferable.
>
>>
>> > 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
>> > }
>> >
>> >
>> --
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] classes/meson.bbclass: Explicitly mark functions as missing in MinGW
2020-02-20 22:50 ` Joshua Watt
@ 2020-02-20 22:59 ` Khem Raj
0 siblings, 0 replies; 5+ messages in thread
From: Khem Raj @ 2020-02-20 22:59 UTC (permalink / raw)
To: Joshua Watt; +Cc: OE-core
On Thu, 2020-02-20 at 16:50 -0600, Joshua Watt wrote:
> On Thu, Feb 20, 2020 at 2:44 PM Joshua Watt <jpewhacker@gmail.com>
> wrote:
> >
> >
> > On Thu, Feb 20, 2020, 1:30 PM Khem Raj <raj.khem@gmail.com> wrote:
> > >
> > >
> > > 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
> >
> > Agreed. I think the upstream fix would be better, and I will look
> > at that also.
>
> Fixed in
> http://lists.openembedded.org/pipermail/openembedded-core/2020-February/293233.html
> if that is preferable.
sounds good. Thanks for taking time to fix it
>
> > > > 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('TARGE
> > > > T_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
> > > > }
> > > >
> > > >
> > > --
> > > _______________________________________________
> > > Openembedded-core mailing list
> > > Openembedded-core@lists.openembedded.org
> > > http://lists.openembedded.org/mailman/listinfo/openembedded-core
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-02-20 22:59 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2020-02-20 20:44 ` Joshua Watt
2020-02-20 22:50 ` Joshua Watt
2020-02-20 22:59 ` Khem Raj
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.