Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/libpciaccess: fix musl build
@ 2016-01-24 15:21 Bernd Kuhls
  2016-01-24 15:21 ` [Buildroot] [PATCH 2/2] package/x11r7/xserver_xorg-server: " Bernd Kuhls
  2016-01-26 20:43 ` [Buildroot] [PATCH 1/2] package/libpciaccess: " Thomas Petazzoni
  0 siblings, 2 replies; 4+ messages in thread
From: Bernd Kuhls @ 2016-01-24 15:21 UTC (permalink / raw)
  To: buildroot

Also added note about upstream commit to patch 0001.

Fixes
http://autobuild.buildroot.net/results/e86/e869e08779626ac578017e6b34a82adf156d12f8/
http://autobuild.buildroot.net/results/0bf/0bf803654e7298d5cd0b31fc55b1babdcd2f8765/
http://autobuild.buildroot.net/results/f5a/f5a516cf6c25af89000019b6789d5a003099cdff/

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 package/libpciaccess/0001-limits_h.patch |  4 ++--
 package/libpciaccess/0002-musl-arm.patch | 20 ++++++++++++++++++++
 2 files changed, 22 insertions(+), 2 deletions(-)
 create mode 100644 package/libpciaccess/0002-musl-arm.patch

diff --git a/package/libpciaccess/0001-limits_h.patch b/package/libpciaccess/0001-limits_h.patch
index 9afa203..c5c8444 100644
--- a/package/libpciaccess/0001-limits_h.patch
+++ b/package/libpciaccess/0001-limits_h.patch
@@ -3,8 +3,8 @@ Fix compilation error with musl-based toolchain
 linux_sysfs.c:751:15: error: 'PATH_MAX' undeclared (first use in this function)
      char name[PATH_MAX];
 
-Patch already sent upstream by Felix Janda
-http://lists.x.org/archives/xorg-devel/2014-December/044723.html
+Patch applied upstream:
+http://cgit.freedesktop.org/xorg/lib/libpciaccess/commit/?id=8ea3af620a2d4ad5648917b4a0ef2b23ff566774
 
 Signed-off-by: Felix Janda <felix.janda@posteo.de>
 Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
diff --git a/package/libpciaccess/0002-musl-arm.patch b/package/libpciaccess/0002-musl-arm.patch
new file mode 100644
index 0000000..0077f45
--- /dev/null
+++ b/package/libpciaccess/0002-musl-arm.patch
@@ -0,0 +1,20 @@
+Fix musl build
+
+Inspired by http://patchwork.openembedded.org/patch/111661/
+"inb/outb are implemented for ARM on glibc but not on linux in general
+therefore the conditional has to reflect that"
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+
+diff -uNr libpciaccess-0.13.4.org/src/linux_sysfs.c libpciaccess-0.13.4/src/linux_sysfs.c
+--- libpciaccess-0.13.4.org/src/linux_sysfs.c	2015-05-01 06:44:47.000000000 +0200
++++ libpciaccess-0.13.4/src/linux_sysfs.c	2016-01-24 15:27:57.141562678 +0100
+@@ -49,7 +49,7 @@
+ #include <dirent.h>
+ #include <errno.h>
+ 
+-#if defined(__i386__) || defined(__x86_64__) || defined(__arm__)
++#if defined(__i386__) || defined(__x86_64__)
+ #include <sys/io.h>
+ #else
+ #define inb(x) -1
-- 
2.7.0.rc3

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

* [Buildroot] [PATCH 2/2] package/x11r7/xserver_xorg-server: fix musl build
  2016-01-24 15:21 [Buildroot] [PATCH 1/2] package/libpciaccess: fix musl build Bernd Kuhls
