rk3588: Disable extra U-Boot CFLAGS

They are not needed anymore since the errors they fixed were fixed upstream in Radxa's uboot source
This commit is contained in:
ColorfulRhino
2024-07-02 16:17:50 +02:00
committed by Igor
parent b358dc7060
commit 91a15ba66c

View File

@@ -78,22 +78,19 @@ family_tweaks_bsp() {
:
}
function post_config_uboot_target__downgrade_gcc_errors_to_warnings() {
declare -i gcc_major_version=0
gcc_major_version=$(gcc -dumpversion | cut -d. -f1)
display_alert "$BOARD" "gcc major version: ${gcc_major_version}" "debug"
# Additional CFLAGS were previously needed to disable certain errors when building vendor U-Boot.
# This is now fixed in Radxa U-Boot sources, but left here (commented out) for reference in case new errors appear in the future.
# rockchip/radxa u-boot wont' build with gcc 13 due to enum-int-mismatch
if [[ ${gcc_major_version} -ge 13 ]]; then
display_alert "$BOARD" "Extra CFLAGS for vendor u-boot building with gcc 13+" "info"
uboot_cflags_array+=("-Wno-error=enum-int-mismatch")
fi
# orangepi u-boot wont' build with gcc 12 due to 'the comparison will always evaluate as true for the address of clk will never be NULL [-Werror=address]'
if [[ ${gcc_major_version} -ge 12 ]]; then
display_alert "$BOARD" "Extra CFLAGS for vendor u-boot building with gcc 12+" "info"
uboot_cflags_array+=("-Wno-error=address")
fi
return 0
}
# function post_config_uboot_target__downgrade_gcc_errors_to_warnings() {
# declare -i gcc_major_version=0
# gcc_major_version=$(gcc -dumpversion | cut -d. -f1)
# display_alert "$BOARD" "GCC major version: ${gcc_major_version}" "debug"
#
# # Rockchip/Radxa U-Boot wont' build with GCC 13 due to enum-int-mismatch
# if [[ ${gcc_major_version} -ge 13 ]]; then
# display_alert "$BOARD" "Adding extra CFLAGS to fix vendor U-Boot building with GCC 13+" "info"
# uboot_cflags_array+=("-Wno-error=enum-int-mismatch")
# fi
#
# return 0
# }