diff options
Diffstat (limited to 'meta/recipes-kernel/linux-libc-headers')
-rw-r--r-- | meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc | 15 | ||||
-rw-r--r-- | meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-include-linux-stddef.h-in-swab.h-uapi-header.patch | 42 | ||||
-rw-r--r-- | meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-scripts-Use-fixed-input-and-output-files-instead-of-.patch | 67 | ||||
-rw-r--r-- | meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch | 12 | ||||
-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 @@ | |||
1 | SUMMARY = "Sanitized set of kernel headers for the C library's use" | 1 | SUMMARY = "Sanitized set of kernel headers for the C library's use" |
2 | HOMEPAGE = "https://www.kernel.org/" | ||
2 | DESCRIPTION = "Designed to maintain an Application Programming Interface (API) stable version of the Linux headers" | 3 | DESCRIPTION = "Designed to maintain an Application Programming Interface (API) stable version of the Linux headers" |
3 | SECTION = "devel" | 4 | SECTION = "devel" |
4 | LICENSE = "GPLv2" | 5 | LICENSE = "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 | ||
77 | do_install_append_aarch64 () { | 80 | do_install:append:aarch64 () { |
78 | do_install_armmultilib | 81 | do_install_armmultilib |
79 | } | 82 | } |
80 | 83 | ||
81 | do_install_append_arm () { | 84 | do_install:append:arm () { |
82 | do_install_armmultilib | 85 | do_install_armmultilib |
83 | } | 86 | } |
84 | 87 | ||
85 | do_install_append_armeb () { | 88 | do_install:append:armeb () { |
86 | do_install_armmultilib | 89 | do_install_armmultilib |
87 | } | 90 | } |
88 | 91 | ||
@@ -102,8 +105,8 @@ do_install_armmultilib () { | |||
102 | 105 | ||
103 | BBCLASSEXTEND = "nativesdk" | 106 | BBCLASSEXTEND = "nativesdk" |
104 | 107 | ||
105 | RDEPENDS_${PN}-dev = "" | 108 | DEV_PKG_DEPENDENCY = "" |
106 | RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})" | 109 | RRECOMMENDS:${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})" |
107 | 110 | ||
108 | INHIBIT_DEFAULT_DEPS = "1" | 111 | INHIBIT_DEFAULT_DEPS = "1" |
109 | DEPENDS += "unifdef-native bison-native rsync-native" | 112 | DEPENDS += "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 @@ | |||
1 | From dc221138c809125dc1bbff8506c70cb7bd846368 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 12 Sep 2018 17:08:58 -0700 | ||
4 | Subject: [PATCH] include linux/stddef.h in swab.h uapi header | ||
5 | |||
6 | swab.h uses __always_inline without including the header where it is | ||
7 | defined, this is exposed by musl based distributions where this macro is | ||
8 | not defined by system C library headers unlike glibc where it is defined | ||
9 | in sys/cdefs.h and that header gets pulled in indirectly via | ||
10 | |||
11 | features.h -> sys/cdefs.h | ||
12 | |||
13 | and features.h gets pulled in a lot of headers. Therefore it may work in | ||
14 | cases where features.h is includes but not otherwise. | ||
15 | |||
16 | Adding linux/stddef.h here ensures that __always_inline is always | ||
17 | defined independent of which C library is used in userspace | ||
18 | |||
19 | Upstream-Status: Submitted [https://lkml.org/lkml/2018/9/13/78] | ||
20 | |||
21 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
22 | Cc: Philippe Ombredanne <pombredanne@nexb.com> | ||
23 | Cc: Kate Stewart <kstewart@linuxfoundation.org> | ||
24 | Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
25 | Cc: Thomas Gleixner <tglx@linutronix.de> | ||
26 | |||
27 | --- | ||
28 | include/uapi/linux/swab.h | 1 + | ||
29 | 1 file changed, 1 insertion(+) | ||
30 | |||
31 | diff --git a/include/uapi/linux/swab.h b/include/uapi/linux/swab.h | ||
32 | index 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 @@ | |||
1 | From 694eba7bb974f6b8bd308804cb24350150108b2b Mon Sep 17 00:00:00 2001 | ||
2 | From: He Zhe <zhe.he@windriver.com> | ||
3 | Date: Wed, 21 Nov 2018 15:12:43 +0800 | ||
4 | Subject: [PATCH] scripts: Use fixed input and output files instead of pipe for here-doc | ||
5 | |||
6 | There was a bug of "as" in binutils that when it checks if the input file and | ||
7 | output file are the same one, it would not check if they are on the same block | ||
8 | device. The check is introduced by the following commit in v2.31. | ||
9 | |||
10 | https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h= | ||
11 | 67f846b59b32f3d704c601669409c2584383fea9 | ||
12 | |||
13 | The here-doc usage in this script creates temporary file in /tmp. When we run in | ||
14 | an environment where /tmp has rarely been used, the newly created temporary file | ||
15 | may 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 | ||
17 | same and report the following error. | ||
18 | |||
19 | *** Compiler lacks asm-goto support.. Stop. | ||
20 | |||
21 | One observed case happened in docker where the /tmp could be so rarely used that | ||
22 | very low number inode may be allocated and triggers the error. | ||
23 | |||
24 | The fix below for the bug only exists on the master branch of binutils so far | ||
25 | and has not been released from upstream. As the convict is introduced since | ||
26 | v2.31, only v2.31 is affected. | ||
27 | |||
28 | https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h= | ||
29 | 2a50366ded329bfb39d387253450c9d5302c3503 | ||
30 | |||
31 | When building linux-libc-headers we need to use "as" in binutils which does not | ||
32 | contain the fix for the moment. To work around the error, we create a fixed | ||
33 | temporary file to contain the program being tested. | ||
34 | |||
35 | This patch also removes ">/dev/null 2>&1" so we will have more direct error | ||
36 | information in case something else wrong happened. | ||
37 | |||
38 | Upstream-Status: Inappropriate [A work around for binutils v2.31] | ||
39 | |||
40 | Signed-off-by: He Zhe <zhe.he@windriver.com> | ||
41 | --- | ||
42 | scripts/gcc-goto.sh | 5 ++++- | ||
43 | 1 file changed, 4 insertions(+), 1 deletion(-) | ||
44 | |||
45 | diff --git a/scripts/gcc-goto.sh b/scripts/gcc-goto.sh | ||
46 | index 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 | -- | ||
66 | 2.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 | ||
16 | Index: linux-4.8-rc4/include/uapi/linux/kernel.h | 16 | Index: 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 @@ | |||
1 | require linux-libc-headers.inc | 1 | require linux-libc-headers.inc |
2 | 2 | ||
3 | SRC_URI_append_libc-musl = "\ | 3 | SRC_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 | ||
10 | SRC_URI_append = "\ | 9 | SRC_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 | ||
15 | LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" | 13 | LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" |
16 | 14 | ||
17 | SRC_URI[md5sum] = "753adc474bf799d569dec4f165ed92c3" | 15 | SRC_URI[sha256sum] = "d926a06c63dd8ac7df3f86ee1ffc2ce2a3b81a2d168484e76b5b389aba8e56d0" |
18 | SRC_URI[sha256sum] = "dcdf99e43e98330d925016985bfbc7b83c66d367b714b2de0cbbfcbf83d8ca43" | 16 | |
19 | 17 | ||