Skip to contentSkip to conversation

tools: mkeficapsule: use pkg-config for each lib separat

PATCH In review Heiko Thiery 2 participants 2 messages Aug 6, 2022 – Aug 20, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools: mkeficapsule: use pkg-config for each lib separat

---
As suggested by AKASHI Takahiro but unfortunatly missed for respin. Thus I do this commit afterwards.

 tools/Makefile | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
tools/Makefile +6 -2
index 005e7362a3..3626919633 100644
@@ -245,9 +245,13 @@ hostprogs-$(CONFIG_ASN1_COMPILER)	+= asn1_compiler
 HOSTCFLAGS_asn1_compiler.o = -idirafter $(srctree)/include
 
 HOSTCFLAGS_mkeficapsule.o += \
-	$(shell pkg-config --cflags gnutls uuid 2> /dev/null || echo "")
+	$(shell pkg-config --cflags gnutls 2> /dev/null || echo "")
+HOSTCFLAGS_mkeficapsule.o += \
+	$(shell pkg-config --cflags uuid 2> /dev/null || echo "")
+HOSTLDLIBS_mkeficapsule += \
+	$(shell pkg-config --libs gnutls 2> /dev/null || echo "-lgnutls")
 HOSTLDLIBS_mkeficapsule += \
-	$(shell pkg-config --libs gnutls uuid 2> /dev/null || echo "-lgnutls -luuid")
+	$(shell pkg-config --libs uuid 2> /dev/null || echo "-luuid")
 hostprogs-$(CONFIG_TOOLS_MKEFICAPSULE) += mkeficapsule
 
 # We build some files with extra pedantic flags to try to minimize things
Signature · 1 line
2.20.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 1 line · Heiko Thiery

This lacks a commit message. I will add the following when merging:

Call pkg-config for each library individually.
This improves fallback handling.

Fixes 31a7688cbe0e ("tools: mkeficapsule: use pkg-config to get -luuid

and -lgnutls")

Quoted 27 lines

---
As suggested by AKASHI Takahiro but unfortunatly missed for respin. Thus I do this commit afterwards.

  tools/Makefile | 8 ++++++--
  1 file changed, 6 insertions(+), 2 deletions(-)
tools/Makefile +6 -2
index 005e7362a3..3626919633 100644
@@ -245,9 +245,13 @@ hostprogs-$(CONFIG_ASN1_COMPILER)	+= asn1_compiler
  HOSTCFLAGS_asn1_compiler.o = -idirafter $(srctree)/include
 
  HOSTCFLAGS_mkeficapsule.o += \
-	$(shell pkg-config --cflags gnutls uuid 2> /dev/null || echo "")
+	$(shell pkg-config --cflags gnutls 2> /dev/null || echo "")
+HOSTCFLAGS_mkeficapsule.o += \
+	$(shell pkg-config --cflags uuid 2> /dev/null || echo "")
+HOSTLDLIBS_mkeficapsule += \
+	$(shell pkg-config --libs gnutls 2> /dev/null || echo "-lgnutls")
  HOSTLDLIBS_mkeficapsule += \
-	$(shell pkg-config --libs gnutls uuid 2> /dev/null || echo "-lgnutls -luuid")
+	$(shell pkg-config --libs uuid 2> /dev/null || echo "-luuid")
  hostprogs-$(CONFIG_TOOLS_MKEFICAPSULE) += mkeficapsule
 
  # We build some files with extra pedantic flags to try to minimize things