diff --git a/meta-oniro-core/recipes-support/libgcrypt/libgcrypt_%.bbappend b/meta-oniro-core/recipes-support/libgcrypt/libgcrypt_%.bbappend
index 96704ea89aac714098836ae374d644185ef789ab..170408d2692f9e85c9df2c4e631a6846b53e7bf9 100644
--- a/meta-oniro-core/recipes-support/libgcrypt/libgcrypt_%.bbappend
+++ b/meta-oniro-core/recipes-support/libgcrypt/libgcrypt_%.bbappend
@@ -8,4 +8,4 @@
 # Removing -Werror=array-bounds here allows us to use -Werror=array-bounds
 # globally in OPTIMIZE_FOR=security mode.
 
-TARGET_CFLAGS_remove = "-Werror=array-bounds"
+TARGET_CFLAGS:remove = "-Werror=array-bounds"