mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-15 03:23:50 +02:00
sun7i-kernel: fix build
A better fix is: git rm -rf \ srcpkgs/a10disp \ srcpkgs/bananapi-base \ srcpkgs/cubieboard2-base \ srcpkgs/cubieboard2-uboot \ srcpkgs/cubietruck-base \ srcpkgs/sun7i-kernel \ srcpkgs/sun7i-kernel-headers However, until consensus reached, let's not block openssl rebuild.
This commit is contained in:
parent
4e96bcb99d
commit
48a130d130
3 changed files with 67 additions and 6 deletions
|
@ -0,0 +1,45 @@
|
||||||
|
From 0ca85fc310e8c24cba10ed241a0188795e177683 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Arnd Bergmann <arnd@arndb.de>
|
||||||
|
Date: Thu, 26 Jul 2018 10:13:23 +0200
|
||||||
|
Subject: [PATCH] ARM: fix put_user() for gcc-8
|
||||||
|
|
||||||
|
Building kernels before linux-4.7 with gcc-8 results in many build failures
|
||||||
|
when gcc triggers a check that was meant to catch broken compilers:
|
||||||
|
|
||||||
|
/tmp/ccCGMQmS.s:648: Error: .err encountered
|
||||||
|
|
||||||
|
According to the discussion in the gcc bugzilla, a local "register
|
||||||
|
asm()" variable is still supposed to be the correct way to force an
|
||||||
|
inline assembly to use a particular register, but marking it 'const'
|
||||||
|
lets the compiler do optimizations that break that, i.e the compiler is
|
||||||
|
free to treat the variable as either 'const' or 'register' in that case.
|
||||||
|
|
||||||
|
Upstream commit 9f73bd8bb445 ("ARM: uaccess: remove put_user() code
|
||||||
|
duplication") fixed this problem in linux-4.8 as part of a larger change,
|
||||||
|
but seems a little too big to be backported to 4.4.
|
||||||
|
|
||||||
|
Let's take the simplest fix and change only the one broken line in the
|
||||||
|
same way as newer kernels.
|
||||||
|
|
||||||
|
Suggested-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
|
||||||
|
Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85745
|
||||||
|
Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86673
|
||||||
|
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
||||||
|
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||||
|
---
|
||||||
|
arch/arm/include/asm/uaccess.h | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h
|
||||||
|
index 35c9db857ebe..cd8b589111ba 100644
|
||||||
|
--- a/arch/arm/include/asm/uaccess.h
|
||||||
|
+++ b/arch/arm/include/asm/uaccess.h
|
||||||
|
@@ -251,7 +251,7 @@ extern int __put_user_8(void *, unsigned long long);
|
||||||
|
({ \
|
||||||
|
unsigned long __limit = current_thread_info()->addr_limit - 1; \
|
||||||
|
const typeof(*(p)) __user *__tmp_p = (p); \
|
||||||
|
- register const typeof(*(p)) __r2 asm("r2") = (x); \
|
||||||
|
+ register typeof(*(p)) __r2 asm("r2") = (x); \
|
||||||
|
register const typeof(*(p)) __user *__p asm("r0") = __tmp_p; \
|
||||||
|
register unsigned long __l asm("r1") = __limit; \
|
||||||
|
register int __e asm("r0"); \
|
13
srcpkgs/sun7i-kernel/patches/fix-cflags.patch
Normal file
13
srcpkgs/sun7i-kernel/patches/fix-cflags.patch
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
Index: arch/arm/mach-sun7i/pm/standby/Makefile
|
||||||
|
===================================================================
|
||||||
|
--- a/arch/arm/mach-sun7i/pm/standby/Makefile.orig
|
||||||
|
+++ b/arch/arm/mach-sun7i/pm/standby/Makefile
|
||||||
|
@@ -15,6 +15,8 @@ LD_FILE = standby.xn
|
||||||
|
KBUILD_CFLAGS := $(LINUXINCLUDE) -I$(srctree)/arch/arm/mach-sun7i/pm -Os -g -c
|
||||||
|
KBUILD_CFLAGS += -nostdlib -march=armv7-a -marm -mlittle-endian -D__STANDBY_MODULE__
|
||||||
|
KBUILD_CFLAGS += -fno-unwind-tables -fno-asynchronous-unwind-tables
|
||||||
|
+KBUILD_CFLAGS += -fno-builtin -fno-tree-loop-distribute-patterns
|
||||||
|
+KBUILD_CFLAGS += -fno-stack-protector
|
||||||
|
KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
|
||||||
|
|
||||||
|
LDFLAGS_standby.elf := -T
|
|
@ -20,9 +20,11 @@ checksum="e3de775107e7ba6ad0cf3345844fca1d61c8a11037fa71a5238ead439d15a166
|
||||||
eeceb6459f2f40c91a6a5be8d8c60e68dec2631ec84d6165721edacb059507c4
|
eeceb6459f2f40c91a6a5be8d8c60e68dec2631ec84d6165721edacb059507c4
|
||||||
f0bba58788f090dd213df0bde1ea0ce38999a8d28bebe443c899cb9cbc2b5eed"
|
f0bba58788f090dd213df0bde1ea0ce38999a8d28bebe443c899cb9cbc2b5eed"
|
||||||
|
|
||||||
create_wrksrc=yes
|
wrksrc="linux-sunxi-${_githash}"
|
||||||
build_wrksrc="linux-sunxi-${_githash}"
|
|
||||||
_kernver="${version}_${revision}"
|
_kernver="${version}_${revision}"
|
||||||
|
skip_extraction="
|
||||||
|
0001-Backport-firmware-loader.patch
|
||||||
|
0001-Backport-msdos-partition-UUIDs.patch"
|
||||||
|
|
||||||
nostrip=yes
|
nostrip=yes
|
||||||
noverifyrdeps=yes
|
noverifyrdeps=yes
|
||||||
|
@ -30,6 +32,8 @@ archs="armv7l*"
|
||||||
hostmakedepends="perl python kmod uboot-mkimage libressl bc"
|
hostmakedepends="perl python kmod uboot-mkimage libressl bc"
|
||||||
makedepends="ncurses-devel"
|
makedepends="ncurses-devel"
|
||||||
triggers="kernel-hooks"
|
triggers="kernel-hooks"
|
||||||
|
patch_args=-Np1
|
||||||
|
python_version=2
|
||||||
# These files could be modified when an external module is built.
|
# These files could be modified when an external module is built.
|
||||||
mutable_files="
|
mutable_files="
|
||||||
/usr/lib/modules/${_kernver}/modules.dep
|
/usr/lib/modules/${_kernver}/modules.dep
|
||||||
|
@ -40,12 +44,11 @@ mutable_files="
|
||||||
/usr/lib/modules/${_kernver}/modules.alias.bin
|
/usr/lib/modules/${_kernver}/modules.alias.bin
|
||||||
/usr/lib/modules/${_kernver}/modules.devname"
|
/usr/lib/modules/${_kernver}/modules.devname"
|
||||||
|
|
||||||
post_extract() {
|
post_patch() {
|
||||||
cd "${build_wrksrc}"
|
|
||||||
# Apply backported kernel firmware changes required by eudev>=2.1.
|
# Apply backported kernel firmware changes required by eudev>=2.1.
|
||||||
patch -p1 -i ../0001-Backport-firmware-loader.patch
|
patch -p1 -i $XBPS_SRCDISTDIR/${pkgname}-${version}/0001-Backport-firmware-loader.patch
|
||||||
# Apply backported kernel msdos partition UUID changes
|
# Apply backported kernel msdos partition UUID changes
|
||||||
patch -p1 -i ../0001-Backport-msdos-partition-UUIDs.patch
|
patch -p1 -i $XBPS_SRCDISTDIR/${pkgname}-${version}/0001-Backport-msdos-partition-UUIDs.patch
|
||||||
}
|
}
|
||||||
|
|
||||||
do_configure() {
|
do_configure() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue