[Skiboot] [PATCH 2/2] libstb/(create|print)-container: Enable custom ssl dir

Reza Arbab arbab at linux.ibm.com
Sat May 10 03:53:11 AEST 2025


Respect SSL_DIR if it is set, to use ssl headers and libs that are in a
nonstandard location.

When skiboot is built by op-build, the system ssl installation is being
used instead of the buildroot one. This change will let us fix that.

Signed-off-by: Reza Arbab <arbab at linux.ibm.com>
---
 libstb/Makefile.inc | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/libstb/Makefile.inc b/libstb/Makefile.inc
index d3a9ee2cdf84..8c4536f81400 100644
--- a/libstb/Makefile.inc
+++ b/libstb/Makefile.inc
@@ -19,15 +19,20 @@ CPPFLAGS += -I$(SRC)/$(LIBSTB_DIR)/crypto/mbedtls/include
 CPPFLAGS += -I$(SRC)/$(LIBSTB_DIR)/ibmtpm20tss/utils
 CFLAGS += -DTPM_SKIBOOT
 
+ifneq ($(SSL_DIR),)
+HOSTCFLAGS += -I$(SSL_DIR)/include
+HOSTLDFLAGS += -L$(SSL_DIR)/lib -Wl,-rpath,$(SSL_DIR)/lib
+endif
+
 $(LIBSTB): $(LIBSTB_OBJS:%=$(LIBSTB_DIR)/%) $(DRIVERS) $(SECVAR) $(CRYPTO) $(TSS2)
 
 libstb/create-container: libstb/create-container.c libstb/container-utils.c
-	$(call Q, HOSTCC ,$(HOSTCC) $(HOSTCFLAGS) \
+	$(call Q, HOSTCC ,$(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) \
 	-Wpadded -O0 -g -I$(SRC) -I$(SRC)/include -o $@ $^ -lssl -lcrypto,$<)
 
 libstb/print-container: HOSTCFLAGS += -Wno-error=deprecated-declarations
 libstb/print-container: libstb/print-container.c libstb/container-utils.c
-	$(call Q, HOSTCC , $(HOSTCC) $(HOSTCFLAGS) \
+	$(call Q, HOSTCC , $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) \
 	-O0 -g -I$(SRC) -I$(SRC)/include -o $@ $^ -lssl -lcrypto, $<)
 
 clean: container-utils-clean
-- 
2.43.5



More information about the Skiboot mailing list