diff --git a/meta-ohos-core/recipes-bsp/grub/grub-efi_%.bbappend b/meta-ohos-core/recipes-bsp/grub/grub-efi_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..b9147ff3ad52958e8c9caa3976d7357b8b42b8c8 --- /dev/null +++ b/meta-ohos-core/recipes-bsp/grub/grub-efi_%.bbappend @@ -0,0 +1,12 @@ +# SPDX-FileCopyrightText: Huawei Inc. +# SPDX-License-Identifier: Apache-2.0 + +# grub's MD-RAID1 implementation uses zero-length array tricks causing +# array-bounds warnings. +# The warnings have been verifited to be harmless in 2.06; for extra +# security, this should be re-checked after updating. +# +# Removing -Werror=array-bounds here allows us to use -Werror=array-bounds +# globally in OPTIMIZE_FOR=security mode. + +TARGET_CFLAGS_remove = "-Werror=array-bounds" diff --git a/meta-ohos-core/recipes-bsp/grub/grub_%.bbappend b/meta-ohos-core/recipes-bsp/grub/grub_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..b9147ff3ad52958e8c9caa3976d7357b8b42b8c8 --- /dev/null +++ b/meta-ohos-core/recipes-bsp/grub/grub_%.bbappend @@ -0,0 +1,12 @@ +# SPDX-FileCopyrightText: Huawei Inc. +# SPDX-License-Identifier: Apache-2.0 + +# grub's MD-RAID1 implementation uses zero-length array tricks causing +# array-bounds warnings. +# The warnings have been verifited to be harmless in 2.06; for extra +# security, this should be re-checked after updating. +# +# Removing -Werror=array-bounds here allows us to use -Werror=array-bounds +# globally in OPTIMIZE_FOR=security mode. + +TARGET_CFLAGS_remove = "-Werror=array-bounds"