0002-build-tools-avoid-unnecessary-link.patch 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. From aa57ce632c629fe72ff417e261e0f5bfd8db6bab Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Vincent=20Stehl=C3=A9?= <vincent.stehle@arm.com>
  3. Date: Tue, 4 Jul 2023 16:14:02 +0200
  4. Subject: [PATCH] build(tools): avoid unnecessary link
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. In their respective makefiles, cert_create, encrypt_fw and fiptool
  9. depend on the --openssl phony target as a prerequisite. This forces
  10. those tools to be re-linked each time.
  11. Move the dependencies on the --openssl target from the tools to their
  12. makefiles all targets, to avoid unnecessary linking while preserving the
  13. OpenSSL version printing done in the --openssl targets when in debug.
  14. Fixes: cf2dd17ddda2 ("refactor(security): add OpenSSL 1.x compatibility")
  15. Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
  16. Change-Id: I98a3ab30f36dffc253cecaaf3a57d2712522135d
  17. Upstream: https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/commit/?id=aa57ce632c629fe72ff417e261e0f5bfd8db6bab
  18. ---
  19. tools/cert_create/Makefile | 4 ++--
  20. tools/encrypt_fw/Makefile | 4 ++--
  21. tools/fiptool/Makefile | 4 ++--
  22. 3 files changed, 6 insertions(+), 6 deletions(-)
  23. diff --git a/tools/cert_create/Makefile b/tools/cert_create/Makefile
  24. index 042e844626..b911d19d2b 100644
  25. --- a/tools/cert_create/Makefile
  26. +++ b/tools/cert_create/Makefile
  27. @@ -85,9 +85,9 @@ HOSTCC ?= gcc
  28. .PHONY: all clean realclean --openssl
  29. -all: ${BINARY}
  30. +all: --openssl ${BINARY}
  31. -${BINARY}: --openssl ${OBJECTS} Makefile
  32. +${BINARY}: ${OBJECTS} Makefile
  33. @echo " HOSTLD $@"
  34. @echo 'const char build_msg[] = "Built : "__TIME__", "__DATE__; \
  35. const char platform_msg[] = "${PLAT_MSG}";' | \
  36. diff --git a/tools/encrypt_fw/Makefile b/tools/encrypt_fw/Makefile
  37. index 2939b142be..924e5febab 100644
  38. --- a/tools/encrypt_fw/Makefile
  39. +++ b/tools/encrypt_fw/Makefile
  40. @@ -65,9 +65,9 @@ HOSTCC ?= gcc
  41. .PHONY: all clean realclean --openssl
  42. -all: ${BINARY}
  43. +all: --openssl ${BINARY}
  44. -${BINARY}: --openssl ${OBJECTS} Makefile
  45. +${BINARY}: ${OBJECTS} Makefile
  46. @echo " HOSTLD $@"
  47. @echo 'const char build_msg[] = "Built : "__TIME__", "__DATE__;' | \
  48. ${HOSTCC} -c ${HOSTCCFLAGS} -xc - -o src/build_msg.o
  49. diff --git a/tools/fiptool/Makefile b/tools/fiptool/Makefile
  50. index 2ebee33931..4bdebd9235 100644
  51. --- a/tools/fiptool/Makefile
  52. +++ b/tools/fiptool/Makefile
  53. @@ -68,9 +68,9 @@ DEPS := $(patsubst %.o,%.d,$(OBJECTS))
  54. .PHONY: all clean distclean --openssl
  55. -all: ${PROJECT}
  56. +all: --openssl ${PROJECT}
  57. -${PROJECT}: --openssl ${OBJECTS} Makefile
  58. +${PROJECT}: ${OBJECTS} Makefile
  59. @echo " HOSTLD $@"
  60. ${Q}${HOSTCC} ${OBJECTS} -o $@ ${LDLIBS}
  61. @${ECHO_BLANK_LINE}
  62. --
  63. 2.25.1