From: Fabrice Fontaine Date: Mon, 22 Mar 2021 07:44:42 +0000 (+0100) Subject: package/s390-tools: fix zkey build X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4e520b8b972fb558982bbca01d69c4ebf5cdd2d9;p=buildroot.git package/s390-tools: fix zkey build Build of zkey fails since bump to version 2.16.0 in commit b82b58a8ddc3d079aa2976b3dafbc965b6107648 Fixes: - http://autobuild.buildroot.org/results/e7f229a98dab188ee9c40e4709fd26bfa67358d3 Signed-off-by: Fabrice Fontaine Signed-off-by: Thomas Petazzoni --- diff --git a/package/s390-tools/0002-zkey-Fix-build-error-when-the-compiler-flags-are-overridden.patch b/package/s390-tools/0002-zkey-Fix-build-error-when-the-compiler-flags-are-overridden.patch new file mode 100644 index 0000000000..ee725d396e --- /dev/null +++ b/package/s390-tools/0002-zkey-Fix-build-error-when-the-compiler-flags-are-overridden.patch @@ -0,0 +1,54 @@ +From 3f3f063c98278f53ad3b34e68b70fca62eaea8fb Mon Sep 17 00:00:00 2001 +From: Ingo Franzki +Date: Tue, 23 Feb 2021 08:52:26 +0100 +Subject: [PATCH] zkey: Fix build error when the compiler flags are overridden +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +When the compiler flags are overridden, the build of zkey may fail with: + +kms.c:44:2: error: #error KMS_PLUGIN_LOCATION must be defined + 44 | #error KMS_PLUGIN_LOCATION must be defined + | ^~~~~ + +The Makefile uses CFLAGS variable for defining the KMS_PLUGIN_LOCATION, +but it should rather use ALL_CFLAGS. + +Also use ALL_CPPFLAGS for defining HAVE_LUKS2_SUPPORT. + +Fixes: https://github.com/ibm-s390-linux/s390-tools/issues/108 + +Signed-off-by: Ingo Franzki +Reviewed-by: Jan Hoeppner +Signed-off-by: Jan Höppner + +[Retrieved from: +https://github.com/ibm-s390-linux/s390-tools/commit/3f3f063c98278f53ad3b34e68b70fca62eaea8fb] +Signed-off-by: Fabrice Fontaine +--- + zkey/Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/zkey/Makefile b/zkey/Makefile +index 41129bcf..f74e2091 100644 +--- a/zkey/Makefile ++++ b/zkey/Makefile +@@ -18,7 +18,7 @@ ifneq (${HAVE_CRYPTSETUP2},0) + ifneq (${HAVE_OPENSSL},0) + BUILD_TARGETS += zkey-cryptsetup + INSTALL_TARGETS += install-zkey-cryptsetup +- CPPFLAGS += -DHAVE_LUKS2_SUPPORT ++ ALL_CPPFLAGS += -DHAVE_LUKS2_SUPPORT + else + BUILD_TARGETS += zkey-cryptsetup-skip-openssl + INSTALL_TARGETS += zkey-cryptsetup-skip-openssl +@@ -34,7 +34,7 @@ endif + + libs = $(rootdir)/libutil/libutil.a + +-CFLAGS += -DKMS_PLUGIN_LOCATION=\"$(ZKEYKMSPLUGINDIR)\" ++ALL_CFLAGS += -DKMS_PLUGIN_LOCATION=\"$(ZKEYKMSPLUGINDIR)\" + + detect-libcryptsetup.dep: + echo "#include " > detect-libcryptsetup.dep