diff --git a/meta-ohos-core/recipes-support/gpgme/gpgme_%.bbappend b/meta-ohos-core/recipes-support/gpgme/gpgme_%.bbappend
new file mode 100644
index 0000000000000000000000000000000000000000..b66d38be89a67b0c2cf40fe8a00e085427c2d44e
--- /dev/null
+++ b/meta-ohos-core/recipes-support/gpgme/gpgme_%.bbappend
@@ -0,0 +1,11 @@
+# SPDX-FileCopyrightText: Huawei Inc.
+# SPDX-License-Identifier: Apache-2.0
+
+# gpgme uses zero-length array tricks causing array-bounds warnings.
+# The warnings have been verifited to be harmless in 1.13.1; 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"