Revert "linux: disable -Werror"
PATCH v2 1/1 Revert "linux: disable -Werror"
From: Quentin Schulz <[email protected]>
This reverts commit 6b56e0b4f09b36140e2cb9e41072d5ac6074f375.
commit 6b56e0b4f09b ("linux: disable -Werror") said we needed to disable CONFIG_WERROR in the kernel because it failed to build the esp-hosted kernel module. This was very much the hammer approach because a) it'd be better to fix the warnings in the kernel module or b) disable the kernel's CONFIG_WERROR *only* if esp-hosted is to be built, via the ESP_HOSTED_LINUX_CONFIG_FIXUPS variable in package/esp-hosted/esp-hosted.mk.
This is a simple revert without making any change to any kernel module (including esp-hosted) because all upstream Buildroot defconfigs with a kernel module enabled build fine today (albeit with warnings). The two defconfigs that were pointed at by the now-reverted commit all have been (updated for and) run on master without failing the build.
---
I've rebuilt the kernel of all 307 upstream Buildroot defconfigs which selects the Linux kernel with:
for defconfig in $(git grep -l LINUX_KERNEL configs/); do
d=$(basename "$defconfig")
make O=build/$d $d | tee -a log.txt
make O=build/$d linux | tee -a log.txt || break rm -rf build/$d
done
and the loop didn't exit early and log.txt didn't contain any error: (or even warning: or ^^^ lines, which is surprising...).
I also built the kernel modules of the couple of upstream Buildroot defconfigs that build some modules, identified with:
for module in $(git grep -l --full-name kernel-module package/ | xargs basename -a | grep '.mk' | xargs basename -a -s .mk | sed 's/-/_/g' | tr '[:lower:]' '[:upper:]' | sed 's/\(.*\)/BR2_PACKAGE_\1/'); do
git grep $module configs
done
which returns:
configs/orangepi_lite_defconfig:BR2_PACKAGE_RTL8189FS=y configs/orangepi_pc_plus_defconfig:BR2_PACKAGE_RTL8189FS=y configs/mangopi_mq1rdw2_defconfig:BR2_PACKAGE_RTL8723DS=y configs/sipeed_lichee_rv_dock_defconfig:BR2_PACKAGE_RTL8723DS=y configs/sipeed_lichee_rv_dock_defconfig:BR2_PACKAGE_RTL8723DS_BT=y configs/orangepi_zero_defconfig:BR2_PACKAGE_XR819_XRADIO=y
and while there were warnings, they don't fail the build of the kernel module(s) for those defconfigs. No available updates for all kernel modules I built, as far as I could tell.
---
Changes in v2:
- changed implementation: simply revert commit 6b56e0b4f09b instead of adding yet another Kconfig knob,
- Link to v1: https://patch.msgid.link/[email protected]
--- linux/linux.mk | 1 - 1 file changed, 1 deletion(-)
linux/linux.mk +0 -1
@@ -474,7 +474,6 @@ define LINUX_KCONFIG_FIXUP_CMDS $(call KCONFIG_ENABLE_OPT,CONFIG_LOGO) $(call KCONFIG_ENABLE_OPT,CONFIG_LOGO_LINUX_CLUT224)) $(call KCONFIG_DISABLE_OPT,CONFIG_GCC_PLUGINS) - $(call KCONFIG_DISABLE_OPT,CONFIG_WERROR) $(PACKAGES_LINUX_CONFIG_FIXUPS) endef
---
base-commit: c8dd9e9a011f1a5755df62baceb865efc09862fe
change-id: 20260325-linux-werror-9f6e4ad44b0f
Best regards,
Signature · 6 lines
Quentin Schulz <[email protected]> _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 12 lines · Quentin Schulz
From: Quentin Schulz <[email protected]>
This reverts commit
6b56e0b4f09b36140e2cb9e41072d5ac6074f375.commit
6b56e0b4f09b("linux: disable -Werror") said we needed to disableCONFIG_WERRORin the kernel because it failed to build the esp-hosted kernel module. This was very much the hammer approach because a) it'd be better to fix the warnings in the kernel module or b) disable the kernel'sCONFIG_WERROR*only* if esp-hosted is to be built, via theESP_HOSTED_LINUX_CONFIG_FIXUPSvariable inpackage/esp-hosted/esp-hosted.mk.
Quoted 8 lines
This is a simple revert without making any change to any kernel module (including esp-hosted) because all upstream Buildroot defconfigs with a kernel module enabled build fine today (albeit with warnings). The two defconfigs that were pointed at by the now-reverted commit all have been (updated for and) run on master without failing the build.
Suggested-by Arnout Vandecappelle <[email protected]>Signed-off-by Quentin Schulz <[email protected]>
Applied to master, thanks.
Quoted 10 lines
---
I've rebuilt the kernel of all 307 upstream Buildroot defconfigs which selects the Linux kernel with:for defconfig in $(git grep -l
LINUX_KERNELconfigs/); do
d=$(basename "$defconfig")
make O=build/$d $d | tee -a log.txt
make O=build/$d linux | tee -a log.txt || break rm -rf build/$d
done
That is some serious testing!
Quoted 3 lines
and the loop didn't exit early and log.txt didn't contain any error: (or even warning: or ^^^ lines, which is surprising...).
But, the commit message says "albeit with warnings"... Or does it mean that
most of those configs anyway don't enable CONFIG_WERROR so this revert has no effect on them? Perhaps it would have been a good idea to identify those explicitly - who knows, maybe CONFIG_WERROR isn't enabled anywhere and your test didn't actually prove anything...
Anyway, it's applied :-)
Regards,
Arnout
Quoted 45 lines
I also built the kernel modules of the couple of upstream Buildroot defconfigs that build some modules, identified with:
for module in $(git grep -l --full-name kernel-module package/ | xargs basename -a | grep '.mk' | xargs basename -a -s .mk | sed 's/-/_/g' | tr '[:lower:]' '[:upper:]' | sed 's/\(.*\)/BR2_PACKAGE_\1/'); do
git grep $module configs
donewhich returns:
configs/orangepi_lite_defconfig:BR2_PACKAGE_RTL8189FS=y configs/orangepi_pc_plus_defconfig:BR2_PACKAGE_RTL8189FS=y configs/mangopi_mq1rdw2_defconfig:BR2_PACKAGE_RTL8723DS=y configs/sipeed_lichee_rv_dock_defconfig:BR2_PACKAGE_RTL8723DS=y configs/sipeed_lichee_rv_dock_defconfig:BR2_PACKAGE_RTL8723DS_BT=y configs/orangepi_zero_defconfig:BR2_PACKAGE_XR819_XRADIO=yand while there were warnings, they don't fail the build of the kernel module(s) for those defconfigs. No available updates for all kernel modules I built, as far as I could tell.
---
Changes in v2:
- changed implementation: simply revert commit6b56e0b4f09binstead of adding yet anotherKconfigknob,
- Link to v1: https://patch.msgid.link/[email protected]--- linux/linux.mk | 1 - 1 file changed, 1 deletion(-)linux/linux.mk +0
-2@@ -474,7 +474,6 @@ define LINUX_KCONFIG_FIXUP_CMDS $(call KCONFIG_ENABLE_OPT,CONFIG_LOGO) $(call KCONFIG_ENABLE_OPT,CONFIG_LOGO_LINUX_CLUT224)) $(call KCONFIG_DISABLE_OPT,CONFIG_GCC_PLUGINS) - $(call KCONFIG_DISABLE_OPT,CONFIG_WERROR) $(PACKAGES_LINUX_CONFIG_FIXUPS) endef ---base-commit:
c8dd9e9a011f1a5755df62baceb865efc09862fe
change-id: 20260325-linux-werror-9f6e4ad44b0f
Quoted 4 lines
Best regards,
--
Quentin Schulz <[email protected]>
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 21 lines · Arnout Vandecappelle
Quoted 18 lines · Quentin Schulz
From: Quentin Schulz <[email protected]>
This reverts commit
6b56e0b4f09b36140e2cb9e41072d5ac6074f375.commit
6b56e0b4f09b("linux: disable -Werror") said we needed to disableCONFIG_WERRORin the kernel because it failed to build the esp-hosted kernel module. This was very much the hammer approach because a) it'd be better to fix the warnings in the kernel module or b) disable the kernel'sCONFIG_WERROR*only* if esp-hosted is to be built, via theESP_HOSTED_LINUX_CONFIG_FIXUPSvariable inpackage/esp-hosted/esp-hosted.mk.This is a simple revert without making any change to any kernel module (including esp-hosted) because all upstream Buildroot defconfigs with a kernel module enabled build fine today (albeit with warnings). The two defconfigs that were pointed at by the now-reverted commit all have been (updated for and) run on master without failing the build.
Quoted 5 lines
Quoted 2 lines
Suggested-by Arnout Vandecappelle <[email protected]>Signed-off-by Quentin Schulz <[email protected]>Applied to master, thanks.
Thanks!
Quoted 4 lines
Quoted 4 lines
---
I've rebuilt the kernel of all 307 upstream Buildroot defconfigs which selects the Linux kernel with:
Quoted 9 lines
Quoted 6 lines
for defconfig in $(git grep -l
LINUX_KERNELconfigs/); do
d=$(basename "$defconfig")
make O=build/$d $d | tee -a log.txt
make O=build/$d linux | tee -a log.txt || break rm -rf build/$d
doneThat is some serious testing!
Could spend some time building stuff on an idly server :)
Quoted 6 lines
Quoted 3 lines
and the loop didn't exit early and log.txt didn't contain any error: (or even warning: or ^^^ lines, which is surprising...).
But, the commit message says "albeit with warnings"... Or does it mean that most of those configs anyway don't enable
CONFIG_WERRORso this revert has no effect on them? Perhaps it would have been a good idea to identify those explicitly - who knows, maybeCONFIG_WERRORisn't enabled anywhere and your test didn't actually prove anything...
"Albeit with warnings" apply to "defconfigs with a kernel module enabled" that I list below. There aren't many kernel module packages (out-of-tree) that are in Buildroot upstream defconfigs. It is thus proved that for at least a few of the Buildroot defconfigs which build both the Linux kernel and some out of tree modules with warnings that the Linux kernel defconfig doesn't have CONFIG_WERROR enabled (otherwise the build would fail).
I mentioned that building the Linux kernel from all 307 upstream defconfigs selecting it didn't output any warning or ^^^ line in the build log, though I noted this was odd. This means that I either missed the warning with my poor grep-fu or that there are none. What it proves though is that disabling the forced disabling of CONFIG_WERROR didn't trigger build errors on any of the 307 upstream defconfigs building the Linux kernel. Whether they actually enable CONFIG_WERROR is a different topic, but this proves no regression is introduced (at least when I wrote and tested the patch :) ). I did test with a custom defconfig that this flag is now respected and fails the build if there's a warning.
Quoted 25 lines
Anyway, it's applied :-)
Regards,
ArnoutQuoted 19 lines
I also built the kernel modules of the couple of upstream Buildroot defconfigs that build some modules, identified with:
for module in $(git grep -l --full-name kernel-module package/ | xargs basename -a | grep '.mk' | xargs basename -a -s .mk | sed 's/-/_/g' | tr '[:lower:]' '[:upper:]' | sed 's/\(.*\)/BR2_PACKAGE_\1/'); do
git grep $module configs
donewhich returns:
configs/orangepi_lite_defconfig:BR2_PACKAGE_RTL8189FS=y configs/orangepi_pc_plus_defconfig:BR2_PACKAGE_RTL8189FS=y configs/mangopi_mq1rdw2_defconfig:BR2_PACKAGE_RTL8723DS=y configs/sipeed_lichee_rv_dock_defconfig:BR2_PACKAGE_RTL8723DS=y configs/sipeed_lichee_rv_dock_defconfig:BR2_PACKAGE_RTL8723DS_BT=y configs/orangepi_zero_defconfig:BR2_PACKAGE_XR819_XRADIO=yand while there were warnings, they don't fail the build of the kernel module(s) for those defconfigs. No available updates for all kernel modules I built, as far as I could tell.
^^^^ this is the part which relates to "albeit with warnings".
Thanks for the feedback, lemme know if there's anything I can do if there's some desired improvement or follow-up to do.
It's late here and I'm tired so hopefully what I'm saying makes sense.
Happy hackathon!
Cheers,
Quentin
Hi Arnout,
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 50 lines · Quentin Schulz
Quoted 21 lines · Arnout Vandecappelle
Quoted 18 lines · Quentin Schulz
From: Quentin Schulz <[email protected]>
This reverts commit
6b56e0b4f09b36140e2cb9e41072d5ac6074f375.commit
6b56e0b4f09b("linux: disable -Werror") said we needed to disableCONFIG_WERRORin the kernel because it failed to build the esp-hosted kernel module. This was very much the hammer approach because a) it'd be better to fix the warnings in the kernel module or b) disable the kernel'sCONFIG_WERROR*only* if esp-hosted is to be built, via theESP_HOSTED_LINUX_CONFIG_FIXUPSvariable inpackage/esp-hosted/esp-hosted.mk.This is a simple revert without making any change to any kernel module (including esp-hosted) because all upstream Buildroot defconfigs with a kernel module enabled build fine today (albeit with warnings). The two defconfigs that were pointed at by the now-reverted commit all have been (updated for and) run on master without failing the build.
Quoted 5 lines
Quoted 2 lines
Suggested-by Arnout Vandecappelle <[email protected]>Signed-off-by Quentin Schulz <[email protected]>Applied to master, thanks.
Thanks!
Quoted 4 lines
Quoted 4 lines
---
I've rebuilt the kernel of all 307 upstream Buildroot defconfigs which selects the Linux kernel with:Quoted 9 lines
Quoted 6 lines
for defconfig in $(git grep -l
LINUX_KERNELconfigs/); do
d=$(basename "$defconfig")
make O=build/$d $d | tee -a log.txt
make O=build/$d linux | tee -a log.txt || break rm -rf build/$d
doneThat is some serious testing!
Could spend some time building stuff on an idly server :)
Quoted 4 lines
Quoted 3 lines
and the loop didn't exit early and log.txt didn't contain any error: (or even warning: or ^^^ lines, which is surprising...).
Quoted 6 lines
Quoted 2 lines
But, the commit message says "albeit with warnings"... Or does it mean that most of those configs anyway don't enable
CONFIG_WERRORso this revert has no effect on them? Perhaps it would have been a good idea to identify those explicitly - who knows, maybeCONFIG_WERRORisn't enabled anywhere and your test didn't actually prove anything..."Albeit with warnings" apply to "defconfigs with a kernel module enabled" that I list below. There aren't many kernel module packages (out-of-tree) that are in Buildroot upstream defconfigs. It is thus proved that for at least a few of the Buildroot defconfigs which build both the Linux kernel and some out of tree modules with warnings that the Linux kernel defconfig doesn't have
CONFIG_WERRORenabled (otherwise the build would fail).I mentioned that building the Linux kernel from all 307 upstream defconfigs selecting it didn't output any warning or ^^^ line in the build log, though I noted this was odd. This means that I either missed the warning with my poor grep-fu or that there are none. What it proves though is that disabling the forced disabling of
CONFIG_WERRORdidn't trigger build errors on any of the 307 upstream defconfigs building the Linux kernel. Whether they actually enableCONFIG_WERRORis a different topic, but this proves no regression is introduced (at least when I wrote and tested the patch :) ). I did test with a custom defconfig that this flag is now respected and fails the build if there's a warning.
CONFIG_WERROR is set by the kernel itself in the arch defconfig of i386 andx86_64 (and nowhere else). And for the few x86 defconfigs we have, we use a custom defconfig that doesn't set CONFIG_WERROR. So I don't think any of the defconfigs you tested actually sets CONFIG_WERROR, so this patch has no effect :-)
And of course, whether or not CONFIG_WERROR is going to lead to a failure
depends on both the kernel version and the toolchain version... That's a combinatorial space we don't want to try to cover :-). It is very unlikely that in all these combinations, there is _nothing_ that fails with CONFIG_WERROR set.
So I think the proper solution is to make sure that it doesn't happen in the
autobuilders. There at least we always use the same kernel version. And then the proper approach is to fix the issue in the external module itself and sending that patch upstream to the external module. Or just remove the external module, most of them are pretty crappy (which is why they're external to begin with).
Regards,
Arnout
Quoted 31 lines
Quoted 26 lines
Anyway, it's applied :-)
Regards,
ArnoutQuoted 19 lines
I also built the kernel modules of the couple of upstream Buildroot defconfigs that build some modules, identified with:
for module in $(git grep -l --full-name kernel-module package/ | xargs basename -a | grep '.mk' | xargs basename -a -s .mk | sed 's/-/_/g' | tr '[:lower:]' '[:upper:]' | sed 's/\(.*\)/BR2_PACKAGE_\1/'); do
git grep $module configs
donewhich returns:
configs/orangepi_lite_defconfig:BR2_PACKAGE_RTL8189FS=y configs/orangepi_pc_plus_defconfig:BR2_PACKAGE_RTL8189FS=y configs/mangopi_mq1rdw2_defconfig:BR2_PACKAGE_RTL8723DS=y configs/sipeed_lichee_rv_dock_defconfig:BR2_PACKAGE_RTL8723DS=y configs/sipeed_lichee_rv_dock_defconfig:BR2_PACKAGE_RTL8723DS_BT=y configs/orangepi_zero_defconfig:BR2_PACKAGE_XR819_XRADIO=yand while there were warnings, they don't fail the build of the kernel module(s) for those defconfigs. No available updates for all kernel modules I built, as far as I could tell.
^^^^ this is the part which relates to "albeit with warnings".
Thanks for the feedback, lemme know if there's anything I can do if there's some desired improvement or follow-up to do.
Quoted 7 lines
It's late here and I'm tired so hopefully what I'm saying makes sense.
Happy hackathon!
Cheers,
Quentin
Hi Arnout,
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Thomas Perale via buildroot
AppliedIn reply of:
Quoted 10 lines
This reverts commit
6b56e0b4f09b36140e2cb9e41072d5ac6074f375.commit
6b56e0b4f09b("linux: disable -Werror") said we needed to disableCONFIG_WERRORin the kernel because it failed to build the esp-hosted kernel module. This was very much the hammer approach because a) it'd be better to fix the warnings in the kernel module or b) disable the kernel'sCONFIG_WERROR*only* if esp-hosted is to be built, via theESP_HOSTED_LINUX_CONFIG_FIXUPSvariable inpackage/esp-hosted/esp-hosted.mk.
Quoted 8 lines
This is a simple revert without making any change to any kernel module (including esp-hosted) because all upstream Buildroot defconfigs with a kernel module enabled build fine today (albeit with warnings). The two defconfigs that were pointed at by the now-reverted commit all have been (updated for and) run on master without failing the build.
Suggested-by Arnout Vandecappelle <[email protected]>Signed-off-by Quentin Schulz <[email protected]>
Applied to 2025.02.x & 2026.02.x. Thanks
Quoted 58 lines
---
I've rebuilt the kernel of all 307 upstream Buildroot defconfigs which selects the Linux kernel with:for defconfig in $(git grep -l
LINUX_KERNELconfigs/); do
d=$(basename "$defconfig")
make O=build/$d $d | tee -a log.txt
make O=build/$d linux | tee -a log.txt || break rm -rf build/$d
doneand the loop didn't exit early and log.txt didn't contain any error: (or even warning: or ^^^ lines, which is surprising...).
I also built the kernel modules of the couple of upstream Buildroot defconfigs that build some modules, identified with:
for module in $(git grep -l --full-name kernel-module package/ | xargs basename -a | grep '.mk' | xargs basename -a -s .mk | sed 's/-/_/g' | tr '[:lower:]' '[:upper:]' | sed 's/\(.*\)/BR2_PACKAGE_\1/'); do
git grep $module configs
donewhich returns:
configs/orangepi_lite_defconfig:BR2_PACKAGE_RTL8189FS=y configs/orangepi_pc_plus_defconfig:BR2_PACKAGE_RTL8189FS=y configs/mangopi_mq1rdw2_defconfig:BR2_PACKAGE_RTL8723DS=y configs/sipeed_lichee_rv_dock_defconfig:BR2_PACKAGE_RTL8723DS=y configs/sipeed_lichee_rv_dock_defconfig:BR2_PACKAGE_RTL8723DS_BT=y configs/orangepi_zero_defconfig:BR2_PACKAGE_XR819_XRADIO=yand while there were warnings, they don't fail the build of the kernel module(s) for those defconfigs. No available updates for all kernel modules I built, as far as I could tell.
---
Changes in v2:
- changed implementation: simply revert commit6b56e0b4f09binstead of adding yet anotherKconfigknob,
- Link to v1: https://patch.msgid.link/[email protected]--- linux/linux.mk | 1 - 1 file changed, 1 deletion(-)linux/linux.mk +0
-2@@ -474,7 +474,6 @@ define LINUX_KCONFIG_FIXUP_CMDS $(call KCONFIG_ENABLE_OPT,CONFIG_LOGO) $(call KCONFIG_ENABLE_OPT,CONFIG_LOGO_LINUX_CLUT224)) $(call KCONFIG_DISABLE_OPT,CONFIG_GCC_PLUGINS) - $(call KCONFIG_DISABLE_OPT,CONFIG_WERROR) $(PACKAGES_LINUX_CONFIG_FIXUPS) endef ---base-commit:
c8dd9e9a011f1a5755df62baceb865efc09862fe
change-id: 20260325-linux-werror-9f6e4ad44b0f
Quoted 8 lines
Best regards,
Signature · 6 lines
Quentin Schulz <[email protected]> _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot