diff options
| author | Khem Raj <raj.khem@gmail.com> | 2016-05-16 20:29:02 -0700 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2016-05-16 20:29:02 -0700 |
| commit | 6a1844a415247a389fafa4e0d2890ba349ae5d7a (patch) | |
| tree | 99b2057dc30f19abc55a0a54e24e4744605c0198 | |
| parent | 52fcf5b82bb7f85ea79602284c11765177637d86 (diff) | |
| download | meta-altera-6a1844a415247a389fafa4e0d2890ba349ae5d7a.tar.gz | |
kernel,u-boot: Fix builds for max10/nios2
Signed-off-by: Khem Raj <raj.khem@gmail.com>
7 files changed, 449 insertions, 1 deletions
diff --git a/conf/machine/10m50.conf b/conf/machine/10m50.conf index 829948c..9716740 100644 --- a/conf/machine/10m50.conf +++ b/conf/machine/10m50.conf | |||
| @@ -20,3 +20,6 @@ MACHINE_EXTRA_RRECOMMENDS = "kernel-modules" | |||
| 20 | MACHINE_FEATURES = "kernel26 serial" | 20 | MACHINE_FEATURES = "kernel26 serial" |
| 21 | 21 | ||
| 22 | SERIAL_CONSOLE = "115200 ttyS0" | 22 | SERIAL_CONSOLE = "115200 ttyS0" |
| 23 | |||
| 24 | PREFERRED_PROVIDER_virtual/kernel ??= "linux-altera-ltsi" | ||
| 25 | PREFERRED_PROVIDER_u-boot ??= "u-boot-socfpga" | ||
diff --git a/recipes-bsp/u-boot/u-boot-socfpga_2016.03.bb b/recipes-bsp/u-boot/u-boot-socfpga_2016.03.bb index 9189715..55f143e 100644 --- a/recipes-bsp/u-boot/u-boot-socfpga_2016.03.bb +++ b/recipes-bsp/u-boot/u-boot-socfpga_2016.03.bb | |||
| @@ -11,5 +11,22 @@ PV_append = "+git${SRCPV}" | |||
| 11 | 11 | ||
| 12 | DEPENDS += "dtc-native" | 12 | DEPENDS += "dtc-native" |
| 13 | 13 | ||
| 14 | do_install_append_10m50 () { | ||
| 15 | if [ "x${UBOOT_CONFIG}" != "x" ] | ||
| 16 | then | ||
| 17 | for config in ${UBOOT_MACHINE}; do | ||
| 18 | install -d ${D}/boot | ||
| 19 | install ${B}/${config}/${UBOOT_DTB_BINARY} ${D}/boot/${UBOOT_DTB_BINARY} | ||
| 20 | install ${B}/${config}/${UBOOT_NODTB_BINARY} ${D}/boot/${UBOOT_NODTB_BINARY} | ||
| 21 | done | ||
| 22 | else | ||
| 23 | install -d ${D}/boot | ||
| 24 | install ${B}/${config}/${UBOOT_DTB_BINARY} ${D}/boot/${UBOOT_DTB_BINARY} | ||
| 25 | install ${B}/${config}/${UBOOT_NODTB_BINARY} ${D}/boot/${UBOOT_NODTB_BINARY} | ||
| 26 | fi | ||
| 27 | } | ||
| 14 | 28 | ||
| 15 | 29 | do_deploy_append_10m50 () { | |
| 30 | install ${D}/boot/${UBOOT_DTB_BINARY} ${DEPLOYDIR}/${UBOOT_DTB_BINARY} | ||
| 31 | install ${D}/boot/${UBOOT_NODTB_BINARY} ${DEPLOYDIR}/${UBOOT_NODTB_BINARY} | ||
| 32 | } | ||
diff --git a/recipes-kernel/linux/linux-altera-ltsi-dev_4.1.bb b/recipes-kernel/linux/linux-altera-ltsi-dev_4.1.bb index 1c2beb2..53853ef 100644 --- a/recipes-kernel/linux/linux-altera-ltsi-dev_4.1.bb +++ b/recipes-kernel/linux/linux-altera-ltsi-dev_4.1.bb | |||
| @@ -2,3 +2,10 @@ LINUX_VERSION = "4.1" | |||
| 2 | LINUX_VERSION_SUFFIX = "-ltsi" | 2 | LINUX_VERSION_SUFFIX = "-ltsi" |
| 3 | 3 | ||
| 4 | include linux-altera.inc | 4 | include linux-altera.inc |
| 5 | |||
| 6 | FILESEXTRAPATHS_prepend := "${THISDIR}/linux-altera-ltsi:" | ||
| 7 | |||
| 8 | SRC_URI += "\ | ||
| 9 | file://0001-compiler-gcc-integrate-the-various-compiler-gcc-345-.patch \ | ||
| 10 | file://0001-compiler-gcc-disable-ftracer-for-__noclone-functions.patch \ | ||
| 11 | " | ||
diff --git a/recipes-kernel/linux/linux-altera-ltsi/0001-compiler-gcc-disable-ftracer-for-__noclone-functions.patch b/recipes-kernel/linux/linux-altera-ltsi/0001-compiler-gcc-disable-ftracer-for-__noclone-functions.patch new file mode 100644 index 0000000..338011e --- /dev/null +++ b/recipes-kernel/linux/linux-altera-ltsi/0001-compiler-gcc-disable-ftracer-for-__noclone-functions.patch | |||
| @@ -0,0 +1,45 @@ | |||
| 1 | From 9b561b878bc40703e21144def6a5c2c8d436b883 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Paolo Bonzini <pbonzini@redhat.com> | ||
| 3 | Date: Thu, 31 Mar 2016 09:38:51 +0200 | ||
| 4 | Subject: [PATCH] compiler-gcc: disable -ftracer for __noclone functions | ||
| 5 | |||
| 6 | [ Upstream commit 95272c29378ee7dc15f43fa2758cb28a5913a06d ] | ||
| 7 | |||
| 8 | -ftracer can duplicate asm blocks causing compilation to fail in | ||
| 9 | noclone functions. For example, KVM declares a global variable | ||
| 10 | in an asm like | ||
| 11 | |||
| 12 | asm("2: ... \n | ||
| 13 | .pushsection data \n | ||
| 14 | .global vmx_return \n | ||
| 15 | vmx_return: .long 2b"); | ||
| 16 | |||
| 17 | and -ftracer causes a double declaration. | ||
| 18 | |||
| 19 | Cc: Andrew Morton <akpm@linux-foundation.org> | ||
| 20 | Cc: Michal Marek <mmarek@suse.cz> | ||
| 21 | Cc: stable@vger.kernel.org | ||
| 22 | Cc: kvm@vger.kernel.org | ||
| 23 | Reported-by: Linda Walsh <lkml@tlinx.org> | ||
| 24 | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> | ||
| 25 | Signed-off-by: Sasha Levin <sasha.levin@oracle.com> | ||
| 26 | --- | ||
| 27 | include/linux/compiler-gcc.h | 2 +- | ||
| 28 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 29 | |||
| 30 | diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h | ||
| 31 | index 484ef6e..27fa573 100644 | ||
| 32 | --- a/include/linux/compiler-gcc.h | ||
| 33 | +++ b/include/linux/compiler-gcc.h | ||
| 34 | @@ -192,7 +192,7 @@ | ||
| 35 | #define unreachable() __builtin_unreachable() | ||
| 36 | |||
| 37 | /* Mark a function definition as prohibited from being cloned. */ | ||
| 38 | -#define __noclone __attribute__((__noclone__)) | ||
| 39 | +#define __noclone __attribute__((__noclone__, __optimize__("no-tracer"))) | ||
| 40 | |||
| 41 | #endif /* GCC_VERSION >= 40500 */ | ||
| 42 | |||
| 43 | -- | ||
| 44 | 2.8.2 | ||
| 45 | |||
diff --git a/recipes-kernel/linux/linux-altera-ltsi/0001-compiler-gcc-integrate-the-various-compiler-gcc-345-.patch b/recipes-kernel/linux/linux-altera-ltsi/0001-compiler-gcc-integrate-the-various-compiler-gcc-345-.patch new file mode 100644 index 0000000..2d05db5 --- /dev/null +++ b/recipes-kernel/linux/linux-altera-ltsi/0001-compiler-gcc-integrate-the-various-compiler-gcc-345-.patch | |||
| @@ -0,0 +1,368 @@ | |||
| 1 | From f320793e52aee78f0fbb8bcaf10e6614d2e67bfc Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Joe Perches <joe@perches.com> | ||
| 3 | Date: Thu, 25 Jun 2015 15:01:02 -0700 | ||
| 4 | Subject: [PATCH] compiler-gcc: integrate the various compiler-gcc[345].h files | ||
| 5 | |||
| 6 | [ Upstream commit cb984d101b30eb7478d32df56a0023e4603cba7f ] | ||
| 7 | |||
| 8 | As gcc major version numbers are going to advance rather rapidly in the | ||
| 9 | future, there's no real value in separate files for each compiler | ||
| 10 | version. | ||
| 11 | |||
| 12 | Deduplicate some of the macros #defined in each file too. | ||
| 13 | |||
| 14 | Neaten comments using normal kernel commenting style. | ||
| 15 | |||
| 16 | Signed-off-by: Joe Perches <joe@perches.com> | ||
| 17 | Cc: Andi Kleen <andi@firstfloor.org> | ||
| 18 | Cc: Michal Marek <mmarek@suse.cz> | ||
| 19 | Cc: Segher Boessenkool <segher@kernel.crashing.org> | ||
| 20 | Cc: Sasha Levin <levinsasha928@gmail.com> | ||
| 21 | Cc: Anton Blanchard <anton@samba.org> | ||
| 22 | Cc: Alan Modra <amodra@gmail.com> | ||
| 23 | Signed-off-by: Andrew Morton <akpm@linux-foundation.org> | ||
| 24 | Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ||
| 25 | Signed-off-by: Sasha Levin <sasha.levin@oracle.com> | ||
| 26 | --- | ||
| 27 | include/linux/compiler-gcc.h | 120 ++++++++++++++++++++++++++++++++++++++++-- | ||
| 28 | include/linux/compiler-gcc3.h | 23 -------- | ||
| 29 | include/linux/compiler-gcc4.h | 91 -------------------------------- | ||
| 30 | include/linux/compiler-gcc5.h | 67 ----------------------- | ||
| 31 | 4 files changed, 116 insertions(+), 185 deletions(-) | ||
| 32 | delete mode 100644 include/linux/compiler-gcc3.h | ||
| 33 | delete mode 100644 include/linux/compiler-gcc4.h | ||
| 34 | delete mode 100644 include/linux/compiler-gcc5.h | ||
| 35 | |||
| 36 | diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h | ||
| 37 | index 371e560..484ef6e 100644 | ||
| 38 | --- a/include/linux/compiler-gcc.h | ||
| 39 | +++ b/include/linux/compiler-gcc.h | ||
| 40 | @@ -115,10 +115,122 @@ | ||
| 41 | #define __maybe_unused __attribute__((unused)) | ||
| 42 | #define __always_unused __attribute__((unused)) | ||
| 43 | |||
| 44 | -#define __gcc_header(x) #x | ||
| 45 | -#define _gcc_header(x) __gcc_header(linux/compiler-gcc##x.h) | ||
| 46 | -#define gcc_header(x) _gcc_header(x) | ||
| 47 | -#include gcc_header(__GNUC__) | ||
| 48 | +/* gcc version specific checks */ | ||
| 49 | + | ||
| 50 | +#if GCC_VERSION < 30200 | ||
| 51 | +# error Sorry, your compiler is too old - please upgrade it. | ||
| 52 | +#endif | ||
| 53 | + | ||
| 54 | +#if GCC_VERSION < 30300 | ||
| 55 | +# define __used __attribute__((__unused__)) | ||
| 56 | +#else | ||
| 57 | +# define __used __attribute__((__used__)) | ||
| 58 | +#endif | ||
| 59 | + | ||
| 60 | +#ifdef CONFIG_GCOV_KERNEL | ||
| 61 | +# if GCC_VERSION < 30400 | ||
| 62 | +# error "GCOV profiling support for gcc versions below 3.4 not included" | ||
| 63 | +# endif /* __GNUC_MINOR__ */ | ||
| 64 | +#endif /* CONFIG_GCOV_KERNEL */ | ||
| 65 | + | ||
| 66 | +#if GCC_VERSION >= 30400 | ||
| 67 | +#define __must_check __attribute__((warn_unused_result)) | ||
| 68 | +#endif | ||
| 69 | + | ||
| 70 | +#if GCC_VERSION >= 40000 | ||
| 71 | + | ||
| 72 | +/* GCC 4.1.[01] miscompiles __weak */ | ||
| 73 | +#ifdef __KERNEL__ | ||
| 74 | +# if GCC_VERSION >= 40100 && GCC_VERSION <= 40101 | ||
| 75 | +# error Your version of gcc miscompiles the __weak directive | ||
| 76 | +# endif | ||
| 77 | +#endif | ||
| 78 | + | ||
| 79 | +#define __used __attribute__((__used__)) | ||
| 80 | +#define __compiler_offsetof(a, b) \ | ||
| 81 | + __builtin_offsetof(a, b) | ||
| 82 | + | ||
| 83 | +#if GCC_VERSION >= 40100 && GCC_VERSION < 40600 | ||
| 84 | +# define __compiletime_object_size(obj) __builtin_object_size(obj, 0) | ||
| 85 | +#endif | ||
| 86 | + | ||
| 87 | +#if GCC_VERSION >= 40300 | ||
| 88 | +/* Mark functions as cold. gcc will assume any path leading to a call | ||
| 89 | + * to them will be unlikely. This means a lot of manual unlikely()s | ||
| 90 | + * are unnecessary now for any paths leading to the usual suspects | ||
| 91 | + * like BUG(), printk(), panic() etc. [but let's keep them for now for | ||
| 92 | + * older compilers] | ||
| 93 | + * | ||
| 94 | + * Early snapshots of gcc 4.3 don't support this and we can't detect this | ||
| 95 | + * in the preprocessor, but we can live with this because they're unreleased. | ||
| 96 | + * Maketime probing would be overkill here. | ||
| 97 | + * | ||
| 98 | + * gcc also has a __attribute__((__hot__)) to move hot functions into | ||
| 99 | + * a special section, but I don't see any sense in this right now in | ||
| 100 | + * the kernel context | ||
| 101 | + */ | ||
| 102 | +#define __cold __attribute__((__cold__)) | ||
| 103 | + | ||
| 104 | +#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ||
| 105 | + | ||
| 106 | +#ifndef __CHECKER__ | ||
| 107 | +# define __compiletime_warning(message) __attribute__((warning(message))) | ||
| 108 | +# define __compiletime_error(message) __attribute__((error(message))) | ||
| 109 | +#endif /* __CHECKER__ */ | ||
| 110 | +#endif /* GCC_VERSION >= 40300 */ | ||
| 111 | + | ||
| 112 | +#if GCC_VERSION >= 40500 | ||
| 113 | +/* | ||
| 114 | + * Mark a position in code as unreachable. This can be used to | ||
| 115 | + * suppress control flow warnings after asm blocks that transfer | ||
| 116 | + * control elsewhere. | ||
| 117 | + * | ||
| 118 | + * Early snapshots of gcc 4.5 don't support this and we can't detect | ||
| 119 | + * this in the preprocessor, but we can live with this because they're | ||
| 120 | + * unreleased. Really, we need to have autoconf for the kernel. | ||
| 121 | + */ | ||
| 122 | +#define unreachable() __builtin_unreachable() | ||
| 123 | + | ||
| 124 | +/* Mark a function definition as prohibited from being cloned. */ | ||
| 125 | +#define __noclone __attribute__((__noclone__)) | ||
| 126 | + | ||
| 127 | +#endif /* GCC_VERSION >= 40500 */ | ||
| 128 | + | ||
| 129 | +#if GCC_VERSION >= 40600 | ||
| 130 | +/* | ||
| 131 | + * Tell the optimizer that something else uses this function or variable. | ||
| 132 | + */ | ||
| 133 | +#define __visible __attribute__((externally_visible)) | ||
| 134 | +#endif | ||
| 135 | + | ||
| 136 | +/* | ||
| 137 | + * GCC 'asm goto' miscompiles certain code sequences: | ||
| 138 | + * | ||
| 139 | + * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670 | ||
| 140 | + * | ||
| 141 | + * Work it around via a compiler barrier quirk suggested by Jakub Jelinek. | ||
| 142 | + * | ||
| 143 | + * (asm goto is automatically volatile - the naming reflects this.) | ||
| 144 | + */ | ||
| 145 | +#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) | ||
| 146 | + | ||
| 147 | +#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP | ||
| 148 | +#if GCC_VERSION >= 40400 | ||
| 149 | +#define __HAVE_BUILTIN_BSWAP32__ | ||
| 150 | +#define __HAVE_BUILTIN_BSWAP64__ | ||
| 151 | +#endif | ||
| 152 | +#if GCC_VERSION >= 40800 || (defined(__powerpc__) && GCC_VERSION >= 40600) | ||
| 153 | +#define __HAVE_BUILTIN_BSWAP16__ | ||
| 154 | +#endif | ||
| 155 | +#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */ | ||
| 156 | + | ||
| 157 | +#if GCC_VERSION >= 50000 | ||
| 158 | +#define KASAN_ABI_VERSION 4 | ||
| 159 | +#elif GCC_VERSION >= 40902 | ||
| 160 | +#define KASAN_ABI_VERSION 3 | ||
| 161 | +#endif | ||
| 162 | + | ||
| 163 | +#endif /* gcc version >= 40000 specific checks */ | ||
| 164 | |||
| 165 | #if !defined(__noclone) | ||
| 166 | #define __noclone /* not needed */ | ||
| 167 | diff --git a/include/linux/compiler-gcc3.h b/include/linux/compiler-gcc3.h | ||
| 168 | deleted file mode 100644 | ||
| 169 | index 7d89feb..0000000 | ||
| 170 | --- a/include/linux/compiler-gcc3.h | ||
| 171 | +++ /dev/null | ||
| 172 | @@ -1,23 +0,0 @@ | ||
| 173 | -#ifndef __LINUX_COMPILER_H | ||
| 174 | -#error "Please don't include <linux/compiler-gcc3.h> directly, include <linux/compiler.h> instead." | ||
| 175 | -#endif | ||
| 176 | - | ||
| 177 | -#if GCC_VERSION < 30200 | ||
| 178 | -# error Sorry, your compiler is too old - please upgrade it. | ||
| 179 | -#endif | ||
| 180 | - | ||
| 181 | -#if GCC_VERSION >= 30300 | ||
| 182 | -# define __used __attribute__((__used__)) | ||
| 183 | -#else | ||
| 184 | -# define __used __attribute__((__unused__)) | ||
| 185 | -#endif | ||
| 186 | - | ||
| 187 | -#if GCC_VERSION >= 30400 | ||
| 188 | -#define __must_check __attribute__((warn_unused_result)) | ||
| 189 | -#endif | ||
| 190 | - | ||
| 191 | -#ifdef CONFIG_GCOV_KERNEL | ||
| 192 | -# if GCC_VERSION < 30400 | ||
| 193 | -# error "GCOV profiling support for gcc versions below 3.4 not included" | ||
| 194 | -# endif /* __GNUC_MINOR__ */ | ||
| 195 | -#endif /* CONFIG_GCOV_KERNEL */ | ||
| 196 | diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h | ||
| 197 | deleted file mode 100644 | ||
| 198 | index 769e198..0000000 | ||
| 199 | --- a/include/linux/compiler-gcc4.h | ||
| 200 | +++ /dev/null | ||
| 201 | @@ -1,91 +0,0 @@ | ||
| 202 | -#ifndef __LINUX_COMPILER_H | ||
| 203 | -#error "Please don't include <linux/compiler-gcc4.h> directly, include <linux/compiler.h> instead." | ||
| 204 | -#endif | ||
| 205 | - | ||
| 206 | -/* GCC 4.1.[01] miscompiles __weak */ | ||
| 207 | -#ifdef __KERNEL__ | ||
| 208 | -# if GCC_VERSION >= 40100 && GCC_VERSION <= 40101 | ||
| 209 | -# error Your version of gcc miscompiles the __weak directive | ||
| 210 | -# endif | ||
| 211 | -#endif | ||
| 212 | - | ||
| 213 | -#define __used __attribute__((__used__)) | ||
| 214 | -#define __must_check __attribute__((warn_unused_result)) | ||
| 215 | -#define __compiler_offsetof(a,b) __builtin_offsetof(a,b) | ||
| 216 | - | ||
| 217 | -#if GCC_VERSION >= 40100 && GCC_VERSION < 40600 | ||
| 218 | -# define __compiletime_object_size(obj) __builtin_object_size(obj, 0) | ||
| 219 | -#endif | ||
| 220 | - | ||
| 221 | -#if GCC_VERSION >= 40300 | ||
| 222 | -/* Mark functions as cold. gcc will assume any path leading to a call | ||
| 223 | - to them will be unlikely. This means a lot of manual unlikely()s | ||
| 224 | - are unnecessary now for any paths leading to the usual suspects | ||
| 225 | - like BUG(), printk(), panic() etc. [but let's keep them for now for | ||
| 226 | - older compilers] | ||
| 227 | - | ||
| 228 | - Early snapshots of gcc 4.3 don't support this and we can't detect this | ||
| 229 | - in the preprocessor, but we can live with this because they're unreleased. | ||
| 230 | - Maketime probing would be overkill here. | ||
| 231 | - | ||
| 232 | - gcc also has a __attribute__((__hot__)) to move hot functions into | ||
| 233 | - a special section, but I don't see any sense in this right now in | ||
| 234 | - the kernel context */ | ||
| 235 | -#define __cold __attribute__((__cold__)) | ||
| 236 | - | ||
| 237 | -#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ||
| 238 | - | ||
| 239 | -#ifndef __CHECKER__ | ||
| 240 | -# define __compiletime_warning(message) __attribute__((warning(message))) | ||
| 241 | -# define __compiletime_error(message) __attribute__((error(message))) | ||
| 242 | -#endif /* __CHECKER__ */ | ||
| 243 | -#endif /* GCC_VERSION >= 40300 */ | ||
| 244 | - | ||
| 245 | -#if GCC_VERSION >= 40500 | ||
| 246 | -/* | ||
| 247 | - * Mark a position in code as unreachable. This can be used to | ||
| 248 | - * suppress control flow warnings after asm blocks that transfer | ||
| 249 | - * control elsewhere. | ||
| 250 | - * | ||
| 251 | - * Early snapshots of gcc 4.5 don't support this and we can't detect | ||
| 252 | - * this in the preprocessor, but we can live with this because they're | ||
| 253 | - * unreleased. Really, we need to have autoconf for the kernel. | ||
| 254 | - */ | ||
| 255 | -#define unreachable() __builtin_unreachable() | ||
| 256 | - | ||
| 257 | -/* Mark a function definition as prohibited from being cloned. */ | ||
| 258 | -#define __noclone __attribute__((__noclone__)) | ||
| 259 | - | ||
| 260 | -#endif /* GCC_VERSION >= 40500 */ | ||
| 261 | - | ||
| 262 | -#if GCC_VERSION >= 40600 | ||
| 263 | -/* | ||
| 264 | - * Tell the optimizer that something else uses this function or variable. | ||
| 265 | - */ | ||
| 266 | -#define __visible __attribute__((externally_visible)) | ||
| 267 | -#endif | ||
| 268 | - | ||
| 269 | -/* | ||
| 270 | - * GCC 'asm goto' miscompiles certain code sequences: | ||
| 271 | - * | ||
| 272 | - * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670 | ||
| 273 | - * | ||
| 274 | - * Work it around via a compiler barrier quirk suggested by Jakub Jelinek. | ||
| 275 | - * | ||
| 276 | - * (asm goto is automatically volatile - the naming reflects this.) | ||
| 277 | - */ | ||
| 278 | -#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) | ||
| 279 | - | ||
| 280 | -#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP | ||
| 281 | -#if GCC_VERSION >= 40400 | ||
| 282 | -#define __HAVE_BUILTIN_BSWAP32__ | ||
| 283 | -#define __HAVE_BUILTIN_BSWAP64__ | ||
| 284 | -#endif | ||
| 285 | -#if GCC_VERSION >= 40800 || (defined(__powerpc__) && GCC_VERSION >= 40600) | ||
| 286 | -#define __HAVE_BUILTIN_BSWAP16__ | ||
| 287 | -#endif | ||
| 288 | -#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */ | ||
| 289 | - | ||
| 290 | -#if GCC_VERSION >= 40902 | ||
| 291 | -#define KASAN_ABI_VERSION 3 | ||
| 292 | -#endif | ||
| 293 | diff --git a/include/linux/compiler-gcc5.h b/include/linux/compiler-gcc5.h | ||
| 294 | deleted file mode 100644 | ||
| 295 | index efee493..0000000 | ||
| 296 | --- a/include/linux/compiler-gcc5.h | ||
| 297 | +++ /dev/null | ||
| 298 | @@ -1,67 +0,0 @@ | ||
| 299 | -#ifndef __LINUX_COMPILER_H | ||
| 300 | -#error "Please don't include <linux/compiler-gcc5.h> directly, include <linux/compiler.h> instead." | ||
| 301 | -#endif | ||
| 302 | - | ||
| 303 | -#define __used __attribute__((__used__)) | ||
| 304 | -#define __must_check __attribute__((warn_unused_result)) | ||
| 305 | -#define __compiler_offsetof(a, b) __builtin_offsetof(a, b) | ||
| 306 | - | ||
| 307 | -/* Mark functions as cold. gcc will assume any path leading to a call | ||
| 308 | - to them will be unlikely. This means a lot of manual unlikely()s | ||
| 309 | - are unnecessary now for any paths leading to the usual suspects | ||
| 310 | - like BUG(), printk(), panic() etc. [but let's keep them for now for | ||
| 311 | - older compilers] | ||
| 312 | - | ||
| 313 | - Early snapshots of gcc 4.3 don't support this and we can't detect this | ||
| 314 | - in the preprocessor, but we can live with this because they're unreleased. | ||
| 315 | - Maketime probing would be overkill here. | ||
| 316 | - | ||
| 317 | - gcc also has a __attribute__((__hot__)) to move hot functions into | ||
| 318 | - a special section, but I don't see any sense in this right now in | ||
| 319 | - the kernel context */ | ||
| 320 | -#define __cold __attribute__((__cold__)) | ||
| 321 | - | ||
| 322 | -#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ||
| 323 | - | ||
| 324 | -#ifndef __CHECKER__ | ||
| 325 | -# define __compiletime_warning(message) __attribute__((warning(message))) | ||
| 326 | -# define __compiletime_error(message) __attribute__((error(message))) | ||
| 327 | -#endif /* __CHECKER__ */ | ||
| 328 | - | ||
| 329 | -/* | ||
| 330 | - * Mark a position in code as unreachable. This can be used to | ||
| 331 | - * suppress control flow warnings after asm blocks that transfer | ||
| 332 | - * control elsewhere. | ||
| 333 | - * | ||
| 334 | - * Early snapshots of gcc 4.5 don't support this and we can't detect | ||
| 335 | - * this in the preprocessor, but we can live with this because they're | ||
| 336 | - * unreleased. Really, we need to have autoconf for the kernel. | ||
| 337 | - */ | ||
| 338 | -#define unreachable() __builtin_unreachable() | ||
| 339 | - | ||
| 340 | -/* Mark a function definition as prohibited from being cloned. */ | ||
| 341 | -#define __noclone __attribute__((__noclone__)) | ||
| 342 | - | ||
| 343 | -/* | ||
| 344 | - * Tell the optimizer that something else uses this function or variable. | ||
| 345 | - */ | ||
| 346 | -#define __visible __attribute__((externally_visible)) | ||
| 347 | - | ||
| 348 | -/* | ||
| 349 | - * GCC 'asm goto' miscompiles certain code sequences: | ||
| 350 | - * | ||
| 351 | - * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670 | ||
| 352 | - * | ||
| 353 | - * Work it around via a compiler barrier quirk suggested by Jakub Jelinek. | ||
| 354 | - * | ||
| 355 | - * (asm goto is automatically volatile - the naming reflects this.) | ||
| 356 | - */ | ||
| 357 | -#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) | ||
| 358 | - | ||
| 359 | -#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP | ||
| 360 | -#define __HAVE_BUILTIN_BSWAP32__ | ||
| 361 | -#define __HAVE_BUILTIN_BSWAP64__ | ||
| 362 | -#define __HAVE_BUILTIN_BSWAP16__ | ||
| 363 | -#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */ | ||
| 364 | - | ||
| 365 | -#define KASAN_ABI_VERSION 4 | ||
| 366 | -- | ||
| 367 | 2.8.2 | ||
| 368 | |||
diff --git a/recipes-kernel/linux/linux-altera-ltsi_4.1.bb b/recipes-kernel/linux/linux-altera-ltsi_4.1.bb index 0d76c79..014267c 100644 --- a/recipes-kernel/linux/linux-altera-ltsi_4.1.bb +++ b/recipes-kernel/linux/linux-altera-ltsi_4.1.bb | |||
| @@ -4,3 +4,10 @@ LINUX_VERSION_SUFFIX = "-ltsi" | |||
| 4 | SRCREV = "1224831d560bf5c1a215220548163d8663a30ecb" | 4 | SRCREV = "1224831d560bf5c1a215220548163d8663a30ecb" |
| 5 | 5 | ||
| 6 | include linux-altera.inc | 6 | include linux-altera.inc |
| 7 | |||
| 8 | FILESEXTRAPATHS_prepend := "${THISDIR}/linux-altera-ltsi:" | ||
| 9 | |||
| 10 | SRC_URI += "\ | ||
| 11 | file://0001-compiler-gcc-integrate-the-various-compiler-gcc-345-.patch \ | ||
| 12 | file://0001-compiler-gcc-disable-ftracer-for-__noclone-functions.patch \ | ||
| 13 | " | ||
diff --git a/recipes-kernel/linux/linux-altera.inc b/recipes-kernel/linux/linux-altera.inc index c2add2f..191b00e 100644 --- a/recipes-kernel/linux/linux-altera.inc +++ b/recipes-kernel/linux/linux-altera.inc | |||
| @@ -29,6 +29,7 @@ KERNEL_DEVICETREE_cyclone5 ?= "socfpga_cyclone5_socdk.dtb socfpga_cyclone5_socki | |||
| 29 | KERNEL_DEVICETREE_arria5 ?= "socfpga_arria5_socdk.dtb" | 29 | KERNEL_DEVICETREE_arria5 ?= "socfpga_arria5_socdk.dtb" |
| 30 | KERNEL_DEVICETREE_arria10 ?= "socfpga_arria10_socdk_sdmmc.dtb socfpga_arria10_socdk_qspi.dtb socfpga_arria10_swvp.dtb" | 30 | KERNEL_DEVICETREE_arria10 ?= "socfpga_arria10_socdk_sdmmc.dtb socfpga_arria10_socdk_qspi.dtb socfpga_arria10_swvp.dtb" |
| 31 | KERNEL_DEVICETREE_stratix10swvp ?= "altera/stratix10_swvp.dtb" | 31 | KERNEL_DEVICETREE_stratix10swvp ?= "altera/stratix10_swvp.dtb" |
| 32 | KERNEL_DEVICETREE_10m50 ?= "10m50_devboard.dtb" | ||
| 32 | 33 | ||
| 33 | require recipes-kernel/linux/linux-yocto.inc | 34 | require recipes-kernel/linux/linux-yocto.inc |
| 34 | require linux-altera-configs.inc | 35 | require linux-altera-configs.inc |
