From 65b7825a2f7f42aa47e757194898bf005edbc3ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernhard=20Rosenkr=C3=A4nzer?= <bernhard.rosenkraenzer.ext@huawei.com> Date: Thu, 2 Sep 2021 21:04:26 +0200 Subject: [PATCH] libpcre2: Don't use -Werror=array-bounds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit pcre2test uses negative array indices which seem to confuse the array bounds checker. The warnings look harmless. Disable -Werror=array-bounds for libpcre2 to allow building with a global -Werror=array-bounds. Signed-off-by: Bernhard Rosenkränzer <bernhard.rosenkraenzer.ext@huawei.com> --- .../recipes-support/libpcre/libpcre2_%.bbappend | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 meta-ohos-core/recipes-support/libpcre/libpcre2_%.bbappend diff --git a/meta-ohos-core/recipes-support/libpcre/libpcre2_%.bbappend b/meta-ohos-core/recipes-support/libpcre/libpcre2_%.bbappend new file mode 100644 index 00000000..aa54e193 --- /dev/null +++ b/meta-ohos-core/recipes-support/libpcre/libpcre2_%.bbappend @@ -0,0 +1,12 @@ +# SPDX-FileCopyrightText: Huawei Inc. +# SPDX-License-Identifier: Apache-2.0 + +# -Werror=array-bounds gets confused over negative array indices in +# pcre2test. +# The warnings have been verifited to be harmless in 10.34; 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" -- GitLab