Linux 6.19: handle --werror with CONFIG_OBJTOOL_WERROR=y

Linux upstream commit 56754f0f46f6: "objtool: Rename
--Werror to --werror" did just that, so we should check for
either "--Werror" or "--werror", else the build will fail

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Attila Fülöp <attila@fueloep.org>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: John Cabaj <john.cabaj@canonical.com>
Closes #18152
This commit is contained in:
John Cabaj 2026-02-02 12:19:18 -06:00 committed by GitHub
parent da9e8ff0df
commit 13601e2d24
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -22,10 +22,10 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE. # IN THE SOFTWARE.
# Filter out objtools '--Werror' flag. # Filter out objtools '--Werror or --werror' flag.
objtool="@abs_objtool_binary@" objtool="@abs_objtool_binary@"
args=$(echo "$*" | sed s/--Werror//) args=$(echo "$*" | sed 's/--Werror\|--werror//')
if [ -z "$objtool" ]; then if [ -z "$objtool" ]; then
echo "$(basename "$0"): No objtool binary configured" 1>&2 echo "$(basename "$0"): No objtool binary configured" 1>&2