linux-samsung-baffinlite: switch to gcc6 (MR 2897)
Doesn't boot with GCC10. [ci:skip-build] Already built successfuly on CI in MR
This commit is contained in:
parent
490b62d6db
commit
2ce19af0cd
5 changed files with 84 additions and 14 deletions
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
pkgname=linux-samsung-baffinlite
|
pkgname=linux-samsung-baffinlite
|
||||||
pkgver=3.4.5
|
pkgver=3.4.5
|
||||||
pkgrel=4
|
pkgrel=5
|
||||||
pkgdesc="Samsung Galaxy Grand Neo kernel fork"
|
pkgdesc="Samsung Galaxy Grand Neo kernel fork"
|
||||||
arch="armv7"
|
arch="armv7"
|
||||||
_carch="arm"
|
_carch="arm"
|
||||||
|
@ -12,7 +12,14 @@ _flavor="samsung-baffinlite"
|
||||||
url="https://kernel.org"
|
url="https://kernel.org"
|
||||||
license="GPL-2.0-only"
|
license="GPL-2.0-only"
|
||||||
options="!strip !check !tracedeps pmb:cross-native"
|
options="!strip !check !tracedeps pmb:cross-native"
|
||||||
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev xz"
|
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev xz gcc6"
|
||||||
|
|
||||||
|
# Compiler: GCC 6 (doesn't boot when compiled with gcc10+)
|
||||||
|
if [ "${CC:0:5}" != "gcc6-" ]; then
|
||||||
|
CC="gcc6-$CC"
|
||||||
|
HOSTCC="gcc6-gcc"
|
||||||
|
CROSS_COMPILE="gcc6-$CROSS_COMPILE"
|
||||||
|
fi
|
||||||
|
|
||||||
# Source
|
# Source
|
||||||
_repository="android_kernel_samsung_baffinlite"
|
_repository="android_kernel_samsung_baffinlite"
|
||||||
|
@ -21,8 +28,6 @@ _config="config-$_flavor.$arch"
|
||||||
source="
|
source="
|
||||||
$pkgname-$_commit.tar.gz::https://github.com/knuxdroid/$_repository/archive/$_commit.tar.gz
|
$pkgname-$_commit.tar.gz::https://github.com/knuxdroid/$_repository/archive/$_commit.tar.gz
|
||||||
$_config
|
$_config
|
||||||
gcc7-give-up-on-ilog2-const-optimizations.patch
|
|
||||||
gcc8-fix-put-user.patch
|
|
||||||
kernel-use-the-gnu89-standard-explicitly.patch
|
kernel-use-the-gnu89-standard-explicitly.patch
|
||||||
"
|
"
|
||||||
builddir="$srcdir/$_repository-$_commit"
|
builddir="$srcdir/$_repository-$_commit"
|
||||||
|
@ -51,8 +56,8 @@ package() {
|
||||||
modules_install
|
modules_install
|
||||||
}
|
}
|
||||||
|
|
||||||
sha512sums="0c1043e703bd9382db48d2f472abb8d0acee74ff16070daf03bef9d591d611aae45c0af09971111ef6b9f3fca6dcd3742e2318ef29a0cde13910983b20a65bbc linux-samsung-baffinlite-6cd5888e4714454ca7398f46aa09fa29170d92b9.tar.gz
|
sha512sums="
|
||||||
a1425ef6435304cca986ce387c6a6e7ee050244d5b9478886dd6d51c9f59583f4f2893617dc618584189d57d0fa27fea0d51886bf7ed587de3aa2316b368cb00 config-samsung-baffinlite.armv7
|
0c1043e703bd9382db48d2f472abb8d0acee74ff16070daf03bef9d591d611aae45c0af09971111ef6b9f3fca6dcd3742e2318ef29a0cde13910983b20a65bbc linux-samsung-baffinlite-6cd5888e4714454ca7398f46aa09fa29170d92b9.tar.gz
|
||||||
77eba606a71eafb36c32e9c5fe5e77f5e4746caac292440d9fb720763d766074a964db1c12bc76fe583c5d1a5c864219c59941f5e53adad182dbc70bf2bc14a7 gcc7-give-up-on-ilog2-const-optimizations.patch
|
6565e18ba87da0304927c0f3b71c33e1056d6a989fece6df4f596d4855ed0e75c31c0809ad9dbad770cd0593410391d2cdb98016cc57ed654e1367b1ab8c5ced config-samsung-baffinlite.armv7
|
||||||
197d40a214ada87fcb2dfc0ae4911704b9a93354b75179cd6b4aadbb627a37ec262cf516921c84a8b1806809b70a7b440cdc8310a4a55fca5d2c0baa988e3967 gcc8-fix-put-user.patch
|
ad0182a483791fc88e058838bc331b2f04a75ba291e763767babdb815efadfc3b4fda97e69e2e3f00a426cabea088e35297a92bd287592597d1e309be68ee92c kernel-use-the-gnu89-standard-explicitly.patch
|
||||||
ad0182a483791fc88e058838bc331b2f04a75ba291e763767babdb815efadfc3b4fda97e69e2e3f00a426cabea088e35297a92bd287592597d1e309be68ee92c kernel-use-the-gnu89-standard-explicitly.patch"
|
"
|
||||||
|
|
|
@ -560,9 +560,10 @@ CONFIG_ALIGNMENT_TRAP=y
|
||||||
# CONFIG_USE_OF is not set
|
# CONFIG_USE_OF is not set
|
||||||
CONFIG_ZBOOT_ROM_TEXT=0x0
|
CONFIG_ZBOOT_ROM_TEXT=0x0
|
||||||
CONFIG_ZBOOT_ROM_BSS=0x0
|
CONFIG_ZBOOT_ROM_BSS=0x0
|
||||||
CONFIG_CMDLINE="console=ttyS0,115200n8 mem=456M gpt v3d_mem=67108864 pmem=24M@0x9E800000"
|
#CONFIG_CMDLINE="console=ttyS0,115200n8 mem=456M gpt v3d_mem=67108864 pmem=24M@0x9E800000"
|
||||||
CONFIG_CMDLINE_FROM_BOOTLOADER=y
|
CONFIG_CMDLINE_FROM_BOOTLOADER=y
|
||||||
# CONFIG_CMDLINE_EXTEND is not set
|
#CONFIG_CMDLINE="initcall_debug"
|
||||||
|
#CONFIG_CMDLINE_EXTEND=y
|
||||||
# CONFIG_CMDLINE_FORCE is not set
|
# CONFIG_CMDLINE_FORCE is not set
|
||||||
# CONFIG_XIP_KERNEL is not set
|
# CONFIG_XIP_KERNEL is not set
|
||||||
# CONFIG_KEXEC is not set
|
# CONFIG_KEXEC is not set
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
../../.shared-patches/linux/gcc7-give-up-on-ilog2-const-optimizations.patch
|
|
|
@ -1 +0,0 @@
|
||||||
../../.shared-patches/linux/gcc8-fix-put-user.patch
|
|
|
@ -1 +0,0 @@
|
||||||
../../.shared-patches/linux/kernel-use-the-gnu89-standard-explicitly.patch
|
|
|
@ -0,0 +1,67 @@
|
||||||
|
From 51b97e354ba9fce1890cf38ecc754aa49677fc89 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Kirill A. Shutemov" <kirill@shutemov.name>
|
||||||
|
Date: Mon, 20 Oct 2014 12:23:12 +0300
|
||||||
|
Subject: kernel: use the gnu89 standard explicitly
|
||||||
|
|
||||||
|
From: "Kirill A. Shutemov" <kirill@shutemov.name>
|
||||||
|
|
||||||
|
commit 51b97e354ba9fce1890cf38ecc754aa49677fc89 upstream.
|
||||||
|
|
||||||
|
Sasha Levin reports:
|
||||||
|
"gcc5 changes the default standard to c11, which makes kernel build
|
||||||
|
unhappy
|
||||||
|
|
||||||
|
Explicitly define the kernel standard to be gnu89 which should keep
|
||||||
|
everything working exactly like it was before gcc5"
|
||||||
|
|
||||||
|
There are multiple small issues with the new default, but the biggest
|
||||||
|
issue seems to be that the old - and very useful - GNU extension to
|
||||||
|
allow a cast in front of an initializer has gone away.
|
||||||
|
|
||||||
|
Patch updated by Kirill:
|
||||||
|
"I'm pretty sure all gcc versions you can build kernel with supports
|
||||||
|
-std=gnu89. cc-option is redunrant.
|
||||||
|
|
||||||
|
We also need to adjust HOSTCFLAGS otherwise allmodconfig fails for me"
|
||||||
|
|
||||||
|
Note by Andrew Pinski:
|
||||||
|
"Yes it was reported and both problems relating to this extension has
|
||||||
|
been added to gnu99 and gnu11. Though there are other issues with the
|
||||||
|
kernel dealing with extern inline have different semantics between
|
||||||
|
gnu89 and gnu99/11"
|
||||||
|
|
||||||
|
End result: we may be able to move up to a newer stdc model eventually,
|
||||||
|
but right now the newer models have some annoying deficiencies, so the
|
||||||
|
traditional "gnu89" model ends up being the preferred one.
|
||||||
|
|
||||||
|
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
|
||||||
|
Singed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
|
||||||
|
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
||||||
|
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||||
|
|
||||||
|
---
|
||||||
|
Makefile | 6 ++++--
|
||||||
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -241,7 +241,7 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH"
|
||||||
|
|
||||||
|
HOSTCC = gcc
|
||||||
|
HOSTCXX = g++
|
||||||
|
-HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer
|
||||||
|
+HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89
|
||||||
|
HOSTCXXFLAGS = -O2
|
||||||
|
|
||||||
|
# Decide whether to build built-in, modular, or both.
|
||||||
|
@@ -373,7 +373,9 @@ KBUILD_CFLAGS := -Wall -Wundef -Wstric
|
||||||
|
-fno-strict-aliasing -fno-common \
|
||||||
|
-Werror-implicit-function-declaration \
|
||||||
|
-Wno-format-security \
|
||||||
|
- -fno-delete-null-pointer-checks
|
||||||
|
+ -fno-delete-null-pointer-checks \
|
||||||
|
+ -std=gnu89
|
||||||
|
+
|
||||||
|
KBUILD_AFLAGS_KERNEL :=
|
||||||
|
KBUILD_CFLAGS_KERNEL :=
|
||||||
|
KBUILD_AFLAGS := -D__ASSEMBLY__
|
Loading…
Reference in a new issue