linux-sunxi: fix compilation issue on gcc-9

Error comes in form of

/tmp/ccCGMQmS.s:648: Error: .err encountered

Tested on zeus branch of linux-sunxi.
This commit is contained in:
Andrey Lebedev 2020-01-25 12:43:10 +02:00
parent fbf5ac3e31
commit 802857ee59
No known key found for this signature in database
GPG Key ID: D9EC317023D5B880
4 changed files with 58 additions and 1 deletions

View File

@ -0,0 +1,29 @@
From 25a7e85eb0d58479f7d8895b1b29a648bd07d60e Mon Sep 17 00:00:00 2001
From: Andrey Lebedev <andrey@lebedev.lt>
Date: Mon, 20 Jan 2020 23:19:51 +0200
Subject: [PATCH 2/2] Fix asm error in put_user under gcc version 8 and above
Fixes these errors during compilation of linux-sunxi-3.4 kernel:
/tmp/ccCGMQmS.s:648: Error: .err encountered
Taken from https://patchwork.kernel.org/patch/10546809/
---
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 b04850fd..abfafbbf 100644
--- a/arch/arm/include/asm/uaccess.h
+++ b/arch/arm/include/asm/uaccess.h
@@ -159,7 +159,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"); \
--
2.20.1

View File

@ -0,0 +1,25 @@
From 302604ee4a2011871cb26deaf69d567cf57d0fe3 Mon Sep 17 00:00:00 2001
From: Andrey Lebedev <andrey@lebedev.lt>
Date: Mon, 20 Jan 2020 23:20:07 +0200
Subject: [PATCH 1/2] Silence annoying warning
---
include/linux/log2.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/log2.h b/include/linux/log2.h
index fd7ff3d9..14458fdd 100644
--- a/include/linux/log2.h
+++ b/include/linux/log2.h
@@ -18,7 +18,7 @@
/*
* deal with unrepresentable constant logarithms
*/
-extern __attribute__((const, noreturn))
+extern __attribute__((const))
int ____ilog2_NaN(void);
/*
--
2.20.1

View File

@ -14,9 +14,12 @@ MACHINE_KERNEL_PR_append = "a"
SRC_URI += "git://github.com/linux-sunxi/linux-sunxi.git;branch=sunxi-3.4;protocol=git \ SRC_URI += "git://github.com/linux-sunxi/linux-sunxi.git;branch=sunxi-3.4;protocol=git \
file://0001-compiler-gcc-integrate-the-various-compiler-gcc-345-.patch \ file://0001-compiler-gcc-integrate-the-various-compiler-gcc-345-.patch \
file://0002-use-static-inline-in-ARM-ftrace.patch \ file://0002-use-static-inline-in-ARM-ftrace.patch \
file://0001-gcc5-fixes.patch \ file://0003-gcc5-fixes.patch \
file://0004-arm-put-user-asm-fix.patch \
file://0005-silence-warning.patch \
file://defconfig \ file://defconfig \
" "
LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
S = "${WORKDIR}/git" S = "${WORKDIR}/git"