diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2016-03-31 09:38:51 +0200 |
---|---|---|
committer | Seung-Woo Kim <sw0312.kim@samsung.com> | 2017-01-19 12:28:17 +0900 |
commit | 2d26bf83f54d237d9495d4fb8c05926690ff3322 (patch) | |
tree | b7d315a8d175b15e2c067bac92e8a8777a6a9afc | |
parent | beea9c2d8a4a40ead1a661e8d8206b911e057cc4 (diff) | |
download | kernel-common-2d26bf83f54d237d9495d4fb8c05926690ff3322.tar.gz kernel-common-2d26bf83f54d237d9495d4fb8c05926690ff3322.tar.bz2 kernel-common-2d26bf83f54d237d9495d4fb8c05926690ff3322.zip |
compiler-gcc: disable -ftracer for __noclone functionssubmit/tizen/20170120.144453
commit 95272c29378ee7dc15f43fa2758cb28a5913a06d upstream.
-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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Change-Id: I3aa7d5a11d3a0e027ad930b664930f67c84661c9
-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 bb2cdcd929c6..633716ef19b0 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h @@ -177,7 +177,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 */ |