0001-openssl-force-soft-link-to-avoid-rare-race.patch 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. From 3d9199423d48766649a2b2ebb3924e892ed16fa4 Mon Sep 17 00:00:00 2001
  2. From: Randy MacLeod <Randy.MacLeod@windriver.com>
  3. Date: Tue, 20 Jun 2017 15:32:08 -0400
  4. Subject: [PATCH] openssl: Force soft link to avoid rare race
  5. This patch works around a rare parallel build race condition.
  6. The error seen is:
  7. ln: failed to create symbolic link 'libssl.so': File exists
  8. make[4]: *** [Makefile.shared:171: link_a.gnu] Error 1
  9. make[4]: Leaving directory
  10. '/.../build/tmp-glibc/work/x86_64-linux/openssl-native/1.0.2k-r0/openssl-1.0.2k'
  11. The openssl team is rewriting their build files so it's not
  12. appropriate for openssl upstream and fixing the root cause of
  13. the Makefile race condition was also not pursued.
  14. Upstream-Status: Inappropriate [build rules rewrite in progress]
  15. Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
  16. ---
  17. Makefile.shared | 4 ++--
  18. 1 file changed, 2 insertions(+), 2 deletions(-)
  19. diff --git a/Makefile.shared b/Makefile.shared
  20. index e8d222a..1bff92f 100644
  21. --- a/Makefile.shared
  22. +++ b/Makefile.shared
  23. @@ -118,14 +118,14 @@
  24. if [ -n "$$SHLIB_COMPAT" ]; then \
  25. for x in $$SHLIB_COMPAT; do \
  26. ( $(SET_X); rm -f $$SHLIB$$x$$SHLIB_SUFFIX; \
  27. - ln -s $$prev $$SHLIB$$x$$SHLIB_SUFFIX ); \
  28. + ln -sf $$prev $$SHLIB$$x$$SHLIB_SUFFIX ); \
  29. prev=$$SHLIB$$x$$SHLIB_SUFFIX; \
  30. done; \
  31. fi; \
  32. if [ -n "$$SHLIB_SOVER" ]; then \
  33. [ -e "$$SHLIB$$SHLIB_SUFFIX" ] || \
  34. ( $(SET_X); rm -f $$SHLIB$$SHLIB_SUFFIX; \
  35. - ln -s $$prev $$SHLIB$$SHLIB_SUFFIX ); \
  36. + ln -sf $$prev $$SHLIB$$SHLIB_SUFFIX ); \
  37. fi; \
  38. fi
  39. --
  40. 2.9.3