diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2016-03-31 09:38:51 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2016-04-05 14:19:08 +0200 |
commit | 95272c29378ee7dc15f43fa2758cb28a5913a06d (patch) | |
tree | 634a41d45cc7df083f66442d78fc011dc1790700 /include | |
parent | 61abdbe0bcc2b32745ab4479cc550f4c1f518ee2 (diff) | |
download | linux-stable-95272c29378ee7dc15f43fa2758cb28a5913a06d.tar.gz linux-stable-95272c29378ee7dc15f43fa2758cb28a5913a06d.tar.bz2 linux-stable-95272c29378ee7dc15f43fa2758cb28a5913a06d.zip |
compiler-gcc: disable -ftracer for __noclone functions
-ftracer can duplicate asm blocks causing compilation to fail in
noclone functions. For example, KVM declares a global variable
in an asm like
asm("2: ... \n
.pushsection data \n
.global vmx_return \n
vmx_return: .long 2b");
and -ftracer causes a double declaration.
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Michal Marek <mmarek@suse.cz>
Cc: stable@vger.kernel.org
Cc: kvm@vger.kernel.org
Reported-by: Linda Walsh <lkml@tlinx.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/compiler-gcc.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index 22ab246feed3..eeae401a2412 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h @@ -199,7 +199,7 @@ #define unreachable() __builtin_unreachable() /* Mark a function definition as prohibited from being cloned. */ -#define __noclone __attribute__((__noclone__)) +#define __noclone __attribute__((__noclone__, __optimize__("no-tracer"))) #endif /* GCC_VERSION >= 40500 */ |