Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v1] package/libdrm: fix nouveau tests compile for musl
@ 2019-11-25 20:55 Peter Seiderer
  2019-11-26 21:51 ` Thomas Petazzoni
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Seiderer @ 2019-11-25 20:55 UTC (permalink / raw)
  To: buildroot

Add openembedded provided patch [2] to fix musl toolchain compile failures
because of different ioctl() signatures, (int, int, ...) vs. (int, unsigned
long, ...).

Fixes:

  ../tests/nouveau/threaded.c:39:5: error: conflicting types for 'ioctl'
  int ioctl(int fd, unsigned long request, ...)

[1] http://autobuild.buildroot.net/results/047f149a928ac2a17e25211a0a8a264ebae369ac
[2] https://github.com/openembedded/openembedded-core/blob/master/meta/recipes-graphics/drm/libdrm/musl-ioctl.patch

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
 ...uveau-threaded-adapt-ioctl-signature.patch | 37 +++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 package/libdrm/0006-tests-nouveau-threaded-adapt-ioctl-signature.patch

diff --git a/package/libdrm/0006-tests-nouveau-threaded-adapt-ioctl-signature.patch b/package/libdrm/0006-tests-nouveau-threaded-adapt-ioctl-signature.patch
new file mode 100644
index 0000000000..80845709da
--- /dev/null
+++ b/package/libdrm/0006-tests-nouveau-threaded-adapt-ioctl-signature.patch
@@ -0,0 +1,37 @@
+From 6c7b305869b941e52cb846cbed5e4a5c85d035d9 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Mon, 18 Jun 2018 15:07:03 +0100
+Subject: [PATCH] tests/nouveau/threaded: adapt ioctl signature
+
+POSIX says ioctl() has the signature (int, int, ...) but glibc has decided to
+use (int, unsigned long int, ...) instead.
+
+Use a #ifdef to adapt the replacement function as appropriate.
+
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+[Taken from https://raw.githubusercontent.com/openembedded/openembedded-core/master/meta/recipes-graphics/drm/libdrm/musl-ioctl.patch]
+Signed-off-by: Peter Seiderer <ps.report@gmx.net>
+---
+ tests/nouveau/threaded.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/tests/nouveau/threaded.c b/tests/nouveau/threaded.c
+index 3669bcd..e1c27c0 100644
+--- a/tests/nouveau/threaded.c
++++ b/tests/nouveau/threaded.c
+@@ -36,7 +36,11 @@ static int failed;
+ 
+ static int import_fd;
+ 
++#ifdef __GLIBC__
+ int ioctl(int fd, unsigned long request, ...)
++#else
++int ioctl(int fd, int request, ...)
++#endif
+ {
+ 	va_list va;
+ 	int ret;
+-- 
+2.24.0
+
-- 
2.24.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH v1] package/libdrm: fix nouveau tests compile for musl
  2019-11-25 20:55 [Buildroot] [PATCH v1] package/libdrm: fix nouveau tests compile for musl Peter Seiderer
@ 2019-11-26 21:51 ` Thomas Petazzoni
  2019-11-26 22:38   ` Peter Seiderer
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2019-11-26 21:51 UTC (permalink / raw)
  To: buildroot

On Mon, 25 Nov 2019 21:55:20 +0100
Peter Seiderer <ps.report@gmx.net> wrote:

> Add openembedded provided patch [2] to fix musl toolchain compile failures
> because of different ioctl() signatures, (int, int, ...) vs. (int, unsigned
> long, ...).
> 
> Fixes:
> 
>   ../tests/nouveau/threaded.c:39:5: error: conflicting types for 'ioctl'
>   int ioctl(int fd, unsigned long request, ...)
> 
> [1] http://autobuild.buildroot.net/results/047f149a928ac2a17e25211a0a8a264ebae369ac
> [2] https://github.com/openembedded/openembedded-core/blob/master/meta/recipes-graphics/drm/libdrm/musl-ioctl.patch
> 
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> ---
>  ...uveau-threaded-adapt-ioctl-signature.patch | 37 +++++++++++++++++++
>  1 file changed, 37 insertions(+)
>  create mode 100644 package/libdrm/0006-tests-nouveau-threaded-adapt-ioctl-signature.patch

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH v1] package/libdrm: fix nouveau tests compile for musl
  2019-11-26 21:51 ` Thomas Petazzoni
@ 2019-11-26 22:38   ` Peter Seiderer
  2019-11-28 21:23     ` Peter Seiderer
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Seiderer @ 2019-11-26 22:38 UTC (permalink / raw)
  To: buildroot

