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 /recipes-kernel/linux/linux-altera-ltsi/0001-compiler-gcc-disable-ftracer-for-__noclone-functions.patch | |
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>
Diffstat (limited to 'recipes-kernel/linux/linux-altera-ltsi/0001-compiler-gcc-disable-ftracer-for-__noclone-functions.patch')
-rw-r--r-- | recipes-kernel/linux/linux-altera-ltsi/0001-compiler-gcc-disable-ftracer-for-__noclone-functions.patch | 45 |
1 files changed, 45 insertions, 0 deletions
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 | |||