package/s390-tools: fix build error due to undefined KMS_PLUGIN_LOCATION
PATCH 1/1 package/s390-tools: fix build error due to undefined KMS_PLUGIN_LOCATION
Fixes the following build error:
kms.c:44:2: error: #error KMS_PLUGIN_LOCATION must be defined
44 | #error KMS_PLUGIN_LOCATION must be defined
| ^~~~~
/usr/bin/make -C ../..//libutil/ libutil.a
kms.c: In function ?load_kms_plugin?:
kms.c:274:5: error: ?KMS_PLUGIN_LOCATION? undeclared (first use in this function)
274 | KMS_PLUGIN_LOCATION, so_name);
| ^~~~~~~~~~~~~~~~~~~kms.c:274:5: note: each undeclared identifier is reported only once for each function it appears in
--- ...rror-when-the-compiler-flags-are-ove.patch | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 package/s390-tools/0002-zkey-Fix-build-error-when-the-compiler-flags-are-ove.patch
package/s390-tools/0002-zkey-Fix-build-error-when-the-compiler-flags-are-ove.patch new file +51 -0
@@ -0,0 +1,51 @@ +From 80e702cfbaa3001beaa7eff93943883db79a40fe Mon Sep 17 00:00:00 2001 +From: Ingo Franzki <[email protected]> +Date: Tue, 23 Feb 2021 08:52:26 +0100 +Subject: [PATCH 1/1] zkey: Fix build error when the compiler flags are + overridden + +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 <[email protected]> +Reviewed-by: Jan Hoeppner <[email protected]> +Signed-off-by: Alexander Egorenkov <[email protected]> +--- + zkey/Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/zkey/Makefile b/zkey/Makefile +index b2875482..53fd1cf4 100644 +--- a/zkey/Makefile ++++ b/zkey/Makefile +@@ -20,7 +20,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 +@@ -36,7 +36,7 @@ endif + + libs = $(rootdir)/libutil/libutil.a + +-CFLAGS += -DKMS_PLUGIN_LOCATION=\"$(ZKEYKMSPLUGINDIR)\" ++ALL_CFLAGS += -DKMS_PLUGIN_LOCATION=\"$(ZKEYKMSPLUGINDIR)\" + + detect-libcryptsetup.dep: + echo "#include <libcryptsetup.h>" > detect-libcryptsetup.dep +-- +2.26.3 +
Signature · 1 line
2.26.3
PATCH 1/1 package/s390-tools: fix build error due to undefined KMS_PLUGIN_LOCATION
Hello Alexander,
Quoted 9 lines · On Wed, 24 Mar 2021 10:00:01 +0100 Alexander Egorenkov…
Fixes the following build error:
kms.c:44:2: error: #errorKMS_PLUGIN_LOCATIONmust be defined
44 | #errorKMS_PLUGIN_LOCATIONmust be defined| ^~~~~ /usr/bin/make -C ../..//libutil/ libutil.a kms.c: In function ?load_kms_plugin?: kms.c:274:5: error: ?KMS_PLUGIN_LOCATION? undeclared (first use in this function) 274 | KMS_PLUGIN_LOCATION, so_name); | ^~~~~~~~~~~~~~~~~~~
Quoted 8 lines
kms.c:274:5: note: each undeclared identifier is reported only once for each function it appears in
Signed-off-by Alexander Egorenkov <[email protected]>--- ...rror-when-the-compiler-flags-are-ove.patch | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 package/s390-tools/0002-zkey-Fix-build-error-when-the-compiler-flags-are-ove.patch
Thanks for the patch. However, another patch doing exactly the same thing had been posted 2 days before, and has been applied on March 30.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com