Skip to content
Commit 121c5d08 authored by Mark Wielaard's avatar Mark Wielaard Committed by Masahiro Yamada
Browse files

kbuild: Only add -fno-var-tracking-assignments for old GCC versions



Some old GCC versions between 4.5.0 and 4.9.1 might miscompile code
with -fvar-tracking-assingments (which is enabled by default with -g -O2).
Commit 2062afb4 ("Fix gcc-4.9.0 miscompilation of load_balance()
in scheduler") added -fno-var-tracking-assignments unconditionally to
work around this. But newer versions of GCC no longer have this bug, so
only add it for versions of GCC before 5.0. This allows various tools
such as a perf probe or gdb debuggers or systemtap to resolve variable
locations using dwarf locations in more code.

Signed-off-by: default avatarMark Wielaard <mark@klomp.org>
Acked-by: default avatarIan Rogers <irogers@google.com>
Reviewed-by: default avatarAndi Kleen <andi@firstfloor.org>
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
parent 8402ee18
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment