Skip to content

Commit 9a92f8e

Browse files
committed
odroidxu4: fix u-boot build on trixie (GCC 14 implicit-decl errors)
CI "Build All Artifacts" failed uboot-odroidxu4-current on the trixie host: drivers/mmc/mmc_boot.c:120:13: error: implicit declaration of function 'mmc_rst_n_func_status' [-Wimplicit-function-declaration] GCC 14 promotes -Wimplicit-function-declaration (plus -Wimplicit-int and -Wincompatible-pointer-types) from warning to hard error by default. This 2017-era hardkernel u-boot (odroidxu4-v2017.05) predates that and trips on it; it built fine on noble/GCC 13. The SWIG/pylibfdt break is unrelated here and already handled by the board's fix_build_for_recent_host-side_libfdt + fix-compilation-on-noble (distutils->setuptools) patches. Add a post_config_uboot_target hook that appends the three -Wno-error= flags to uboot_cflags_array (same mechanism as rockchip-rv1106's GCC-downgrade hook). The missing prototypes are cosmetic - the functions are defined at link time - so downgrading to warnings is safe and keeps the known-good hardkernel boot chain. Signed-off-by: Igor Pecovnik <igor@armbian.com>
1 parent c95a417 commit 9a92f8e

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

config/sources/families/odroidxu4.conf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,20 @@ function custom_kernel_config__hack_odroidxu4_firmware() {
5252
fi
5353
}
5454

55+
# GCC 14 on the trixie host promotes -Wimplicit-function-declaration (and
56+
# -Wimplicit-int / -Wincompatible-pointer-types) from warning to hard error,
57+
# which this 2017-era hardkernel u-boot trips on (e.g. mmc_rst_n_func_status in
58+
# drivers/mmc/mmc_boot.c). Downgrade them back to warnings so it builds again;
59+
# the symbols are defined at link time, only their prototypes are missing.
60+
function post_config_uboot_target__odroidxu4_downgrade_gcc14_errors() {
61+
uboot_cflags_array+=(
62+
"-Wno-error=implicit-function-declaration"
63+
"-Wno-error=implicit-int"
64+
"-Wno-error=incompatible-pointer-types"
65+
)
66+
return 0
67+
}
68+
5569
setup_write_uboot_platform() {
5670
# this will update u-boot on the device rootfs is located on
5771
# in case it's a mmc device, otherwise DEVICE will not be changed

0 commit comments

Comments
 (0)