From 91dc2ea40fc98e3f9e1ddcf395fa799e49612f26 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Sun, 10 Apr 2022 12:30:14 +0200 Subject: [PATCH] package/libkcapi: fix build with BR2_OPTIMIZE_0 Override CPPFLAGS to fix the following build failure with BR2_OPTIMIZE_0 raised since bump to version 0.14.0 in commit cd707a9112e38b4ce98326b96c0ed12054ca1cca and https://github.com/smuellerDD/libkcapi/commit/0e7b2b0300782aca19c324f3352f109777b4c51a: /home/autobuild/autobuild/instance-15/output-1/host/i686-buildroot-linux-gnu/sysroot/usr/include/features.h:412:4: error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp] configure adds -D_FORTIFY_SOURCE to CPPFLAGS if it is not already defined. However, we don't want _FORTIFY_SOURCE to be enabled unless it's enabled by Buildroot (for exactly the above reason). Therefore, override CPPFLAGS in th build step to remove _FORTIFY_SOURCE again. It should be noted that upstream already rejected a PR to remove -Werror: https://github.com/smuellerDD/libkcapi/pull/132 Fixes: - http://autobuild.buildroot.org/results/35141ea3046f5a4593e0b27ef92e4ace6bc0be66 Signed-off-by: Fabrice Fontaine Signed-off-by: Arnout Vandecappelle (Essensium/Mind) (cherry picked from commit 83aeec71fd6488295292bd1886decfe1874f9442) Signed-off-by: Peter Korsgaard --- package/libkcapi/libkcapi.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/package/libkcapi/libkcapi.mk b/package/libkcapi/libkcapi.mk index 60b3f94388..09c5c028bc 100644 --- a/package/libkcapi/libkcapi.mk +++ b/package/libkcapi/libkcapi.mk @@ -15,6 +15,7 @@ LIBKCAPI_CONF_ENV = \ ac_cv_path_DB2PDF="" \ ac_cv_path_DB2PS="" \ ac_cv_path_XMLTO="" +LIBKCAPI_MAKE_OPTS = CPPFLAGS="$(TARGET_CPPFLAGS)" ifeq ($(BR2_PACKAGE_LIBKCAPI_ENCAPP),y) LIBKCAPI_CONF_OPTS += --enable-kcapi-encapp