diff --git a/meta-ohos-core/recipes-core/util-linux/util-linux_%.bbappend b/meta-ohos-core/recipes-core/util-linux/util-linux_%.bbappend
new file mode 100644
index 0000000000000000000000000000000000000000..a7673ea13aa4baa314957bb44faa6d01583def86
--- /dev/null
+++ b/meta-ohos-core/recipes-core/util-linux/util-linux_%.bbappend
@@ -0,0 +1,11 @@
+# SPDX-FileCopyrightText: Huawei Inc.
+# SPDX-License-Identifier: Apache-2.0
+
+# util-linux uses autogenerated non-literal format strings in its hexdump
+# code. Those strings have been verified to be safe in 2.35.1.
+#
+# Removing -Werror=format-nonliteral here allows us to use
+# -Werror=format-nonliteral globally in OPTIMIZE_FOR=security mode
+# while keeping util-linux building.
+
+TARGET_CFLAGS_remove = "-Werror=format-nonliteral"