]> Git Repo - linux.git/commit
kbuild: Only add -fno-var-tracking-assignments for old GCC versions
authorMark Wielaard <[email protected]>
Sat, 17 Oct 2020 12:01:35 +0000 (14:01 +0200)
committerMasahiro Yamada <[email protected]>
Tue, 20 Oct 2020 15:28:53 +0000 (00:28 +0900)
commit121c5d08d53cb1f95d9881838523b0305c3f3bef
tree3e7286b299e940dac4fec5f82ac210b88e9b227d
parent8402ee182c417a32d5e5a702f2fa2b01e76dc220
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 2062afb4f804 ("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: Mark Wielaard <[email protected]>
Acked-by: Ian Rogers <[email protected]>
Reviewed-by: Andi Kleen <[email protected]>
Signed-off-by: Masahiro Yamada <[email protected]>
Makefile
This page took 0.070869 seconds and 4 git commands to generate.