Hello Thomas,

On Tue, 26 Nov 2019 22:51:46 +0100, Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:

> On Mon, 25 Nov 2019 21:55:20 +0100
> Peter Seiderer <ps.report@gmx.net> wrote:
>
> > Add openembedded provided patch [2] to fix musl toolchain compile failures
> > because of different ioctl() signatures, (int, int, ...) vs. (int, unsigned
> > long, ...).
> >
> > Fixes:
> >
> >   ../tests/nouveau/threaded.c:39:5: error: conflicting types for 'ioctl'
> >   int ioctl(int fd, unsigned long request, ...)
> >
> > [1] http://autobuild.buildroot.net/results/047f149a928ac2a17e25211a0a8a264ebae369ac
> > [2] https://github.com/openembedded/openembedded-core/blob/master/meta/recipes-graphics/drm/libdrm/musl-ioctl.patch
> >
> > Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> > ---
> >  ...uveau-threaded-adapt-ioctl-signature.patch | 37 +++++++++++++++++++
> >  1 file changed, 37 insertions(+)
> >  create mode 100644 package/libdrm/0006-tests-nouveau-threaded-adapt-ioctl-signature.patch
>
> Applied to master, thanks.

And finally suggested upstream, see [1]...and the same for two more old ones, see [2] and [3]...

Regards,
Peter

[1] https://gitlab.freedesktop.org/mesa/drm/merge_requests/30
[2] https://gitlab.freedesktop.org/mesa/drm/merge_requests/27
[3] https://gitlab.freedesktop.org/mesa/drm/merge_requests/28


>
> Thomas

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH v1] package/libdrm: fix nouveau tests compile for musl
  2019-11-26 22:38   ` Peter Seiderer
@ 2019-11-28 21:23     ` Peter Seiderer
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Seiderer @ 2019-11-28 21:23 UTC (permalink / raw)
  To: buildroot

Hello Thomas,

On Tue, 26 Nov 2019 23:38:47 +0100, Peter Seiderer <ps.report@gmx.net> wrote:

> Hello Thomas,
>
> On Tue, 26 Nov 2019 22:51:46 +0100, Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:
>
> > On Mon, 25 Nov 2019 21:55:20 +0100
> > Peter Seiderer <ps.report@gmx.net> wrote:
> >
> > > Add openembedded provided patch [2] to fix musl toolchain compile failures
> > > because of different ioctl() signatures, (int, int, ...) vs. (int, unsigned
> > > long, ...).
> > >
> > > Fixes:
> > >
> > >   ../tests/nouveau/threaded.c:39:5: error: conflicting types for 'ioctl'
> > >   int ioctl(int fd, unsigned long request, ...)
> > >
> > > [1] http://autobuild.buildroot.net/results/047f149a928ac2a17e25211a0a8a264ebae369ac
> > > [2] https://github.com/openembedded/openembedded-core/blob/master/meta/recipes-graphics/drm/libdrm/musl-ioctl.patch
> > >
> > > Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> > > ---
> > >  ...uveau-threaded-adapt-ioctl-signature.patch | 37 +++++++++++++++++++
> > >  1 file changed, 37 insertions(+)
> > >  create mode 100644 package/libdrm/0006-tests-nouveau-threaded-adapt-ioctl-signature.patch
> >
> > Applied to master, thanks.
>
> And finally suggested upstream, see [1]...and the same for two more old ones, see [2] and [3]...

And as the way through gitlab merge requests seems to be the right one (instead
of the mailing list), re-submitted two more old buildroot patches, see [4], [5]...

Regards,
Peter

[4] https://gitlab.freedesktop.org/mesa/drm/merge_requests/31
[5] https://gitlab.freedesktop.org/mesa/drm/merge_requests/32

>
> Regards,
> Peter
>
> [1] https://gitlab.freedesktop.org/mesa/drm/merge_requests/30
> [2] https://gitlab.freedesktop.org/mesa/drm/merge_requests/27
> [3] https://gitlab.freedesktop.org/mesa/drm/merge_requests/28
>
>
> >
> > Thomas
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-11-28 21:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-25 20:55 [Buildroot] [PATCH v1] package/libdrm: fix nouveau tests compile for musl Peter Seiderer
2019-11-26 21:51 ` Thomas Petazzoni
2019-11-26 22:38   ` Peter Seiderer
2019-11-28 21:23     ` Peter Seiderer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox