motorola-athene:fix compiler error (MR 1594)
This commit is contained in:
parent
7a01611214
commit
2447419fc6
8 changed files with 63 additions and 79 deletions
|
@ -2,7 +2,7 @@
|
|||
pkgname=device-motorola-athene
|
||||
pkgdesc="Motorola Moto G4"
|
||||
pkgver=0.1
|
||||
pkgrel=7
|
||||
pkgrel=8
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
|
@ -19,5 +19,5 @@ package() {
|
|||
devicepkg_package $startdir $pkgname
|
||||
}
|
||||
|
||||
sha512sums="0842ea23cb15292f1e26dfae9a207b06ba2eb2655c2d3d432201fd9abae95ab89d0b32c92ce868d58acec3fa0284c8f7922feedb51ac9c9c3fa932db6d04dc90 deviceinfo
|
||||
sha512sums="56fa47b3d0c696746b849df13b3c9d1cb0ce1072325a648924403e2b245fad602ecc6ae7100b52d109db3a38f0502eb60ba1f2b5bb51b5aebd7ebc2d47f3c88f deviceinfo
|
||||
c6764223c9c19a71a8bcbf86bf738a13ed01e318cd8b5ad7aa521f27cc85d78f469d92f5725767fe507ef6338f20dbc107ed3fc5811e465c8335df57437d877e initfs-hook.sh"
|
||||
|
|
|
@ -29,4 +29,5 @@ deviceinfo_flash_offset_ramdisk="0x01000000"
|
|||
deviceinfo_flash_offset_second="0x00f00000"
|
||||
deviceinfo_flash_offset_tags="0x00000100"
|
||||
deviceinfo_flash_pagesize="2048"
|
||||
deviceinfo_flash_sparse="true"
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
pkgname=linux-motorola-athene
|
||||
pkgver=3.10.108
|
||||
pkgrel=2
|
||||
pkgrel=3
|
||||
pkgdesc="Motorola Moto G4 kernel fork"
|
||||
arch="aarch64"
|
||||
_carch="arm64"
|
||||
|
@ -28,8 +28,10 @@ _config="config-$_flavor.$arch"
|
|||
source="
|
||||
$pkgname-$_commit.tar.gz::https://github.com/fengjiongmax/$_repository/archive/$_commit.tar.gz
|
||||
$_config
|
||||
compiler-gcc6.h
|
||||
01_fix_gcc6_errors.patch
|
||||
scripts-dtc-yylloc.patch
|
||||
disable-wireguard-Kconfig.patch
|
||||
optimize_compile_options.patch
|
||||
"
|
||||
builddir="$srcdir/$_repository-$_commit"
|
||||
|
||||
|
@ -56,6 +58,8 @@ package() {
|
|||
}
|
||||
|
||||
sha512sums="74d13e6787337454dc09c643efcf95cd46a2f02deecbe687c7a451f53bc2a5978aca394cf76f828cced88a6cffb310deb430c2c8c989471b368733f1aad728c2 linux-motorola-athene-4f6c8d2e1507595b5ef404d076128874176f1219.tar.gz
|
||||
806b21e3057815e1fe97ebf5950ff9ea800d69c4bd7ef5127a89927c9f6042bd7c51524e20319cfdfd651694dac3999aec453af9143ec2f4e36a5634b5d2946a config-motorola-athene.aarch64
|
||||
d80980e9474c82ba0ef1a6903b434d8bd1b092c40367ba543e72d2c119301c8b2d05265740e4104ca1ac5d15f6c4aa49e8776cb44264a9a28dc551e0d1850dcc compiler-gcc6.h
|
||||
972e98523d6ef06342e69a09e979bdd86904cf7f9a843b519b37791e531b680182564a2ab537c94629c3589f4e775b2c39de04c64e210a0f8b6f10745c3596f1 01_fix_gcc6_errors.patch"
|
||||
d4c399422dab39000be72445c246d7992ecbd43f8f6a27a80890ffbf045588eee4fff1f6b67d20d3c0a65824e6285ee0797bd184c35ffacfcb07cb05b2b748d3 config-motorola-athene.aarch64
|
||||
972e98523d6ef06342e69a09e979bdd86904cf7f9a843b519b37791e531b680182564a2ab537c94629c3589f4e775b2c39de04c64e210a0f8b6f10745c3596f1 01_fix_gcc6_errors.patch
|
||||
84f97f389b6a7305519a257666367157f84ed20c64633d51b8608f7d55517514870b487ac7428ac5c2a49b0a1371100a8862120b415c3eda5255ad485385ac81 scripts-dtc-yylloc.patch
|
||||
a32585798f24bb764718209e6c35e304b3499b53e2b34aa9e935bc55197d041aa1169f8352319abbe174a3d5f3ad68b01a7ea5addd3652fe7bcfe8ae4a2a1a6e disable-wireguard-Kconfig.patch
|
||||
c6123ff692663f383151d722d0c43501ba4c24c0e5c8b5206356fd76bde6b72d20eebee9fcce1a01e6ee5bb637976f7f4349746ccdc7bc474a1a1e83b68a3f08 optimize_compile_options.patch"
|
||||
|
|
|
@ -1,69 +0,0 @@
|
|||
// SOURCE:
|
||||
// https://github.com/NextThingCo/CHIP-u-boot/issues/10#issuecomment-287515505
|
||||
|
||||
#ifndef __LINUX_COMPILER_H
|
||||
#error "Please don't include <linux/compiler-gcc6.h> directly, include <linux/compiler.h> instead."
|
||||
#endif
|
||||
|
||||
#define __used __attribute__((__used__))
|
||||
#define __must_check __attribute__((warn_unused_result))
|
||||
#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
|
||||
|
||||
/* Mark functions as cold. gcc will assume any path leading to a call
|
||||
to them will be unlikely. This means a lot of manual unlikely()s
|
||||
are unnecessary now for any paths leading to the usual suspects
|
||||
like BUG(), printk(), panic() etc. [but let's keep them for now for
|
||||
older compilers]
|
||||
|
||||
Early snapshots of gcc 4.3 don't support this and we can't detect this
|
||||
in the preprocessor, but we can live with this because they're unreleased.
|
||||
Maketime probing would be overkill here.
|
||||
|
||||
gcc also has a __attribute__((__hot__)) to move hot functions into
|
||||
a special section, but I don't see any sense in this right now in
|
||||
the kernel context */
|
||||
#define __cold __attribute__((__cold__))
|
||||
|
||||
#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
|
||||
|
||||
#ifndef __CHECKER__
|
||||
# define __compiletime_warning(message) __attribute__((warning(message)))
|
||||
# define __compiletime_error(message) __attribute__((error(message)))
|
||||
#endif /* __CHECKER__ */
|
||||
|
||||
/*
|
||||
* Mark a position in code as unreachable. This can be used to
|
||||
* suppress control flow warnings after asm blocks that transfer
|
||||
* control elsewhere.
|
||||
*
|
||||
* Early snapshots of gcc 4.5 don't support this and we can't detect
|
||||
* this in the preprocessor, but we can live with this because they're
|
||||
* unreleased. Really, we need to have autoconf for the kernel.
|
||||
*/
|
||||
#define unreachable() __builtin_unreachable()
|
||||
|
||||
/* Mark a function definition as prohibited from being cloned. */
|
||||
#define __noclone __attribute__((__noclone__))
|
||||
|
||||
/*
|
||||
* Tell the optimizer that something else uses this function or variable.
|
||||
*/
|
||||
#define __visible __attribute__((externally_visible))
|
||||
|
||||
/*
|
||||
* GCC 'asm goto' miscompiles certain code sequences:
|
||||
*
|
||||
* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670
|
||||
*
|
||||
* Work it around via a compiler barrier quirk suggested by Jakub Jelinek.
|
||||
*
|
||||
* (asm goto is automatically volatile - the naming reflects this.)
|
||||
*/
|
||||
#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
|
||||
|
||||
#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP
|
||||
#define __HAVE_BUILTIN_BSWAP32__
|
||||
#define __HAVE_BUILTIN_BSWAP64__
|
||||
#define __HAVE_BUILTIN_BSWAP16__
|
||||
#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */
|
||||
|
|
@ -501,8 +501,6 @@ CONFIG_XFRM_IPCOMP=y
|
|||
CONFIG_NET_KEY=y
|
||||
CONFIG_NET_KEY_MIGRATE=y
|
||||
CONFIG_INET=y
|
||||
CONFIG_WIREGUARD=y
|
||||
# CONFIG_WIREGUARD_DEBUG is not set
|
||||
CONFIG_IP_MULTICAST=y
|
||||
CONFIG_IP_ADVANCED_ROUTER=y
|
||||
# CONFIG_IP_FIB_TRIE_STATS is not set
|
||||
|
@ -3769,7 +3767,7 @@ CONFIG_SDCARD_FS=y
|
|||
# CONFIG_ROMFS_FS is not set
|
||||
CONFIG_PSTORE=y
|
||||
CONFIG_PSTORE_CONSOLE=y
|
||||
# CONFIG_PSTORE_PMSG is not set
|
||||
CONFIG_PSTORE_PMSG=y
|
||||
CONFIG_PSTORE_RAM=y
|
||||
CONFIG_PSTORE_RAM_ANNOTATION_APPEND=y
|
||||
# CONFIG_SYSV_FS is not set
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
If kernel repo does not contain files for wireguard,remove them.
|
||||
diff --git a/net/Kconfig b/net/Kconfig
|
||||
index c55d58ed..d0a16496 100644
|
||||
--- a/net/Kconfig
|
||||
+++ b/net/Kconfig
|
||||
@@ -75,7 +75,7 @@ config INET
|
||||
Short answer: say Y.
|
||||
|
||||
if INET
|
||||
-source "net/wireguard/Kconfig"
|
||||
+# source "net/wireguard/Kconfig"
|
||||
source "net/ipv4/Kconfig"
|
||||
source "net/ipv6/Kconfig"
|
||||
source "net/netlabel/Kconfig"
|
|
@ -0,0 +1,22 @@
|
|||
This is compile optimization for motorola-athene.
|
||||
diff --git a/Makefile b/Makefile
|
||||
index f29988bb..1f2e5384 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -351,11 +351,11 @@ CC = $(srctree)/scripts/gcc-wrapper.py $(REAL_CC)
|
||||
|
||||
CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
|
||||
-Wbitwise -Wno-return-void $(CF)
|
||||
-CFLAGS_MODULE =
|
||||
-AFLAGS_MODULE =
|
||||
-LDFLAGS_MODULE =
|
||||
-CFLAGS_KERNEL =
|
||||
-AFLAGS_KERNEL =
|
||||
+CFLAGS_MODULE = -DMODULE -mtune=cortex-a53
|
||||
+AFLAGS_MODULE = -DMODULE -mtune=cortex-a53 -pipe
|
||||
+LDFLAGS_MODULE =
|
||||
+CFLAGS_KERNEL = -mtune=cortex-a53
|
||||
+AFLAGS_KERNEL = -mtune=cortex-a53 -pipe
|
||||
CFLAGS_GCOV = -fprofile-arcs -ftest-coverage
|
||||
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
This patch is different from gcc10-extern_YYLOC_global_declaration.patch.
|
||||
diff --git a/scripts/dtc/dtc-lexer.lex.c_shipped b/scripts/dtc/dtc-lexer.lex.c_shipped
|
||||
index 2d30f417..d0eb405c 100644
|
||||
--- a/scripts/dtc/dtc-lexer.lex.c_shipped
|
||||
+++ b/scripts/dtc/dtc-lexer.lex.c_shipped
|
||||
@@ -637,7 +637,7 @@ char *yytext;
|
||||
#include "srcpos.h"
|
||||
#include "dtc-parser.tab.h"
|
||||
|
||||
-YYLTYPE yylloc;
|
||||
+extern YYLTYPE yylloc;
|
||||
|
||||
/* CAUTION: this will stop working if we ever use yyless() or yyunput() */
|
||||
#define YY_USER_ACTION \
|
Loading…
Reference in a new issue