[PATCH] ARM: i.MX25: image: consult pkg-config for openssl cflags

Ahmad Fatoum a.fatoum at pengutronix.de
Mon Aug 7 00:44:45 PDT 2023

For i.MX HABv3, we already ask pkg-config about the flags
to link the image generation utility against OpenSSL, but we assumed
that the headers would be found in the toolchain's default system header
search path. This may not always be the case, so explicitly ask
pkg-config about the CFLAGS as well.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
 scripts/imx/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/imx/Makefile b/scripts/imx/Makefile
index 9544974d523f..739641b47707 100644
--- a/scripts/imx/Makefile
+++ b/scripts/imx/Makefile
@@ -15,7 +15,7 @@ HOSTCFLAGS_imx-image.o = -I$(srctree) -I$(srctree)/include/mach
 HOSTCFLAGS_imx-usb-loader.o += -I$(srctree) -I$(srctree)/include/mach
 imx-usb-loader-target-userccflags += -I$(srctree) -I$(srctree)/include/mach
+HOSTCFLAGS_imx-image.o += -DIMXIMAGE_SSL_SUPPORT `$(PKG_CONFIG) --cflags openssl`
 HOSTLDLIBS_imx-image  = `$(PKG_CONFIG) --libs openssl`

More information about the barebox mailing list