0001-fix-old-abi-ppc.patch 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. From a7a862bab5e4aae4615ddae3cbe230345f92ed0d Mon Sep 17 00:00:00 2001
  2. From: Lauri Kasanen <cand@gmx.com>
  3. Date: Mon, 1 Jun 2020 12:11:45 +0300
  4. Subject: [PATCH v3] Bug 1642174 /usr/bin/ld: OBJS/Linux_SINGLE_SHLIB/sha512-p8.o:
  5. ABI version 2 is not compatible with ABI version 1 output
  6. Don't try to build the SHA-2 accelerated asm on old-ABI ppc.
  7. Currently make only, I don't have enough gyp-fu to do that side.
  8. However, the reporters of 1642174 and 1635625 both used make, not gyp.
  9. Signed-off-by: Lauri Kasanen <cand@gmx.com>
  10. [Fetch-from: https://bugzilla.mozilla.org/show_bug.cgi?id=1642174
  11. Manually modified paths to apply to nss subdirectory in release tarball.]
  12. Signed-off-by: Joseph Kogut <joseph.kogut@gmail.com>
  13. ---
  14. lib/freebl/Makefile | 5 ++++-
  15. 1 file changed, 4 insertions(+), 1 deletion(-)
  16. diff --git a/nss/lib/freebl/Makefile b/nss/lib/freebl/Makefile
  17. index 5f7384429..e0461c7d3 100644
  18. --- a/nss/lib/freebl/Makefile
  19. +++ b/nss/lib/freebl/Makefile
  20. @@ -267,9 +267,12 @@ ifeq ($(CPU_ARCH),arm)
  21. endif
  22. ifeq ($(CPU_ARCH),ppc)
  23. EXTRA_SRCS += gcm-ppc.c
  24. - ASFILES += sha512-p8.s
  25. ifdef USE_64
  26. DEFINES += -DNSS_NO_INIT_SUPPORT
  27. + PPC_ABI := $(shell $(CC) -dM -E - < /dev/null | awk '$$2 == "_CALL_ELF" {print $$3}')
  28. + ifeq ($(PPC_ABI),2)
  29. + ASFILES += sha512-p8.s
  30. + endif
  31. endif # USE_64
  32. endif # ppc
  33. endif # Linux
  34. --
  35. 2.19.1