summaryrefslogtreecommitdiff
blob: be2d4802c4c246d93b047a485161e0e49652ca71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
https://bugzilla.mozilla.org/show_bug.cgi?id=1642174

From 9e4f30b3168a95243df0c0891e3e432bc95382ad Mon Sep 17 00:00:00 2001
From: Lauri Kasanen <cand@gmx.com>
Date: Mon, 1 Jun 2020 12:11:45 +0300
Subject: [PATCH v2] Bug 1642174 /usr/bin/ld: OBJS/Linux_SINGLE_SHLIB/sha512-p8.o:
 ABI version 2 is not compatible with ABI version 1 output

Don't try to build the SHA-2 accelerated asm on old-ABI ppc.

Currently make only, I don't have enough gyp-fu to do that side.
However, the reporters of 1642174 and 1635625 both used make, not gyp.

Signed-off-by: Lauri Kasanen <cand@gmx.com>
---
 lib/freebl/Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/freebl/Makefile b/lib/freebl/Makefile
index 5f7384429..d01587c7a 100644
--- a/lib/freebl/Makefile
+++ b/lib/freebl/Makefile
@@ -267,9 +267,12 @@ ifeq ($(CPU_ARCH),arm)
 endif
 ifeq ($(CPU_ARCH),ppc)
     EXTRA_SRCS += gcm-ppc.c
-    ASFILES += sha512-p8.s
+    PPC_ABI := $(shell $(CC) -dM -E - < /dev/null | grep _CALL_ELF | awk '{ print $3 }')
 ifdef USE_64
     DEFINES += -DNSS_NO_INIT_SUPPORT
+    ifeq ($(PPC_ABI),2)
+        ASFILES += sha512-p8.s
+    endif
 endif # USE_64
 endif # ppc
 endif # Linux
-- 
2.19.1