]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
uboot-bcm4908: fix build with GCC14 18833/head
authorShiji Yang <yangshiji66@outlook.com>
Sun, 18 May 2025 11:29:30 +0000 (19:29 +0800)
committerHauke Mehrtens <hauke@hauke-m.de>
Thu, 22 May 2025 22:10:23 +0000 (00:10 +0200)
A lot of warnings were treated as errors after the default compiler
switched to GCC14. It's hard to fix them one by one, and this u-boot
is not maintained by upstream, so let's just silence these warnings.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18833
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
include/u-boot.mk
package/boot/uboot-bcm4908/Makefile

index 1bd7ed4bd567445de56ddc176617970163bda6b3..529d69f4ba7f7f893d894adfe8d81f7110dbed03 100644 (file)
@@ -78,6 +78,7 @@ UBOOT_MAKE_FLAGS = \
        PKG_CONFIG_PATH="$(STAGING_DIR_HOST)/lib/pkgconfig" \
        PKG_CONFIG_LIBDIR="$(STAGING_DIR_HOST)/lib/pkgconfig" \
        PKG_CONFIG_EXTRAARGS="--static" \
+       $(if $(KBUILD_CFLAGS),KCFLAGS="$(KBUILD_CFLAGS)") \
        $(if $(findstring c,$(OPENWRT_VERBOSE)),V=1,V='')
 
 define Build/U-Boot/Target
index 7bc49860072f10a17efa00306f18970ff29071dd..313a96161ba4771cda82041ca46eaf63a7c46ffb 100644 (file)
@@ -32,6 +32,12 @@ define U-Boot/bcm4912
   SOC:=bcm4912
 endef
 
+KBUILD_CFLAGS := \
+       -Wno-error=implicit-function-declaration \
+       -Wno-error=implicit-int \
+       -Wno-error=incompatible-pointer-types \
+       -Wno-error=int-conversion
+
 UBOOT_TARGETS := \
        bcm4908 \
        bcm4912