From patchwork Mon Nov 11 12:48:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Preston X-Patchwork-Id: 1192918 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=codethink.co.uk Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47BVzb69TVz9sR4 for ; Mon, 11 Nov 2019 23:48:27 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id E9E47862E4; Mon, 11 Nov 2019 12:48:23 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7ueDuNe5oSAd; Mon, 11 Nov 2019 12:48:21 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 7172D85F33; Mon, 11 Nov 2019 12:48:21 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 1BE551BF30C for ; Mon, 11 Nov 2019 12:48:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id E828087590 for ; Mon, 11 Nov 2019 12:48:18 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id W88xxJ0-J3jb for ; Mon, 11 Nov 2019 12:48:17 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from imap1.codethink.co.uk (imap1.codethink.co.uk [176.9.8.82]) by hemlock.osuosl.org (Postfix) with ESMTPS id 99B2987568 for ; Mon, 11 Nov 2019 12:48:17 +0000 (UTC) Received: from [167.98.27.226] (helo=ct-lt-1124.office.codethink.co.uk) by imap1.codethink.co.uk with esmtpsa (Exim 4.84_2 #1 (Debian)) id 1iU978-00045Y-BJ; Mon, 11 Nov 2019 12:48:14 +0000 From: Thomas Preston To: buildroot@buildroot.org Date: Mon, 11 Nov 2019 12:48:07 +0000 Message-Id: <20191111124807.1151582-1-thomas.preston@codethink.co.uk> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Subject: [Buildroot] [PATCH] package/x11r7/xserver_xorg-server: Fix ARM build X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Preston Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The ARM sys/io.h has been removed from upstream glibc, which is in buildroot. This causes the xorg-server build to fail on ARM when using the glibc toolchain. The following patches from upstream xserver fix this, but have not yet been released. Signed-off-by: Thomas Preston Signed-off-by: Thomas Preston Signed-off-by: Thomas Preston --- ...-only-use-inx-outx-on-ARM-with-glibc.patch | 32 ++++++++++ ...t-include-sys-io.h-on-ARM-with-glibc.patch | 60 +++++++++++++++++++ 2 files changed, 92 insertions(+) create mode 100644 package/x11r7/xserver_xorg-server/1.20.5/0006-compiler.h-only-use-inx-outx-on-ARM-with-glibc.patch create mode 100644 package/x11r7/xserver_xorg-server/1.20.5/0007-compiler.h-Do-not-include-sys-io.h-on-ARM-with-glibc.patch diff --git a/package/x11r7/xserver_xorg-server/1.20.5/0006-compiler.h-only-use-inx-outx-on-ARM-with-glibc.patch b/package/x11r7/xserver_xorg-server/1.20.5/0006-compiler.h-only-use-inx-outx-on-ARM-with-glibc.patch new file mode 100644 index 0000000000..f1b27d7484 --- /dev/null +++ b/package/x11r7/xserver_xorg-server/1.20.5/0006-compiler.h-only-use-inx-outx-on-ARM-with-glibc.patch @@ -0,0 +1,32 @@ +From 6a2ce6c5da9456b97683db6224f38ef3b02cce4b Mon Sep 17 00:00:00 2001 +From: Ross Burton +Date: Thu, 20 Sep 2018 13:21:34 +0100 +Subject: [PATCH 1/2] compiler.h: only use inx/outx on ARM with glibc + +musl only implements inx/outx on x86, so check for __GLIBC__ instead of +__linux__. + +Signed-off-by: Ross Burton +--- + hw/xfree86/common/compiler.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h +index 7144c6a27..fb53ced80 100644 +--- a/hw/xfree86/common/compiler.h ++++ b/hw/xfree86/common/compiler.h +@@ -758,9 +758,9 @@ 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 */ ++/* for glibc on ARM, we use the LIBC inx/outx routines */ + /* note that the appropriate setup via "ioperm" needs to be done */ + /* *before* any inx/outx is done. */ + +-- +2.23.0 + diff --git a/package/x11r7/xserver_xorg-server/1.20.5/0007-compiler.h-Do-not-include-sys-io.h-on-ARM-with-glibc.patch b/package/x11r7/xserver_xorg-server/1.20.5/0007-compiler.h-Do-not-include-sys-io.h-on-ARM-with-glibc.patch new file mode 100644 index 0000000000..e589147fd5 --- /dev/null +++ b/package/x11r7/xserver_xorg-server/1.20.5/0007-compiler.h-Do-not-include-sys-io.h-on-ARM-with-glibc.patch @@ -0,0 +1,60 @@ +From fe4cd0e7f5c58fa94db36326aadc1bd4e6d73eba Mon Sep 17 00:00:00 2001 +From: Olivier Fourdan +Date: Mon, 1 Jul 2019 13:20:39 +0200 +Subject: [PATCH 2/2] compiler.h: Do not include sys/io.h on ARM with glibc + + on ARM hasn't worked for a long, long time, so it was removed +it from glibc upstream. + +Remove the include to avoid a compilation failure on ARM with glibc. + +Signed-off-by: Olivier Fourdan +Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/840 +--- + hw/xfree86/common/compiler.h | 30 ------------------------------ + 1 file changed, 30 deletions(-) + +diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h +index fb53ced80..2b2008b3f 100644 +--- a/hw/xfree86/common/compiler.h ++++ b/hw/xfree86/common/compiler.h +@@ -758,36 +758,6 @@ inl(unsigned short port) + return xf86ReadMmio32Le((void *) ioBase, port); + } + +-#elif defined(__arm__) && defined(__GLIBC__) +- +-/* for glibc on ARM, we use the LIBC inx/outx routines */ +-/* note that the appropriate setup via "ioperm" needs to be done */ +-/* *before* any inx/outx is done. */ +- +-#include +- +-static __inline__ void +-xf_outb(unsigned short port, unsigned char val) +-{ +- outb(val, port); +-} +- +-static __inline__ void +-xf_outw(unsigned short port, unsigned short val) +-{ +- outw(val, port); +-} +- +-static __inline__ void +-xf_outl(unsigned short port, unsigned int val) +-{ +- outl(val, port); +-} +- +-#define outb xf_outb +-#define outw xf_outw +-#define outl xf_outl +- + #elif defined(__nds32__) + + /* +-- +2.23.0 +