The first problem I have, appears here: sudo chroot wheezy /bin/bash -c "cd /tmp/ktsan/tools/perf/; make"
Now that I wanted to run qemu, I needed to compile a bzImage (make CC='$GCC/install/bin/gcc' bzImage), which resulted in the following error(s):
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
CHK include/generated/bounds.h
CHK include/generated/timeconst.h
CHK include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
CHK scripts/mod/devicetable-offsets.h
CHK include/generated/compile.h
CC drivers/gpu/drm/i915/i915_gem_request.o
In file included from ./include/uapi/linux/stddef.h:1:0,
from ./include/linux/stddef.h:4,
from ./include/uapi/linux/posix_types.h:4,
from ./include/uapi/linux/types.h:13,
from ./include/linux/types.h:5,
from ./include/linux/prefetch.h:13,
from drivers/gpu/drm/i915/i915_gem_request.c:25:
drivers/gpu/drm/i915/i915_gem_request.c: In function ‘reserve_seqno’:
drivers/gpu/drm/i915/i915_utils.h:48:2: error: implicit declaration of function ‘__builtin_add_overflow_p’ [-Werror=implicit-function-declaration]
__builtin_add_overflow_p((A), (B), (typeof((A) + (B)))0)
^
./include/linux/compiler.h:178:40: note: in definition of macro ‘likely’
# define likely(x) __builtin_expect(!!(x), 1)
^
drivers/gpu/drm/i915/i915_gem_request.c:250:14: note: in expansion of macro ‘add_overflows’
if (likely(!add_overflows(seqno, active)))
^~~~~~~~~~~~~
cc1: some warnings being treated as errors
scripts/Makefile.build:302: recipe for target 'drivers/gpu/drm/i915/i915_gem_request.o' failed
make[4]: *** [drivers/gpu/drm/i915/i915_gem_request.o] Error 1
scripts/Makefile.build:561: recipe for target 'drivers/gpu/drm/i915' failed
make[3]: *** [drivers/gpu/drm/i915] Error 2
scripts/Makefile.build:561: recipe for target 'drivers/gpu/drm' failed
make[2]: *** [drivers/gpu/drm] Error 2
scripts/Makefile.build:561: recipe for target 'drivers/gpu' failed
make[1]: *** [drivers/gpu] Error 2
Makefile:1016: recipe for target 'drivers' failed
make: *** [drivers] Error 2
The exact GCC version is gcc (GCC) 7.0.0 20160427.