Skip to contentSkip to conversation

tools: refactor HOSTLOADLIBES_* options

PATCH RESEND New Masahiro Yamada 2 participants 2 messages Jun 5, 2014

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 tools: refactor HOSTLOADLIBES_* options

The tools mkimage, dumpimage, fit_info, fit_check_sign always have the common libraries to be linked, so HOSTLOADLIBES_* can be consolidated a little bit.

---
- Resend as a single patch with Simon's Acked tag.

 tools/Makefile | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)
tools/Makefile +9 -10
index 7610557..a8c52b1 100644
@@ -104,28 +104,27 @@ fit_check_sign$(SFX)-objs   := $(dumpimage-mkimage-objs) fit_check_sign.o
 
 # TODO(sjg at chromium.org): Is this correct on Mac OS?
 
-# MXSImage needs LibSSL
 ifneq ($(CONFIG_MX23)$(CONFIG_MX28),)
-HOSTLOADLIBES_dumpimage$(SFX) := -lssl -lcrypto
-HOSTLOADLIBES_mkimage$(SFX) := -lssl -lcrypto
-HOSTLOADLIBES_fit_info$(SFX) := -lssl -lcrypto
-HOSTLOADLIBES_fit_check_sign$(SFX) := -lssl -lcrypto
 # Add CONFIG_MXS into host CFLAGS, so we can check whether or not register
 # the mxsimage support within tools/mxsimage.c .
 HOSTCFLAGS_mxsimage.o += -DCONFIG_MXS
 endif
 
 ifdef CONFIG_FIT_SIGNATURE
-HOSTLOADLIBES_dumpimage$(SFX) := -lssl -lcrypto
-HOSTLOADLIBES_mkimage$(SFX) := -lssl -lcrypto
-HOSTLOADLIBES_fit_info$(SFX) := -lssl -lcrypto
-HOSTLOADLIBES_fit_check_sign$(SFX) := -lssl -lcrypto
-
 # This affects include/image.h, but including the board config file
 # is tricky, so manually define this options here.
 HOST_EXTRACFLAGS	+= -DCONFIG_FIT_SIGNATURE
 endif
 
+# MXSImage needs LibSSL
+ifneq ($(CONFIG_MX23)$(CONFIG_MX28)$(CONFIG_FIT_SIGNATURE),)
+HOSTLOADLIBES_mkimage$(SFX) += -lssl -lcrypto
+endif
+
+HOSTLOADLIBES_dumpimage$(SFX) := $(HOSTLOADLIBES_mkimage$(SFX))
+HOSTLOADLIBES_fit_info$(SFX) := $(HOSTLOADLIBES_mkimage$(SFX))
+HOSTLOADLIBES_fit_check_sign$(SFX) := $(HOSTLOADLIBES_mkimage$(SFX))
+
 hostprogs-$(CONFIG_EXYNOS5250) += mkexynosspl$(SFX)
 hostprogs-$(CONFIG_EXYNOS5420) += mkexynosspl$(SFX)
 HOSTCFLAGS_mkexynosspl$(SFX).o := -pedantic
Signature · 1 line
1.9.1
#1 lore raw

PATCH RESEND 1/1 tools: refactor HOSTLOADLIBES_* options

Quoted 6 lines · Masahiro Yamada

The tools mkimage, dumpimage, fit_info, fit_check_sign always have the common libraries to be linked, so HOSTLOADLIBES_* can be consolidated a little bit.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140605/c562a4b0/attachment.pgp>