[oe-commits] Bruce Ashfield : linux-libc-headers: fix MIPS klibc build error

git at git.openembedded.org git at git.openembedded.org
Sun Feb 9 11:01:51 UTC 2014


Module: openembedded-core.git
Branch: dora
Commit: 45dbd265e08e69cbc95625d57e9b0c0cb5b0b225
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=45dbd265e08e69cbc95625d57e9b0c0cb5b0b225

Author: Bruce Ashfield <bruce.ashfield at windriver.com>
Date:   Tue Dec 10 10:16:15 2013 -0500

linux-libc-headers: fix MIPS klibc build error

As reported by Andrea Adami, klibc fails to build for MIPS with the 3.10 libc-headers

commit ca044f9a [UAPI: fix endianness conditionals in linux/raid/md_p.h] is the root
cause of the breakage.

This is fixed in the kernel source itself, but we must also carry the
change in the linux-libc-headers recipe, until we update past the
3.13 kernel.

With this change, we can again build klibc for mips, with no impact
on the rest of the system.

cc: Andrea Adami <andrea.adami at gmail.com>
(From OE-Core master rev: f2f8a2a05cbfff7e1d5d979ec1b9f4f371579fb9)

Signed-off-by: Bruce Ashfield <bruce.ashfield at windriver.com>
Signed-off-by: Saul Wold <sgw at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang at windriver.com>

---

 ...lude-asm-byteorder.h-in-linux-raid-md_p.h.patch | 34 ++++++++++++++++++++++
 .../linux-libc-headers/linux-libc-headers_3.10.bb  |  3 ++
 2 files changed, 37 insertions(+)

diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/UAPI-include-asm-byteorder.h-in-linux-raid-md_p.h.patch b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/UAPI-include-asm-byteorder.h-in-linux-raid-md_p.h.patch
new file mode 100644
index 0000000..1bf0e7e
--- /dev/null
+++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/UAPI-include-asm-byteorder.h-in-linux-raid-md_p.h.patch
@@ -0,0 +1,34 @@
+From c0f8bd146a8b3e630798561c605f5669823107af Mon Sep 17 00:00:00 2001
+From: Aurelien Jarno <aurelien at aurel32.net>
+Date: Thu, 14 Nov 2013 15:16:19 +1100
+Subject: [PATCH] UAPI: include <asm/byteorder.h> in linux/raid/md_p.h
+
+linux/raid/md_p.h is using conditionals depending on endianess and fails
+with an error if neither of __BIG_ENDIAN, __LITTLE_ENDIAN or
+__BYTE_ORDER are defined, but it doesn't include any header which can
+define these constants. This make this header unusable alone.
+
+This patch adds a #include <asm/byteorder.h> at the beginning of this
+header to make it usable alone. This is needed to compile klibc on MIPS.
+
+Signed-off-by: Aurelien Jarno <aurelien at aurel32.net>
+Signed-off-by: NeilBrown <neilb at suse.de>
+---
+ include/uapi/linux/raid/md_p.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/include/uapi/linux/raid/md_p.h b/include/uapi/linux/raid/md_p.h
+index fe1a540..f7cf7f3 100644
+--- a/include/uapi/linux/raid/md_p.h
++++ b/include/uapi/linux/raid/md_p.h
+@@ -16,6 +16,7 @@
+ #define _MD_P_H
+ 
+ #include <linux/types.h>
++#include <asm/byteorder.h>
+ 
+ /*
+  * RAID superblock.
+-- 
+1.8.1.2
+
diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.10.bb b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.10.bb
index 65df230..a78d4ba 100644
--- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.10.bb
+++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.10.bb
@@ -3,6 +3,9 @@ require linux-libc-headers.inc
 SRC_URI += "file://0001-ptrace.h-remove-ptrace_peeksiginfo_args.patch"
 SRC_URI += "file://scripts-Makefile.headersinst-install-headers-from-sc.patch"
 
+# fixes klibc build for MIPS, drop when libc-headers > 3.13
+SRC_URI += "file://UAPI-include-asm-byteorder.h-in-linux-raid-md_p.h.patch"
+
 SRC_URI[md5sum] = "72d0a9b3e60cd86fabcd3f24b1708944"
 SRC_URI[sha256sum] = "46c9e55e1fddf40813b8d697d5645037a8e2af5c1a8dff52b3fe82b5021582b8"
 



More information about the Openembedded-commits mailing list