[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56f0565b15b4b4caa9a08953fa9c679dfa973514.1741975349.git.jpoimboe@kernel.org>
Date: Fri, 14 Mar 2025 12:29:09 -0700
From: Josh Poimboeuf <jpoimboe@...nel.org>
To: x86@...nel.org
Cc: linux-kernel@...r.kernel.org,
Peter Zijlstra <peterz@...radead.org>,
Brendan Jackman <jackmanb@...gle.com>,
Nathan Chancellor <nathan@...nel.org>
Subject: [PATCH 11/13] 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@...nel.org>
Signed-off-by: Josh Poimboeuf <jpoimboe@...nel.org>
---
tools/objtool/include/objtool/warn.h | 6 ++++--
1 file 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, ...) \
({ \
--
2.48.1
Powered by blists - more mailing lists