diff options
author | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
---|---|---|
committer | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
commit | 1c7d6584a7811b7785ae5c1e378f14b5ba0971cf (patch) | |
tree | cd70a267a5ef105ba32f200aa088e281fbd85747 /external/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers | |
parent | 4204309872da5cb401cbb2729d9e2d4869a87f42 (diff) |
basesystem-jjsandbox/ToshikazuOhiwa/master-jj
recipes
Diffstat (limited to 'external/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers')
4 files changed, 105 insertions, 61 deletions
diff --git a/external/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-if_ether-move-muslc-ethhdr-protection-to-uapi-file.patch b/external/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-if_ether-move-muslc-ethhdr-protection-to-uapi-file.patch deleted file mode 100644 index 68b24469..00000000 --- a/external/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-if_ether-move-muslc-ethhdr-protection-to-uapi-file.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 897736166fd709906a5fdf16eb23f8fddff770b5 Mon Sep 17 00:00:00 2001 -From: Bruce Ashfield <bruce.ashfield@windriver.com> -Date: Thu, 1 Mar 2018 18:31:01 -0500 -Subject: [PATCH] if_ether: move muslc ethhdr protection to uapi file - -Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> -Upstream-Status: Pending ---- - include/uapi/linux/if_ether.h | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/include/uapi/linux/if_ether.h b/include/uapi/linux/if_ether.h -index 153c9c2..7b69b73 100644 ---- a/include/uapi/linux/if_ether.h -+++ b/include/uapi/linux/if_ether.h -@@ -149,6 +149,12 @@ - * This is an Ethernet frame header. - */ - -+#ifdef _NETINET_IF_ETHER_H /* musl */ -+#define __UAPI_DEF_ETHHDR 0 -+#else /* glibc uses __NETINET_IF_ETHER_H, and includes the kernel header. */ -+#define __UAPI_DEF_ETHHDR 1 -+#endif -+ - /* allow libcs like musl to deactivate this, glibc does not implement this. */ - #ifndef __UAPI_DEF_ETHHDR - #define __UAPI_DEF_ETHHDR 1 --- -2.7.4 - diff --git a/external/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-kbuild-install_headers.sh-Strip-_UAPI-from-if-define.patch b/external/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-kbuild-install_headers.sh-Strip-_UAPI-from-if-define.patch new file mode 100644 index 00000000..54528b6e --- /dev/null +++ b/external/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-kbuild-install_headers.sh-Strip-_UAPI-from-if-define.patch @@ -0,0 +1,38 @@ +From 9ca6c6a510bda90954aa2532711200b89dd1df89 Mon Sep 17 00:00:00 2001 +From: Dave Martin <Dave.Martin@arm.com> +Date: Tue, 11 Dec 2018 19:26:45 +0000 +Subject: [PATCH 1/3] kbuild: install_headers.sh: Strip _UAPI from + #if-defined() guards + +install_headers.sh knows how to strip the _UAPI prefix from #ifdef/ +ifndef and #define directives used to guard headers against multiple +or inappropriate inclusion. Currently this does not work for guards +in the "#if defined()" style, which may be needed for non-trivial +cases. + +This patch adds similar logic so that the _UAPI prefix is also +stripped from guard directives written using "#if defined()" etc. + +This is not completely foolproof, but will work for simple cases of +using #if defined() to guard against inappropriate header inclusion. + +Signed-off-by: Dave Martin <Dave.Martin@arm.com> +Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> + +Upstream-Status: Submitted [https://www.spinics.net/lists/arm-kernel/msg694800.html] +--- + scripts/headers_install.sh | 1 + + 1 file changed, 1 insertion(+) + +Index: linux-5.4/scripts/headers_install.sh +=================================================================== +--- linux-5.4.orig/scripts/headers_install.sh ++++ linux-5.4/scripts/headers_install.sh +@@ -36,6 +36,7 @@ + s/(^|[^a-zA-Z0-9])__packed([^a-zA-Z0-9_]|$)/\1__attribute__((packed))\2/g + s/(^|[[:space:](])(inline|asm|volatile)([[:space:](]|$)/\1__\2__\3/g + s@#(ifndef|define|endif[[:space:]]*/[*])[[:space:]]*_UAPI@#\1 @ ++ :1;s/(#(if|elif)(.*[^A-Za-z0-9_])defined\([[:space:]]*)_UAPI/\1/;t1 + ' $INFILE > $TMPFILE || exit 1 + + scripts/unifdef -U__KERNEL__ -D__EXPORTED_HEADERS__ $TMPFILE > $OUTFILE diff --git a/external/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-scripts-Use-fixed-input-and-output-files-instead-of-.patch b/external/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-scripts-Use-fixed-input-and-output-files-instead-of-.patch new file mode 100644 index 00000000..a5ded602 --- /dev/null +++ b/external/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-scripts-Use-fixed-input-and-output-files-instead-of-.patch @@ -0,0 +1,67 @@ +From 694eba7bb974f6b8bd308804cb24350150108b2b Mon Sep 17 00:00:00 2001 +From: He Zhe <zhe.he@windriver.com> +Date: Wed, 21 Nov 2018 15:12:43 +0800 +Subject: [PATCH] scripts: Use fixed input and output files instead of pipe for here-doc + +There was a bug of "as" in binutils that when it checks if the input file and +output file are the same one, it would not check if they are on the same block +device. The check is introduced by the following commit in v2.31. + +https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h= +67f846b59b32f3d704c601669409c2584383fea9 + +The here-doc usage in this script creates temporary file in /tmp. When we run in +an environment where /tmp has rarely been used, the newly created temporary file +may have a very low inode number. If the inode number was 6 which is the same as +/dev/null, the as would wrongly think the input file and the output file are the +same and report the following error. + +*** Compiler lacks asm-goto support.. Stop. + +One observed case happened in docker where the /tmp could be so rarely used that +very low number inode may be allocated and triggers the error. + +The fix below for the bug only exists on the master branch of binutils so far +and has not been released from upstream. As the convict is introduced since +v2.31, only v2.31 is affected. + +https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h= +2a50366ded329bfb39d387253450c9d5302c3503 + +When building linux-libc-headers we need to use "as" in binutils which does not +contain the fix for the moment. To work around the error, we create a fixed +temporary file to contain the program being tested. + +This patch also removes ">/dev/null 2>&1" so we will have more direct error +information in case something else wrong happened. + +Upstream-Status: Inappropriate [A work around for binutils v2.31] + +Signed-off-by: He Zhe <zhe.he@windriver.com> +--- + scripts/gcc-goto.sh | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/scripts/gcc-goto.sh b/scripts/gcc-goto.sh +index 8b980fb22..d256a9438 100755 +--- a/scripts/gcc-goto.sh ++++ b/scripts/gcc-goto.sh +@@ -3,7 +3,7 @@ + # Test for gcc 'asm goto' support + # Copyright (C) 2010, Jason Baron <jbaron@redhat.com> + +-cat << "END" | $@ -x c - -fno-PIE -c -o /dev/null ++cat << "END" > ./input + int main(void) + { + #if defined(__arm__) || defined(__aarch64__) +@@ -20,3 +20,6 @@ entry: + return 0; + } + END ++ ++$@ -x c ./input -fno-PIE -c -o ./output ++rm ./input ./output +-- +2.19.1 + diff --git a/external/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch b/external/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch deleted file mode 100644 index fb7e1de1..00000000 --- a/external/poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 75ba4a547282f91d653872a4bba5f5eae234ea6c Mon Sep 17 00:00:00 2001 -From: rofl0r <retnyg@gmx.net> -Date: Wed, 22 Jan 2014 00:57:48 +0100 -Subject: [PATCH 2/3] libc-compat.h: prevent redefinition of struct ethhdr - ---- -Signed-off-by: Khem Raj <raj.khem@gmail.com> -Upstream-Status: Submitted - - include/uapi/linux/if_ether.h | 4 +++- - include/uapi/linux/libc-compat.h | 6 ++++++ - 2 files changed, 9 insertions(+), 1 deletion(-) - -Index: linux-4.15/include/uapi/linux/libc-compat.h -=================================================================== ---- linux-4.15.orig/include/uapi/linux/libc-compat.h 2018-02-05 17:40:42.338370731 -0500 -+++ linux-4.15/include/uapi/linux/libc-compat.h 2018-02-05 17:40:42.334370603 -0500 -@@ -51,6 +51,12 @@ - - #ifndef __KERNEL__ /* we're used from userspace */ - -+#ifdef _NETINET_IF_ETHER_H /* musl */ -+#define __UAPI_DEF_ETHHDR 0 -+#else /* glibc uses __NETINET_IF_ETHER_H, and includes the kernel header. */ -+#define __UAPI_DEF_ETHHDR 1 -+#endif -+ - /* Coordinate with libc net/if.h header. */ - #if defined(_NET_IF_H) - |