Skip to content

Commit 7e0a741

Browse files
committed
objtool: Change "warning:" to "error:" for --Werror
JIRA: https://issues.redhat.com/browse/RHEL-85302 commit a307dd2 Author: Josh Poimboeuf <jpoimboe@kernel.org> Date: Fri Mar 14 12:29:09 2025 -0700 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 Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
1 parent eab9629 commit 7e0a741

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)