summaryrefslogtreecommitdiff
path: root/system/easy-kernel
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-02-28 23:26:05 +0000
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-02-28 23:26:05 +0000
commit6b29bc81c698ab1fb182269901864747c6be368b (patch)
treedfa698eb1d38bd6424d2a56cc66dfcd022e8197e /system/easy-kernel
parent1986226438581150c70592abbba6ba49e4c47931 (diff)
downloadpackages-6b29bc81c698ab1fb182269901864747c6be368b.tar.gz
packages-6b29bc81c698ab1fb182269901864747c6be368b.tar.bz2
packages-6b29bc81c698ab1fb182269901864747c6be368b.tar.xz
packages-6b29bc81c698ab1fb182269901864747c6be368b.zip
system/easy-kernel*: Fix build for powerpc64 with GCC 8
Diffstat (limited to 'system/easy-kernel')
-rw-r--r--system/easy-kernel/APKBUILD3
-rw-r--r--system/easy-kernel/ppc64-epapr-gcc8.patch84
2 files changed, 86 insertions, 1 deletions
diff --git a/system/easy-kernel/APKBUILD b/system/easy-kernel/APKBUILD
index 17e3fe45e..983506858 100644
--- a/system/easy-kernel/APKBUILD
+++ b/system/easy-kernel/APKBUILD
@@ -13,7 +13,6 @@ options="!check !dbg !strip !tracedeps"
license="GPL-2.0-only"
depends=""
makedepends="bc gzip kmod lzop openssl-dev xz"
-install=""
provides="easy-kernel$_kflavour=$pkgver-r$pkgrel"
subpackages="$_pkgname-modules-$pkgver-mc$pkgrel:modules
$_pkgname-src-$pkgver-mc$pkgrel:src
@@ -31,6 +30,7 @@ source="https://cdn.kernel.org/pub/linux/kernel/v${_pkgmajver}.x/linux-${_pkgmin
config-aarch64
futex-cmpxchg.patch
kernel.h
+ ppc64-epapr-gcc8.patch
uapi-ether.patch
"
builddir="$srcdir/linux-${_pkgminver}"
@@ -141,4 +141,5 @@ cfa1c2b523875967c42bfd8fcfeeb80b1c4c9887c4399b4767f0ac0525769a9e8c5cddaec831e1ad
c7573068450aff89101ef5aec683f4fee34476f072f9f7debcdc7398c646194b63e3d2fb63742631cdbff0d77d9fabf8d151cc260d80297d00b57c800c60ef6c config-aarch64
64486a4f53046a69f727cecd8c39400b50c2d2b15e3b5ca8c18b8249d25990f3a872ec064800ba3d190f9d25b4518899b9ea3675920f487108102856d6beb51e futex-cmpxchg.patch
fdd94b9de7b374f1812dec0f9971c05f5e52177ca4a16c8071daa620c18265b38f656f528e7045a24f30af01f05e53e54546fb0a9e93773cf191866e87de505d kernel.h
+0df4e823e19e8fc379b5ad66192eb3e890daa3dac8d7a9ebbab4cf3c60ce9f15fcc25a54b86b341db53db3d78c928ca5f55933e12eee75680e705cca8a7bdff4 ppc64-epapr-gcc8.patch
af093e91e8c8371629948e2e574f8764078564bc027ba5b2f87886f8827d9a63ba7a43717552fe7e3cc9212b2fd55b8633b12900c3d8cdc6c035d52b389c39e5 uapi-ether.patch"
diff --git a/system/easy-kernel/ppc64-epapr-gcc8.patch b/system/easy-kernel/ppc64-epapr-gcc8.patch
new file mode 100644
index 000000000..192e83845
--- /dev/null
+++ b/system/easy-kernel/ppc64-epapr-gcc8.patch
@@ -0,0 +1,84 @@
+From 186b8f1587c79c2fa04bfa392fdf084443e398c1 Mon Sep 17 00:00:00 2001
+From: Seth Forshee <seth.forshee@canonical.com>
+Date: Thu, 28 Sep 2017 09:33:39 -0400
+Subject: powerpc: Always initialize input array when calling epapr_hypercall()
+
+Several callers to epapr_hypercall() pass an uninitialized stack
+allocated array for the input arguments, presumably because they
+have no input arguments. However this can produce errors like
+this one
+
+ arch/powerpc/include/asm/epapr_hcalls.h:470:42: error: 'in' may be used uninitialized in this function [-Werror=maybe-uninitialized]
+ unsigned long register r3 asm("r3") = in[0];
+ ~~^~~
+
+Fix callers to this function to always zero-initialize the input
+arguments array to prevent this.
+
+Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+---
+ arch/powerpc/include/asm/epapr_hcalls.h | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/arch/powerpc/include/asm/epapr_hcalls.h b/arch/powerpc/include/asm/epapr_hcalls.h
+index 334459ad145b..90863245df53 100644
+--- a/arch/powerpc/include/asm/epapr_hcalls.h
++++ b/arch/powerpc/include/asm/epapr_hcalls.h
+@@ -508,7 +508,7 @@ static unsigned long epapr_hypercall(unsigned long *in,
+
+ static inline long epapr_hypercall0_1(unsigned int nr, unsigned long *r2)
+ {
+- unsigned long in[8];
++ unsigned long in[8] = {0};
+ unsigned long out[8];
+ unsigned long r;
+
+@@ -520,7 +520,7 @@ static inline long epapr_hypercall0_1(unsigned int nr, unsigned long *r2)
+
+ static inline long epapr_hypercall0(unsigned int nr)
+ {
+- unsigned long in[8];
++ unsigned long in[8] = {0};
+ unsigned long out[8];
+
+ return epapr_hypercall(in, out, nr);
+@@ -528,7 +528,7 @@ static inline long epapr_hypercall0(unsigned int nr)
+
+ static inline long epapr_hypercall1(unsigned int nr, unsigned long p1)
+ {
+- unsigned long in[8];
++ unsigned long in[8] = {0};
+ unsigned long out[8];
+
+ in[0] = p1;
+@@ -538,7 +538,7 @@ static inline long epapr_hypercall1(unsigned int nr, unsigned long p1)
+ static inline long epapr_hypercall2(unsigned int nr, unsigned long p1,
+ unsigned long p2)
+ {
+- unsigned long in[8];
++ unsigned long in[8] = {0};
+ unsigned long out[8];
+
+ in[0] = p1;
+@@ -549,7 +549,7 @@ static inline long epapr_hypercall2(unsigned int nr, unsigned long p1,
+ static inline long epapr_hypercall3(unsigned int nr, unsigned long p1,
+ unsigned long p2, unsigned long p3)
+ {
+- unsigned long in[8];
++ unsigned long in[8] = {0};
+ unsigned long out[8];
+
+ in[0] = p1;
+@@ -562,7 +562,7 @@ static inline long epapr_hypercall4(unsigned int nr, unsigned long p1,
+ unsigned long p2, unsigned long p3,
+ unsigned long p4)
+ {
+- unsigned long in[8];
++ unsigned long in[8] = {0};
+ unsigned long out[8];
+
+ in[0] = p1;
+--
+cgit 1.2-0.3.lf.el7
+