All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Egorenkov <egorenar@linux.ibm.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] package/s390-tools: fix build error due to undefined KMS_PLUGIN_LOCATION
Date: Wed, 24 Mar 2021 10:00:01 +0100	[thread overview]
Message-ID: <20210324090001.179735-1-egorenar@linux.ibm.com> (raw)

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

Signed-off-by: Alexander Egorenkov <egorenar@linux.ibm.com>
---
 ...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

diff --git a/package/s390-tools/0002-zkey-Fix-build-error-when-the-compiler-flags-are-ove.patch b/package/s390-tools/0002-zkey-Fix-build-error-when-the-compiler-flags-are-ove.patch
new file mode 100644
index 0000000000..dce8a60499
--- /dev/null
+++ b/package/s390-tools/0002-zkey-Fix-build-error-when-the-compiler-flags-are-ove.patch
@@ -0,0 +1,51 @@
+From 80e702cfbaa3001beaa7eff93943883db79a40fe Mon Sep 17 00:00:00 2001
+From: Ingo Franzki <ifranzki@linux.ibm.com>
+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 <ifranzki@linux.ibm.com>
+Reviewed-by: Jan Hoeppner <hoeppner@linux.ibm.com>
+Signed-off-by: Alexander Egorenkov <egorenar@linux.ibm.com>
+---
+ 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
+
-- 
2.26.3

             reply	other threads:[~2021-03-24  9:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-24  9:00 Alexander Egorenkov [this message]
2021-04-22 21:49 ` [Buildroot] [PATCH 1/1] package/s390-tools: fix build error due to undefined KMS_PLUGIN_LOCATION Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210324090001.179735-1-egorenar@linux.ibm.com \
    --to=egorenar@linux.ibm.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.