diff --git a/hal/linux/configs/cocos_defconfig b/hal/linux/configs/cocos_defconfig index d03b6070..2bacf220 100644 --- a/hal/linux/configs/cocos_defconfig +++ b/hal/linux/configs/cocos_defconfig @@ -19,6 +19,9 @@ BR2_PACKAGE_9PFS=y # Image BR2_ROOTFS_POST_BUILD_SCRIPT="$(BR2_EXTERNAL_COCOS_PATH)/board/cocos/post-build.sh" + +# Patches for existing Buildroot packages +BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_COCOS_PATH)/patches" # Image BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_COCOS_PATH)/board/cocos/post-image.sh" diff --git a/hal/linux/patches/gcc/14.3.0/0007-libsanitizer-guard-linux-scc.h-for-linux-7.1.patch b/hal/linux/patches/gcc/14.3.0/0007-libsanitizer-guard-linux-scc.h-for-linux-7.1.patch new file mode 100644 index 00000000..09fef617 --- /dev/null +++ b/hal/linux/patches/gcc/14.3.0/0007-libsanitizer-guard-linux-scc.h-for-linux-7.1.patch @@ -0,0 +1,33 @@ +--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp ++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp +@@ -151,7 +151,15 @@ + #include + #include + #include +-#include ++#if defined(__has_include) ++# if __has_include() ++# include ++# define SANITIZER_HAS_LINUX_SCC_H 1 ++# endif ++#else ++# include ++# define SANITIZER_HAS_LINUX_SCC_H 1 ++#endif + #include + #include + #include +@@ -517,8 +525,13 @@ + unsigned struct_kbsentry_sz = sizeof(struct kbsentry); + unsigned struct_mtconfiginfo_sz = sizeof(struct mtconfiginfo); + unsigned struct_nr_parms_struct_sz = sizeof(struct nr_parms_struct); ++#if SANITIZER_HAS_LINUX_SCC_H + unsigned struct_scc_modem_sz = sizeof(struct scc_modem); + unsigned struct_scc_stat_sz = sizeof(struct scc_stat); ++#else ++ unsigned struct_scc_modem_sz = 0; ++ unsigned struct_scc_stat_sz = 0; ++#endif + unsigned struct_serial_multiport_struct_sz + = sizeof(struct serial_multiport_struct); + unsigned struct_serial_struct_sz = sizeof(struct serial_struct);