aboutsummaryrefslogtreecommitdiffstats
path: root/main/linux-headers
diff options
context:
space:
mode:
Diffstat (limited to 'main/linux-headers')
-rw-r--r--main/linux-headers/APKBUILD23
-rw-r--r--main/linux-headers/include-uapi-linux-swab-Fix-potentially-missing-__always_inline.patch56
2 files changed, 64 insertions, 15 deletions
diff --git a/main/linux-headers/APKBUILD b/main/linux-headers/APKBUILD
index dd5ccc84a0..0100831955 100644
--- a/main/linux-headers/APKBUILD
+++ b/main/linux-headers/APKBUILD
@@ -2,7 +2,7 @@
pkgname=linux-headers
pkgver=5.4.5
_kernver=${pkgver%.*}
-pkgrel=0
+pkgrel=1
pkgdesc="Linux system headers"
url="http://kernel.org"
arch="all"
@@ -13,22 +13,15 @@ source="https://kernel.org/pub/linux/kernel/v5.x/linux-$_kernver.tar.xz
https://kernel.org/pub/linux/kernel/v5.x/patch-$pkgver.xz
revert-broken-uapi.patch
0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch
+ include-uapi-linux-swab-Fix-potentially-missing-__always_inline.patch
"
+builddir="$srcdir/linux-$_kernver"
prepare() {
- cd "$srcdir"/linux-$_kernver
if [ "$_kernver" != "$pkgver" ]; then
- unxz -c < "$srcdir"/patch-$pkgver.xz | patch -p1 || return 1
+ unxz -c < "$srcdir"/patch-$pkgver.xz | patch -p1
fi
- for i in $source; do
- case $i in
- *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
- esac
- done
-}
-
-build() {
- return 0
+ default_prepare
}
package() {
@@ -43,9 +36,8 @@ package() {
# not sure about this -- ppc64*) _carch="powerpc64" ;;
esac
- cd "$srcdir"/linux-$_kernver
mkdir -p "$pkgdir/usr"
- make headers_install ARCH="${_carch}" INSTALL_HDR_PATH="$pkgdir/usr" || return 1
+ make headers_install ARCH="$_carch" INSTALL_HDR_PATH="$pkgdir/usr"
find "$pkgdir/usr" \( -name .install -o -name ..install.cmd \) -exec \
rm -f {} \;
@@ -57,4 +49,5 @@ package() {
sha512sums="9f60f77e8ab972b9438ac648bed17551c8491d6585a5e85f694b2eaa4c623fbc61eb18419b2656b6795eac5deec0edaa04547fc6723fbda52256bd7f3486898f linux-5.4.tar.xz
5c33d5db4d6787d7841a82dd8dc5b38dd80c5706bdaf9bd331e82173302a4cf3bc9c5e1d00f489d3d78b54bc1f8f82f34df2fcd47b1ab4ffb0a01dc7bdc06cff patch-5.4.5.xz
32597f2672d1ec365a936d15041a7cf219ef9353241d4a5c378244cf2fc155610443a19bbcd391c86099a0b08486c45e042ec7c90b0d04fe675c3ad0ffc36b53 revert-broken-uapi.patch
-302283b1b5f560c850e24aad73febcf7f906ed62b4cad2d826bf140ffe59191631f3cd4ac29525c349cdfe61aba6a47886a0d76f1c6a4a16b744d59b94ea5df8 0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch"
+302283b1b5f560c850e24aad73febcf7f906ed62b4cad2d826bf140ffe59191631f3cd4ac29525c349cdfe61aba6a47886a0d76f1c6a4a16b744d59b94ea5df8 0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch
+b1cf5a1b020f815797c8a2de18595a399800a1ec887e6793739c62a2172855aa95643c1e7a5db9db9699ae7f2b1517925630919c2307f3cd233a4d459b2c5e8b include-uapi-linux-swab-Fix-potentially-missing-__always_inline.patch"
diff --git a/main/linux-headers/include-uapi-linux-swab-Fix-potentially-missing-__always_inline.patch b/main/linux-headers/include-uapi-linux-swab-Fix-potentially-missing-__always_inline.patch
new file mode 100644
index 0000000000..a0b8b734e3
--- /dev/null
+++ b/main/linux-headers/include-uapi-linux-swab-Fix-potentially-missing-__always_inline.patch
@@ -0,0 +1,56 @@
+From: Matt Redfearn <matt.redfearn@mips.com>
+Subject: [PATCH] include/uapi/linux/swab: Fix potentially missing __always_inline
+Date: Wed, 3 Jan 2018 09:57:30 +0000
+Message-ID: <1514973450-12447-1-git-send-email-matt.redfearn@mips.com>
+X-Mailer: git-send-email 2.7.4
+MIME-Version: 1.0
+Content-Type: text/plain; charset="UTF-8"
+Content-Transfer-Encoding: 8BIT
+
+Commit bc27fb68aaad ("include/uapi/linux/byteorder, swab: force inlining
+of some byteswap operations") added __always_inline to swab functions
+and commit 283d75737837 ("uapi/linux/stddef.h: Provide __always_inline to
+userspace headers") added a definition of __always_inline for use in
+exported headers when the kernel's compiler.h is not available.
+
+However, since swab.h does not include stddef.h, if the header soup does
+not indirectly include it, the definition of __always_inline is missing,
+resulting in a compilation failure, which was observed compiling the
+perf tool using exported headers containing this commit:
+
+In file included from /usr/include/linux/byteorder/little_endian.h:12:0,
+ from /usr/include/asm/byteorder.h:14,
+ from tools/include/uapi/linux/perf_event.h:20,
+ from perf.h:8,
+ from builtin-bench.c:18:
+/usr/include/linux/swab.h:160:8: error: unknown type name ‘__always_inline’
+ static __always_inline __u16 __swab16p(const __u16 *p)
+
+Fix this by replacing the inclusion of linux/compiler.h with
+linux/stddef.h to ensure that we pick up that definition if required,
+without relying on it's indirect inclusion. compiler.h is then included
+indirectly, via stddef.h.
+
+Fixes: 283d75737837 ("uapi/linux/stddef.h: Provide __always_inline to userspace headers")
+Signed-off-by: Matt Redfearn <matt.redfearn@mips.com>
+
+---
+
+ include/uapi/linux/swab.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/uapi/linux/swab.h b/include/uapi/linux/swab.h
+index 23cd84868cc3..f6a8cf737abf 100644
+--- a/include/uapi/linux/swab.h
++++ b/include/uapi/linux/swab.h
+@@ -3,7 +3,7 @@
+ #define _UAPI_LINUX_SWAB_H
+
+ #include <linux/types.h>
+-#include <linux/compiler.h>
++#include <linux/stddef.h>
+ #include <asm/swab.h>
+
+ /*
+--
+2.7.4