diff options
author | Josh Poimboeuf <jpoimboe@kernel.org> | 2025-03-14 22:29:09 +0300 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2025-03-17 13:36:02 +0300 |
commit | a307dd28b1c6655b67b2367663331034ac8da79c (patch) | |
tree | 16d0d8549b7ab7eb5bbac9579aedb024233d4404 | |
parent | bb62243943dbef4592266e817f4e2e5a96293907 (diff) | |
download | linux-a307dd28b1c6655b67b2367663331034ac8da79c.tar.xz |
objtool: Change "warning:" to "error:" for --Werror
This is similar to GCC's behavior and makes it more obvious why the
build failed.
Suggested-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Brendan Jackman <jackmanb@google.com>
Link: https://lore.kernel.org/r/56f0565b15b4b4caa9a08953fa9c679dfa973514.1741975349.git.jpoimboe@kernel.org
-rw-r--r-- | tools/objtool/include/objtool/warn.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/objtool/include/objtool/warn.h b/tools/objtool/include/objtool/warn.h index 6180288927fd..e72b9d630551 100644 --- a/tools/objtool/include/objtool/warn.h +++ b/tools/objtool/include/objtool/warn.h @@ -43,8 +43,10 @@ static inline char *offstr(struct section *sec, unsigned long offset) #define WARN(format, ...) \ fprintf(stderr, \ - "%s: warning: objtool: " format "\n", \ - objname, ##__VA_ARGS__) + "%s: %s: objtool: " format "\n", \ + objname, \ + opts.werror ? "error" : "warning", \ + ##__VA_ARGS__) #define WARN_FUNC(format, sec, offset, ...) \ ({ \ |