aboutsummaryrefslogtreecommitdiffstats
path: root/tools/objtool/builtin-orc.c
diff options
context:
space:
mode:
authorJosh Poimboeuf <jpoimboe@redhat.com>2017-07-24 18:34:14 -0500
committerIngo Molnar <mingo@kernel.org>2017-07-25 11:12:45 +0200
commit867ac9d737094e46a6c33213f16dd1ec9e8bd5d5 (patch)
tree708c868a63e86271f0572ea7120a406bfe7e88a1 /tools/objtool/builtin-orc.c
parentx86/io: Make readq() / writeq() API consistent (diff)
downloadlinux-dev-867ac9d737094e46a6c33213f16dd1ec9e8bd5d5.tar.xz
linux-dev-867ac9d737094e46a6c33213f16dd1ec9e8bd5d5.zip
objtool: Fix gcov check for older versions of GCC
Objtool tries to silence 'unreachable instruction' warnings when it detects gcov is enabled, because gcov produces a lot of unreachable instructions and they don't really matter. However, the 0-day bot is still reporting some unreachable instruction warnings with CONFIG_GCOV_KERNEL=y on GCC 4.6.4. As it turns out, objtool's gcov detection doesn't work with older versions of GCC because they don't create a bunch of symbols with the 'gcov.' prefix like newer versions of GCC do. Move the gcov check out of objtool and instead just create a new '--no-unreachable' flag which can be passed in by the kernel Makefile when CONFIG_GCOV_KERNEL is defined. Also rename the 'nofp' variable to 'no_fp' for consistency with the new 'no_unreachable' variable. Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Fixes: 9cfffb116887 ("objtool: Skip all "unreachable instruction" warnings for gcov kernels") Link: http://lkml.kernel.org/r/c243dc78eb2ffdabb6e927844dea39b6033cd395.1500939244.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/objtool/builtin-orc.c')
-rw-r--r--tools/objtool/builtin-orc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/objtool/builtin-orc.c b/tools/objtool/builtin-orc.c
index 5ca41ab0df48..4c6b5c9ef073 100644
--- a/tools/objtool/builtin-orc.c
+++ b/tools/objtool/builtin-orc.c
@@ -37,7 +37,7 @@ static const char *orc_usage[] = {
};
extern const struct option check_options[];
-extern bool nofp;
+extern bool no_fp, no_unreachable;
int cmd_orc(int argc, const char **argv)
{
@@ -51,7 +51,7 @@ int cmd_orc(int argc, const char **argv)
objname = argv[0];
- return check(objname, nofp, true);
+ return check(objname, no_fp, no_unreachable, true);
}