@ 2016-01-24 15:21 ` Bernd Kuhls
  2016-01-26 20:45   ` Thomas Petazzoni
  2016-01-26 20:43 ` [Buildroot] [PATCH 1/2] package/libpciaccess: " Thomas Petazzoni
  1 sibling, 1 reply; 4+ messages in thread
From: Bernd Kuhls @ 2016-01-24 15:21 UTC (permalink / raw)
  To: buildroot

The autobuilders did not catch the error yet because they failed
earlier with other packages, but I am continuing the build based
on the defconfig from:
http://autobuild.buildroot.net/results/6fb/6fbe96af007803acfe9deacf26399cb19e5f2b47/defconfig

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 .../0002-musl-arm-inb-outb.patch                   | 25 ++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 package/x11r7/xserver_xorg-server/0002-musl-arm-inb-outb.patch

diff --git a/package/x11r7/xserver_xorg-server/0002-musl-arm-inb-outb.patch b/package/x11r7/xserver_xorg-server/0002-musl-arm-inb-outb.patch
new file mode 100644
index 0000000..14ddc1c
--- /dev/null
+++ b/package/x11r7/xserver_xorg-server/0002-musl-arm-inb-outb.patch
@@ -0,0 +1,25 @@
+Fix musl build
+
+Downloaded from http://patchwork.openembedded.org/patch/111661/
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+
+
+inb/outb family for arm is only implemented on glibc
+so assumption across linux is wrong
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+Index: xorg-server-1.18.0/hw/xfree86/common/compiler.h
+===================================================================
+--- xorg-server-1.18.0.orig/hw/xfree86/common/compiler.h
++++ xorg-server-1.18.0/hw/xfree86/common/compiler.h
+@@ -758,7 +758,7 @@ inl(unsigned short port)
+     return xf86ReadMmio32Le((void *) ioBase, port);
+ }
+ 
+-#elif defined(__arm__) && defined(__linux__)
++#elif defined(__arm__) && defined(__GLIBC__)
+ 
+ /* for Linux on ARM, we use the LIBC inx/outx routines */
+ /* note that the appropriate setup via "ioperm" needs to be done */
-- 
2.7.0.rc3

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

* [Buildroot] [PATCH 1/2] package/libpciaccess: fix musl build
  2016-01-24 15:21 [Buildroot] [PATCH 1/2] package/libpciaccess: fix musl build Bernd Kuhls
  2016-01-24 15:21 ` [Buildroot] [PATCH 2/2] package/x11r7/xserver_xorg-server: " Bernd Kuhls
@ 2016-01-26 20:43 ` Thomas Petazzoni
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2016-01-26 20:43 UTC (permalink / raw)
  To: buildroot

Dear Bernd Kuhls,

On Sun, 24 Jan 2016 16:21:58 +0100, Bernd Kuhls wrote:
> Also added note about upstream commit to patch 0001.
> 
> Fixes
> http://autobuild.buildroot.net/results/e86/e869e08779626ac578017e6b34a82adf156d12f8/
> http://autobuild.buildroot.net/results/0bf/0bf803654e7298d5cd0b31fc55b1babdcd2f8765/
> http://autobuild.buildroot.net/results/f5a/f5a516cf6c25af89000019b6789d5a003099cdff/
> 
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
>  package/libpciaccess/0001-limits_h.patch |  4 ++--
>  package/libpciaccess/0002-musl-arm.patch | 20 ++++++++++++++++++++
>  2 files changed, 22 insertions(+), 2 deletions(-)
>  create mode 100644 package/libpciaccess/0002-musl-arm.patch

Applied, thanks. Please submit patch 0002 to the upstream project. It
is worth mentioning that your patch is identical to the one used by
Alpine Linux:
http://git.alpinelinux.org/cgit/aports/tree/main/libpciaccess/fix-arm.patch.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH 2/2] package/x11r7/xserver_xorg-server: fix musl build
  2016-01-24 15:21 ` [Buildroot] [PATCH 2/2] package/x11r7/xserver_xorg-server: " Bernd Kuhls
@ 2016-01-26 20:45   ` Thomas Petazzoni
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2016-01-26 20:45 UTC (permalink / raw)
  To: buildroot

Dear Bernd Kuhls,

On Sun, 24 Jan 2016 16:21:59 +0100, Bernd Kuhls wrote:
> The autobuilders did not catch the error yet because they failed
> earlier with other packages, but I am continuing the build based
> on the defconfig from:
> http://autobuild.buildroot.net/results/6fb/6fbe96af007803acfe9deacf26399cb19e5f2b47/defconfig
> 
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
>  .../0002-musl-arm-inb-outb.patch                   | 25 ++++++++++++++++++++++
>  1 file changed, 25 insertions(+)
>  create mode 100644 package/x11r7/xserver_xorg-server/0002-musl-arm-inb-outb.patch

Alpine Linux has a similar patch, but it's doing one more thing:
http://git.alpinelinux.org/cgit/aports/tree/main/xorg-server/fix-musl-arm.patch.

Can you check this ?

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

end of thread, other threads:[~2016-01-26 20:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-24 15:21 [Buildroot] [PATCH 1/2] package/libpciaccess: fix musl build Bernd Kuhls
2016-01-24 15:21 ` [Buildroot] [PATCH 2/2] package/x11r7/xserver_xorg-server: " Bernd Kuhls
2016-01-26 20:45   ` Thomas Petazzoni
2016-01-26 20:43 ` [Buildroot] [PATCH 1/2] package/libpciaccess: " Thomas Petazzoni

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