security/nss: fix build on powerpc64le

LLVM's integrated assembler can't build ppc-gcm.s:
ppc-gcm.s:642:24: error: invalid memory operand
    std          31,-8(SP);

Use as from binutils on powerpc64le.

While here correct the architecture check to also check for Linux's ppc64 - similar to the OS check in the same patch.
This commit is contained in:
Piotr Kubaj 2021-05-15 02:45:46 +00:00
parent 8d94d913b7
commit 192a67a0d7
2 changed files with 5 additions and 2 deletions

View file

@ -11,6 +11,8 @@ COMMENT= Libraries to support development of security-enabled applications
LICENSE= MPL20
LICENSE_FILE= ${WRKSRC}/COPYING
BUILD_DEPENDS= ${BUILD_DEPENDS_${ARCH}}
BUILD_DEPENDS_powerpc64le= as:devel/binutils
LIB_DEPENDS= libnspr4.so:devel/nspr \
libsqlite3.so:databases/sqlite3
TEST_DEPENDS= bash:shells/bash

View file

@ -9,16 +9,17 @@
ifeq ($(CPU_ARCH),x86_64)
# Lower case s on mpi_amd64_common due to make implicit rules.
ASFILES = arcfour-amd64-gas.s mpi_amd64_common.s
@@ -298,11 +298,11 @@ ifdef USE_64
@@ -298,11 +298,12 @@ ifdef USE_64
PPC_ABI := $(shell $(CC) -dM -E - < /dev/null | awk '$$2 == "_CALL_ELF" {print $$3}')
ifeq ($(PPC_ABI),2)
ASFILES += sha512-p8.s
- ifeq ($(OS_TEST),ppc64le)
+ ifeq ($(OS_TEST),powerpc64le)
+ ifeq (,$(filter-out powerpc64le ppc64le, $(OS_TEST)))
DEFINES += -DPPC_GCM
EXTRA_SRCS += chacha20poly1305-ppc.c ppc-gcm-wrap.c
ASFILES += chacha20-ppc64le.s ppc-gcm.s
- endif # ppc64le
+ ASFLAGS += -fno-integrated-as
+ endif # powerpc64le
endif
endif # USE_64