Couple of clang warnings for Rockchip boards

Quentin Schulz quentin.schulz at cherry.de
Mon Apr 27 13:51:10 CEST 2026


Hi Tom,

On 4/23/26 9:20 PM, Tom Rini wrote:
> On Thu, Apr 23, 2026 at 12:24:13PM +0200, Quentin Schulz wrote:
>> Hi Simon,
>>
>> On 4/22/26 11:57 PM, Simon Glass wrote:
>>> Hi Quentin,
>>>
>>> On Thu, 23 Apr 2026 at 01:26, Quentin Schulz <quentin.schulz at cherry.de> wrote:
[...]
>> Also, FYI, enabling CONFIG_WERROR doesn't apply the -Werror flag to the host
>> tools, which I believe is an oversight. I see buildman sets
>> HOSTCFLAGS=-Werror, maybe we should do that in the appropriate place based
>> on CONFIG_WERROR as well?
> 
> What does the linux kernel do here? We're just borrowing logic again.
> 

27758d8c2583 ("kbuild: enable -Werror for hostprogs") and 7ded7d37e5f5 
("scripts/Makefile.extrawarn: Respect CONFIG_WERROR / W=e for 
hostprogs") (available in v6.18), set

ifneq ($(findstring e, $(KBUILD_EXTRA_WARN))$(CONFIG_WERROR),)
[...]
# While hostprog flags are used during build bootstrapping (thus should not
# depend on CONFIG_ symbols), -Werror is disruptive and should be opted 
into.
# Only apply -Werror to hostprogs built after the initial Kconfig stage.
KBUILD_HOSTCFLAGS       += -Werror
KBUILD_HOSTLDFLAGS      += -Wl,--fatal-warnings
KBUILD_HOSTRUSTFLAGS    += -Dwarnings
endif

so they do it.

Cheers,
Quentin


More information about the U-Boot mailing list