diff --git a/meta-ohos-core/recipes-devtools/flex/flex_%.bbappend b/meta-ohos-core/recipes-devtools/flex/flex_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..6896e0d71c13028923a90dfe977d7debdce09ffc --- /dev/null +++ b/meta-ohos-core/recipes-devtools/flex/flex_%.bbappend @@ -0,0 +1,11 @@ +# SPDX-FileCopyrightText: Huawei Inc. +# SPDX-License-Identifier: Apache-2.0 + +# flex uses non-literal format strings in a few places. +# This has been verified to be harmless in 2.6.4. +# +# Removing -Werror=format-nonliteral here allows us to use +# -Werror=format-nonliteral globally in OPTIMIZE_FOR=security mode +# while keeping flex building. + +TARGET_CFLAGS_remove = "-Werror=format-nonliteral"