Skip to content

Commit a307dd2

Browse files
jpoimboePeter Zijlstra
authored andcommitted
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
1 parent bb62243 commit a307dd2

File tree

1 file changed

+4
-2
lines changed
  • tools/objtool/include/objtool

1 file changed

+4
-2
lines changed

tools/objtool/include/objtool/warn.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ static inline char *offstr(struct section *sec, unsigned long offset)
4343

4444
#define WARN(format, ...) \
4545
fprintf(stderr, \
46-
"%s: warning: objtool: " format "\n", \
47-
objname, ##__VA_ARGS__)
46+
"%s: %s: objtool: " format "\n", \
47+
objname, \
48+
opts.werror ? "error" : "warning", \
49+
##__VA_ARGS__)
4850

4951
#define WARN_FUNC(format, sec, offset, ...) \
5052
({ \

0 commit comments

Comments
 (0)