* [PATCH] kmod-native_git.bb: fix builds for hosts with older libc
@ 2012-08-20 18:49 Matthew McClintock
2012-08-20 20:39 ` Chris Larson
2012-08-21 10:49 ` Richard Purdie
0 siblings, 2 replies; 4+ messages in thread
From: Matthew McClintock @ 2012-08-20 18:49 UTC (permalink / raw)
To: openembedded-core
kmod will fail to build with the following error because O_CLOEXEC is
not defined:
| libkmod/libkmod-module.c: In function 'kmod_module_get_initstate':
| libkmod/libkmod-module.c:1640: error: 'O_CLOEXEC' undeclared (first use in this function)
| libkmod/libkmod-module.c:1640: error: (Each undeclared identifier is reported only once
| libkmod/libkmod-module.c:1640: error: for each function it appears in.)
| libkmod/libkmod-module.c: In function 'kmod_module_get_refcnt':
| libkmod/libkmod-module.c:1754: error: 'O_CLOEXEC' undeclared (first use in this function)
| libkmod/libkmod-module.c: In function 'kmod_module_get_sections':
| libkmod/libkmod-module.c:1913: error: 'O_CLOEXEC' undeclared (first use in this function)
| libkmod/libkmod-file.c: In function 'kmod_file_open':
| libkmod/libkmod-file.c:282: error: 'O_CLOEXEC' undeclared (first use in this function)
| libkmod/libkmod-file.c:282: error: (Each undeclared identifier is reported only once
| libkmod/libkmod-file.c:282: error: for each function it appears in.)
Since we are only using kmod-native for depmod, and it's a non-threaded
user of this libary being built this should be safe to override O_CLOEXEC.
Keep in mind this is ONLY effecting the native builds and not what is
being shipped in the root file system.
Signed-off-by: Matthew McClintock <msm@freescale.com>
---
meta/recipes-kernel/kmod/kmod-native_git.bb | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/meta/recipes-kernel/kmod/kmod-native_git.bb b/meta/recipes-kernel/kmod/kmod-native_git.bb
index 96de8b8..3c5e3c3 100644
--- a/meta/recipes-kernel/kmod/kmod-native_git.bb
+++ b/meta/recipes-kernel/kmod/kmod-native_git.bb
@@ -4,7 +4,7 @@
require kmod.inc
inherit native
-PR = "${INC_PR}.0"
+PR = "${INC_PR}.1"
do_install_append (){
for tool in depmod insmod lsmod modinfo modprobe rmmod
@@ -12,3 +12,9 @@ do_install_append (){
ln -s kmod ${D}${bindir}/$tool
done
}
+
+do_compile_append (){
+ if ! grep O_CLOEXEC -r ${includedir_native}/bits/fcntl.h; then
+ export CFLAGS="$CFLAGS -D O_CLOEXEC=0"
+ fi
+}
--
1.7.9.7
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] kmod-native_git.bb: fix builds for hosts with older libc
2012-08-20 18:49 [PATCH] kmod-native_git.bb: fix builds for hosts with older libc Matthew McClintock
@ 2012-08-20 20:39 ` Chris Larson
2012-08-21 10:49 ` Richard Purdie
1 sibling, 0 replies; 4+ messages in thread
From: Chris Larson @ 2012-08-20 20:39 UTC (permalink / raw)
To: Matthew McClintock; +Cc: openembedded-core
On Mon, Aug 20, 2012 at 11:49 AM, Matthew McClintock <msm@freescale.com> wrote:
> Keep in mind this is ONLY effecting the native builds and not what is
> being shipped in the root file system.
s/effect/affect/ ;)
--
Christopher Larson
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] kmod-native_git.bb: fix builds for hosts with older libc
2012-08-20 18:49 [PATCH] kmod-native_git.bb: fix builds for hosts with older libc Matthew McClintock
2012-08-20 20:39 ` Chris Larson
@ 2012-08-21 10:49 ` Richard Purdie
2012-08-21 16:20 ` McClintock Matthew-B29882
1 sibling, 1 reply; 4+ messages in thread
From: Richard Purdie @ 2012-08-21 10:49 UTC (permalink / raw)
To: Matthew McClintock; +Cc: openembedded-core
On Mon, 2012-08-20 at 13:49 -0500, Matthew McClintock wrote:
> kmod will fail to build with the following error because O_CLOEXEC is
> not defined:
>
> | libkmod/libkmod-module.c: In function 'kmod_module_get_initstate':
> | libkmod/libkmod-module.c:1640: error: 'O_CLOEXEC' undeclared (first use in this function)
> | libkmod/libkmod-module.c:1640: error: (Each undeclared identifier is reported only once
> | libkmod/libkmod-module.c:1640: error: for each function it appears in.)
> | libkmod/libkmod-module.c: In function 'kmod_module_get_refcnt':
> | libkmod/libkmod-module.c:1754: error: 'O_CLOEXEC' undeclared (first use in this function)
> | libkmod/libkmod-module.c: In function 'kmod_module_get_sections':
> | libkmod/libkmod-module.c:1913: error: 'O_CLOEXEC' undeclared (first use in this function)
> | libkmod/libkmod-file.c: In function 'kmod_file_open':
> | libkmod/libkmod-file.c:282: error: 'O_CLOEXEC' undeclared (first use in this function)
> | libkmod/libkmod-file.c:282: error: (Each undeclared identifier is reported only once
> | libkmod/libkmod-file.c:282: error: for each function it appears in.)
>
> Since we are only using kmod-native for depmod, and it's a non-threaded
> user of this libary being built this should be safe to override O_CLOEXEC.
>
> Keep in mind this is ONLY effecting the native builds and not what is
> being shipped in the root file system.
>
> Signed-off-by: Matthew McClintock <msm@freescale.com>
> ---
> meta/recipes-kernel/kmod/kmod-native_git.bb | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/meta/recipes-kernel/kmod/kmod-native_git.bb b/meta/recipes-kernel/kmod/kmod-native_git.bb
> index 96de8b8..3c5e3c3 100644
> --- a/meta/recipes-kernel/kmod/kmod-native_git.bb
> +++ b/meta/recipes-kernel/kmod/kmod-native_git.bb
> @@ -4,7 +4,7 @@
> require kmod.inc
> inherit native
>
> -PR = "${INC_PR}.0"
> +PR = "${INC_PR}.1"
>
> do_install_append (){
> for tool in depmod insmod lsmod modinfo modprobe rmmod
> @@ -12,3 +12,9 @@ do_install_append (){
> ln -s kmod ${D}${bindir}/$tool
> done
> }
> +
> +do_compile_append (){
> + if ! grep O_CLOEXEC -r ${includedir_native}/bits/fcntl.h; then
> + export CFLAGS="$CFLAGS -D O_CLOEXEC=0"
> + fi
> +}
A compile append would execute after the compile. Isn't this after the
point you need the change?
Cheers,
Richard
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] kmod-native_git.bb: fix builds for hosts with older libc
2012-08-21 10:49 ` Richard Purdie
@ 2012-08-21 16:20 ` McClintock Matthew-B29882
0 siblings, 0 replies; 4+ messages in thread
From: McClintock Matthew-B29882 @ 2012-08-21 16:20 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembedded-core@lists.openembedded.org
On Tue, Aug 21, 2012 at 5:49 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> On Mon, 2012-08-20 at 13:49 -0500, Matthew McClintock wrote:
>> kmod will fail to build with the following error because O_CLOEXEC is
>> not defined:
>>
>> | libkmod/libkmod-module.c: In function 'kmod_module_get_initstate':
>> | libkmod/libkmod-module.c:1640: error: 'O_CLOEXEC' undeclared (first use in this function)
>> | libkmod/libkmod-module.c:1640: error: (Each undeclared identifier is reported only once
>> | libkmod/libkmod-module.c:1640: error: for each function it appears in.)
>> | libkmod/libkmod-module.c: In function 'kmod_module_get_refcnt':
>> | libkmod/libkmod-module.c:1754: error: 'O_CLOEXEC' undeclared (first use in this function)
>> | libkmod/libkmod-module.c: In function 'kmod_module_get_sections':
>> | libkmod/libkmod-module.c:1913: error: 'O_CLOEXEC' undeclared (first use in this function)
>> | libkmod/libkmod-file.c: In function 'kmod_file_open':
>> | libkmod/libkmod-file.c:282: error: 'O_CLOEXEC' undeclared (first use in this function)
>> | libkmod/libkmod-file.c:282: error: (Each undeclared identifier is reported only once
>> | libkmod/libkmod-file.c:282: error: for each function it appears in.)
>>
>> Since we are only using kmod-native for depmod, and it's a non-threaded
>> user of this libary being built this should be safe to override O_CLOEXEC.
>>
>> Keep in mind this is ONLY effecting the native builds and not what is
>> being shipped in the root file system.
>>
>> Signed-off-by: Matthew McClintock <msm@freescale.com>
>> ---
>> meta/recipes-kernel/kmod/kmod-native_git.bb | 8 +++++++-
>> 1 file changed, 7 insertions(+), 1 deletion(-)
>>
>> diff --git a/meta/recipes-kernel/kmod/kmod-native_git.bb b/meta/recipes-kernel/kmod/kmod-native_git.bb
>> index 96de8b8..3c5e3c3 100644
>> --- a/meta/recipes-kernel/kmod/kmod-native_git.bb
>> +++ b/meta/recipes-kernel/kmod/kmod-native_git.bb
>> @@ -4,7 +4,7 @@
>> require kmod.inc
>> inherit native
>>
>> -PR = "${INC_PR}.0"
>> +PR = "${INC_PR}.1"
>>
>> do_install_append (){
>> for tool in depmod insmod lsmod modinfo modprobe rmmod
>> @@ -12,3 +12,9 @@ do_install_append (){
>> ln -s kmod ${D}${bindir}/$tool
>> done
>> }
>> +
>> +do_compile_append (){
>> + if ! grep O_CLOEXEC -r ${includedir_native}/bits/fcntl.h; then
>> + export CFLAGS="$CFLAGS -D O_CLOEXEC=0"
>> + fi
>> +}
>
>
> A compile append would execute after the compile. Isn't this after the
> point you need the change?
Yes, and this makes me wonder what I tested...
Anyways, v2 fixed up and sent. I also needed to export the CFLAGS even
earlier so they got picked up correctly.
-M
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-08-21 16:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-20 18:49 [PATCH] kmod-native_git.bb: fix builds for hosts with older libc Matthew McClintock
2012-08-20 20:39 ` Chris Larson
2012-08-21 10:49 ` Richard Purdie
2012-08-21 16:20 ` McClintock Matthew-B29882
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox