summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/linux-libc-headers
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-kernel/linux-libc-headers')
-rw-r--r--meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc15
-rw-r--r--meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-include-linux-stddef.h-in-swab.h-uapi-header.patch42
-rw-r--r--meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-scripts-Use-fixed-input-and-output-files-instead-of-.patch67
-rw-r--r--meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch12
-rw-r--r--meta/recipes-kernel/linux-libc-headers/linux-libc-headers_6.6.bb (renamed from meta/recipes-kernel/linux-libc-headers/linux-libc-headers_5.10.bb)10
5 files changed, 19 insertions, 127 deletions
diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
index 7ec94024c3..3a8d32e785 100644
--- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
+++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
@@ -1,7 +1,8 @@
1SUMMARY = "Sanitized set of kernel headers for the C library's use" 1SUMMARY = "Sanitized set of kernel headers for the C library's use"
2HOMEPAGE = "https://www.kernel.org/"
2DESCRIPTION = "Designed to maintain an Application Programming Interface (API) stable version of the Linux headers" 3DESCRIPTION = "Designed to maintain an Application Programming Interface (API) stable version of the Linux headers"
3SECTION = "devel" 4SECTION = "devel"
4LICENSE = "GPLv2" 5LICENSE = "GPL-2.0-only"
5 6
6######################################################################### 7#########################################################################
7#### PLEASE READ 8#### PLEASE READ
@@ -43,6 +44,8 @@ python __anonymous () {
43 d.setVar("HEADER_FETCH_VER", "4.x") 44 d.setVar("HEADER_FETCH_VER", "4.x")
44 elif major == "5": 45 elif major == "5":
45 d.setVar("HEADER_FETCH_VER", "5.x") 46 d.setVar("HEADER_FETCH_VER", "5.x")
47 elif major == "6":
48 d.setVar("HEADER_FETCH_VER", "6.x")
46 else: 49 else:
47 d.setVar("HEADER_FETCH_VER", "2.6") 50 d.setVar("HEADER_FETCH_VER", "2.6")
48} 51}
@@ -74,15 +77,15 @@ do_install() {
74 find ${D}${includedir} -name ..install.cmd | xargs rm -f 77 find ${D}${includedir} -name ..install.cmd | xargs rm -f
75} 78}
76 79
77do_install_append_aarch64 () { 80do_install:append:aarch64 () {
78 do_install_armmultilib 81 do_install_armmultilib
79} 82}
80 83
81do_install_append_arm () { 84do_install:append:arm () {
82 do_install_armmultilib 85 do_install_armmultilib
83} 86}
84 87
85do_install_append_armeb () { 88do_install:append:armeb () {
86 do_install_armmultilib 89 do_install_armmultilib
87} 90}
88 91
@@ -102,8 +105,8 @@ do_install_armmultilib () {
102 105
103BBCLASSEXTEND = "nativesdk" 106BBCLASSEXTEND = "nativesdk"
104 107
105RDEPENDS_${PN}-dev = "" 108DEV_PKG_DEPENDENCY = ""
106RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})" 109RRECOMMENDS:${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
107 110
108INHIBIT_DEFAULT_DEPS = "1" 111INHIBIT_DEFAULT_DEPS = "1"
109DEPENDS += "unifdef-native bison-native rsync-native" 112DEPENDS += "unifdef-native bison-native rsync-native"
diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-include-linux-stddef.h-in-swab.h-uapi-header.patch b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-include-linux-stddef.h-in-swab.h-uapi-header.patch
deleted file mode 100644
index 5b7c1b6e21..0000000000
--- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-include-linux-stddef.h-in-swab.h-uapi-header.patch
+++ /dev/null
@@ -1,42 +0,0 @@
1From dc221138c809125dc1bbff8506c70cb7bd846368 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 12 Sep 2018 17:08:58 -0700
4Subject: [PATCH] include linux/stddef.h in swab.h uapi header
5
6swab.h uses __always_inline without including the header where it is
7defined, this is exposed by musl based distributions where this macro is
8not defined by system C library headers unlike glibc where it is defined
9in sys/cdefs.h and that header gets pulled in indirectly via
10
11features.h -> sys/cdefs.h
12
13and features.h gets pulled in a lot of headers. Therefore it may work in
14cases where features.h is includes but not otherwise.
15
16Adding linux/stddef.h here ensures that __always_inline is always
17defined independent of which C library is used in userspace
18
19Upstream-Status: Submitted [https://lkml.org/lkml/2018/9/13/78]
20
21Signed-off-by: Khem Raj <raj.khem@gmail.com>
22Cc: Philippe Ombredanne <pombredanne@nexb.com>
23Cc: Kate Stewart <kstewart@linuxfoundation.org>
24Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
25Cc: Thomas Gleixner <tglx@linutronix.de>
26
27---
28 include/uapi/linux/swab.h | 1 +
29 1 file changed, 1 insertion(+)
30
31diff --git a/include/uapi/linux/swab.h b/include/uapi/linux/swab.h
32index 7272f85d6..2912fe463 100644
33--- a/include/uapi/linux/swab.h
34+++ b/include/uapi/linux/swab.h
35@@ -3,6 +3,7 @@
36 #define _UAPI_LINUX_SWAB_H
37
38 #include <linux/types.h>
39+#include <linux/stddef.h>
40 #include <linux/compiler.h>
41 #include <asm/bitsperlong.h>
42 #include <asm/swab.h>
diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-scripts-Use-fixed-input-and-output-files-instead-of-.patch b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-scripts-Use-fixed-input-and-output-files-instead-of-.patch
deleted file mode 100644
index a5ded602e5..0000000000
--- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-scripts-Use-fixed-input-and-output-files-instead-of-.patch
+++ /dev/null
@@ -1,67 +0,0 @@
1From 694eba7bb974f6b8bd308804cb24350150108b2b Mon Sep 17 00:00:00 2001
2From: He Zhe <zhe.he@windriver.com>
3Date: Wed, 21 Nov 2018 15:12:43 +0800
4Subject: [PATCH] scripts: Use fixed input and output files instead of pipe for here-doc
5
6There was a bug of "as" in binutils that when it checks if the input file and
7output file are the same one, it would not check if they are on the same block
8device. The check is introduced by the following commit in v2.31.
9
10https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=
1167f846b59b32f3d704c601669409c2584383fea9
12
13The here-doc usage in this script creates temporary file in /tmp. When we run in
14an environment where /tmp has rarely been used, the newly created temporary file
15may have a very low inode number. If the inode number was 6 which is the same as
16/dev/null, the as would wrongly think the input file and the output file are the
17same and report the following error.
18
19*** Compiler lacks asm-goto support.. Stop.
20
21One observed case happened in docker where the /tmp could be so rarely used that
22very low number inode may be allocated and triggers the error.
23
24The fix below for the bug only exists on the master branch of binutils so far
25and has not been released from upstream. As the convict is introduced since
26v2.31, only v2.31 is affected.
27
28https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=
292a50366ded329bfb39d387253450c9d5302c3503
30
31When building linux-libc-headers we need to use "as" in binutils which does not
32contain the fix for the moment. To work around the error, we create a fixed
33temporary file to contain the program being tested.
34
35This patch also removes ">/dev/null 2>&1" so we will have more direct error
36information in case something else wrong happened.
37
38Upstream-Status: Inappropriate [A work around for binutils v2.31]
39
40Signed-off-by: He Zhe <zhe.he@windriver.com>
41---
42 scripts/gcc-goto.sh | 5 ++++-
43 1 file changed, 4 insertions(+), 1 deletion(-)
44
45diff --git a/scripts/gcc-goto.sh b/scripts/gcc-goto.sh
46index 8b980fb22..d256a9438 100755
47--- a/scripts/gcc-goto.sh
48+++ b/scripts/gcc-goto.sh
49@@ -3,7 +3,7 @@
50 # Test for gcc 'asm goto' support
51 # Copyright (C) 2010, Jason Baron <jbaron@redhat.com>
52
53-cat << "END" | $@ -x c - -fno-PIE -c -o /dev/null
54+cat << "END" > ./input
55 int main(void)
56 {
57 #if defined(__arm__) || defined(__aarch64__)
58@@ -20,3 +20,6 @@ entry:
59 return 0;
60 }
61 END
62+
63+$@ -x c ./input -fno-PIE -c -o ./output
64+rm ./input ./output
65--
662.19.1
67
diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch
index b5c4e1750e..b0e7014138 100644
--- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch
+++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch
@@ -13,17 +13,17 @@ Upstream-Status: Submitted
13 include/uapi/linux/kernel.h | 2 ++ 13 include/uapi/linux/kernel.h | 2 ++
14 1 file changed, 2 insertions(+) 14 1 file changed, 2 insertions(+)
15 15
16Index: linux-4.8-rc4/include/uapi/linux/kernel.h 16Index: linux-5.12.11/include/uapi/linux/kernel.h
17=================================================================== 17===================================================================
18--- linux-4.8-rc4.orig/include/uapi/linux/kernel.h 18--- linux-5.12.11.orig/include/uapi/linux/kernel.h
19+++ linux-4.8-rc4/include/uapi/linux/kernel.h 19+++ linux-5.12.11/include/uapi/linux/kernel.h
20@@ -1,7 +1,9 @@ 20@@ -2,7 +2,9 @@
21 #ifndef _UAPI_LINUX_KERNEL_H 21 #ifndef _UAPI_LINUX_KERNEL_H
22 #define _UAPI_LINUX_KERNEL_H 22 #define _UAPI_LINUX_KERNEL_H
23 23
24+#ifdef __GLIBC__ 24+#ifdef __GLIBC__
25 #include <linux/sysinfo.h> 25 #include <linux/sysinfo.h>
26 #include <linux/const.h>
26+#endif 27+#endif
27 28
28 /* 29 #endif /* _UAPI_LINUX_KERNEL_H */
29 * 'kernel.h' contains some often-used function prototypes etc
diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_5.10.bb b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_6.6.bb
index d6a4d5aa61..d68de6ec7e 100644
--- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_5.10.bb
+++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_6.6.bb
@@ -1,19 +1,17 @@
1require linux-libc-headers.inc 1require linux-libc-headers.inc
2 2
3SRC_URI_append_libc-musl = "\ 3SRC_URI:append:libc-musl = "\
4 file://0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch \ 4 file://0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch \
5 file://0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch \ 5 file://0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch \
6 file://0001-libc-compat.h-musl-_does_-define-IFF_LOWER_UP-DORMAN.patch \ 6 file://0001-libc-compat.h-musl-_does_-define-IFF_LOWER_UP-DORMAN.patch \
7 file://0001-include-linux-stddef.h-in-swab.h-uapi-header.patch \
8 " 7 "
9 8
10SRC_URI_append = "\ 9SRC_URI += "\
11 file://0001-scripts-Use-fixed-input-and-output-files-instead-of-.patch \
12 file://0001-kbuild-install_headers.sh-Strip-_UAPI-from-if-define.patch \ 10 file://0001-kbuild-install_headers.sh-Strip-_UAPI-from-if-define.patch \
13" 11"
14 12
15LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" 13LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
16 14
17SRC_URI[md5sum] = "753adc474bf799d569dec4f165ed92c3" 15SRC_URI[sha256sum] = "d926a06c63dd8ac7df3f86ee1ffc2ce2a3b81a2d168484e76b5b389aba8e56d0"
18SRC_URI[sha256sum] = "dcdf99e43e98330d925016985bfbc7b83c66d367b714b2de0cbbfcbf83d8ca43" 16
19 17