Skip to content

Linux 6.19: handle --werror with CONFIG_OBJTOOL_WERROR=y - #18152

Merged
behlendorf merged 1 commit into
openzfs:masterfrom
john-cabaj:john-cabaj/handle_objtool_werror_and_Werror
Feb 2, 2026
Merged

behlendorf merged 1 commit into
openzfs:masterfrom
john-cabaj:john-cabaj/handle_objtool_werror_and_Werror

Conversation

@john-cabaj

@john-cabaj john-cabaj commented Jan 22, 2026 •

Copy link
Copy Markdown
Contributor

Motivation and Context

When building against a 6.19 kernel using the Ubuntu 26.04 development build with CONFIG_OBJTOOL_WERROR=y, the zfs-linux DKMS package fails to build due to the following errors:

LD [M]  spl.o
spl.o: error: objtool: spl_kmem_cache_destroy+0x23d: spl_panic() missing __noreturn in .c/.h or NORETURN() in noreturns.h
spl.o: error: objtool: spl_kmem_cache_create+0x5f4: spl_panic() missing __noreturn in .c/.h or NORETURN() in noreturns.h
spl.o: error: objtool: kstat_seq_data_addr+0x77: spl_panic() missing __noreturn in .c/.h or NORETURN() in noreturns.h
spl.o: error: objtool: __kstat_delete+0x7b: spl_panic() missing __noreturn in .c/.h or NORETURN() in noreturns.h
spl.o: error: objtool: kstat_seq_show+0x137: spl_panic() missing __noreturn in .c/.h or NORETURN() in noreturns.h
spl.o: error: objtool: __kstat_create+0x2b0: spl_panic() missing __noreturn in .c/.h or NORETURN() in noreturns.h
spl.o: error: objtool: kstat_seq_start+0x365: spl_panic() missing __noreturn in .c/.h or NORETURN() in noreturns.h
spl.o: error: objtool: taskq_destroy+0x32f: spl_panic() missing __noreturn in .c/.h or NORETURN() in noreturns.h
spl.o: error: objtool: taskq_create_synced+0xcb: spl_panic() missing __noreturn in .c/.h or NORETURN() in noreturns

This is because the upstream Linux kernel introduced a change in 6.19-rc1 (56754f0f46f6: "objtool: Rename --Werror to --werror"), which doesn't match the changes in scripts/objtool-wrapper.in to ignore the compiler flag.

Description

Simple change to modify scripts/objtool-wrapper.in to look for both "--Werror" and "--werror", rather than just the former.

How Has This Been Tested?

This was tested in a QEMU environment using virtme-ng, after bisecting the Linux kernel changes down to the aforementioned commit. Using the changes in this PR, zfs-linux successfully built.

Tests were repeated on a LXD VM, whereupon some simple regression tests were also executed, notably the tests from here - https://git.launchpad.net/~canonical-kernel-team/+git/autotest-client-tests (see "ubuntu_zfs_*" tests).

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Quality assurance (non-breaking change which makes the code more robust against bugs)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

@john-cabaj
john-cabaj force-pushed the john-cabaj/handle_objtool_werror_and_Werror branch from 93b014f to 9e84a93 Compare January 22, 2026 21:27
@john-cabaj
john-cabaj force-pushed the john-cabaj/handle_objtool_werror_and_Werror branch from 9e84a93 to 973e23b Compare January 23, 2026 14:46
@john-cabaj john-cabaj changed the title Linux build: handle --werror with CONFIG_OBJTOOL_WERROR=y Linux 6.19: handle --werror with CONFIG_OBJTOOL_WERROR=y Jan 23, 2026
@john-cabaj

Copy link
Copy Markdown
Contributor Author

Modifying the commit message and PR title to indicate this is needed for Linux 6.19 compat. No functional changes.

@john-cabaj
john-cabaj force-pushed the john-cabaj/handle_objtool_werror_and_Werror branch from 973e23b to 60d7bb3 Compare January 27, 2026 18:44
@john-cabaj
john-cabaj force-pushed the john-cabaj/handle_objtool_werror_and_Werror branch from 60d7bb3 to d9cfc41 Compare January 30, 2026 16:08
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

Signed-off-by: John Cabaj 
@behlendorf
behlendorf force-pushed the john-cabaj/handle_objtool_werror_and_Werror branch from d9cfc41 to eee61f2 Compare February 1, 2026 21:29
@behlendorf
behlendorf merged commit 13601e2 into openzfs:master Feb 2, 2026
26 checks passed
@behlendorf behlendorf added the Status: Accepted Ready to integrate (reviewed, tested) label Feb 2, 2026
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Feb 11, 2026
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 
Reviewed-by: Attila Fülöp 
Reviewed-by: Tony Hutter 
Signed-off-by: John Cabaj 
Closes openzfs#18152
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Feb 11, 2026
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 
Reviewed-by: Attila Fülöp 
Reviewed-by: Tony Hutter 
Signed-off-by: John Cabaj 
Closes openzfs#18152
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Feb 12, 2026
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 
Reviewed-by: Attila Fülöp 
Reviewed-by: Tony Hutter 
Signed-off-by: John Cabaj 
Closes openzfs#18152
pull Bot pushed a commit to A-Archives-and-Forks/openzfs that referenced this pull request Sep 26, 2026
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 
Reviewed-by: Attila Fülöp 
Reviewed-by: Tony Hutter 
Signed-off-by: John Cabaj 
Closes openzfs#18152
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status: Accepted Ready to integrate (reviewed, tested)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants