Accepting request 837280 from home:Guillaume_G:branches:mozilla:Factory
- Add patch to fix build on aarch64 - boo#1176934: * nss-freebl-fix-aarch64.patch OBS-URL: https://build.opensuse.org/request/show/837280 OBS-URL: https://build.opensuse.org/package/show/mozilla:Factory/mozilla-nss?expand=0&rev=335
This commit is contained in:
parent
50269fd3cd
commit
e43a7b9e4b
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 25 06:55:40 UTC 2020 - Guillaume GARDET <guillaume.gardet@opensuse.org>
|
||||
|
||||
- Add patch to fix build on aarch64 - boo#1176934:
|
||||
* nss-freebl-fix-aarch64.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 17 13:57:18 UTC 2020 - Hans Petter Jansson <hpj@suse.com>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package mozilla-nss
|
||||
#
|
||||
# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2020 SUSE LLC
|
||||
# Copyright (c) 2006-2020 Wolfgang Rosenauer
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
@ -69,6 +69,7 @@ Patch31: nss-fips-use-strong-random-pool.patch
|
||||
Patch32: nss-fips-detect-fips-mode-fixes.patch
|
||||
Patch34: nss-fips-combined-hash-sign-dsa-ecdsa.patch
|
||||
Patch36: nss-fips-aes-keywrap-post.patch
|
||||
Patch37: nss-freebl-fix-aarch64.patch
|
||||
%if 0%{?sle_version} >= 120000 && 0%{?sle_version} < 150000
|
||||
# aarch64 + gcc4.8 fails to build on SLE-12 due to undefined references
|
||||
BuildRequires: gcc9-c++
|
||||
@ -227,6 +228,9 @@ cd nss
|
||||
%patch34 -p1
|
||||
%patch36 -p1
|
||||
|
||||
# Freebl
|
||||
%patch37 -p1
|
||||
|
||||
# additional CA certificates
|
||||
#cd security/nss/lib/ckfw/builtins
|
||||
#cat %{SOURCE2} >> certdata.txt
|
||||
|
86
nss-freebl-fix-aarch64.patch
Normal file
86
nss-freebl-fix-aarch64.patch
Normal file
@ -0,0 +1,86 @@
|
||||
|
||||
diff --git a/lib/freebl/Makefile b/lib/freebl/Makefile
|
||||
--- a/lib/freebl/Makefile
|
||||
+++ b/lib/freebl/Makefile
|
||||
@@ -114,31 +114,47 @@ ifeq (,$(filter-out i386 x386 x86 x86_64
|
||||
$(OBJDIR)/gcm-x86.o: CFLAGS += -mpclmul -maes
|
||||
$(OBJDIR)/aes-x86.o: CFLAGS += -mpclmul -maes
|
||||
ifneq (,$(USE_64)$(USE_X32))
|
||||
DEFINES += -DNSS_X64
|
||||
else
|
||||
DEFINES += -DNSS_X86
|
||||
endif
|
||||
endif
|
||||
-ifdef NS_USE_GCC
|
||||
ifeq ($(CPU_ARCH),aarch64)
|
||||
- DEFINES += -DUSE_HW_AES -DUSE_HW_SHA1 -DUSE_HW_SHA2
|
||||
- EXTRA_SRCS += aes-armv8.c gcm-aarch64.c sha1-armv8.c sha256-armv8.c
|
||||
-endif
|
||||
+ ifdef CC_IS_CLANG
|
||||
+ DEFINES += -DUSE_HW_AES -DUSE_HW_SHA1 -DUSE_HW_SHA2
|
||||
+ EXTRA_SRCS += aes-armv8.c gcm-aarch64.c sha1-armv8.c sha256-armv8.c
|
||||
+ else ifeq (1,$(CC_IS_GCC))
|
||||
+ # GCC versions older than 4.9 don't support ARM AES. The check
|
||||
+ # is done in two parts, first allows "major.minor" == "4.9",
|
||||
+ # and then rejects any major versions prior to 5. Note that
|
||||
+ # there has been no GCC 4.10, as it was renamed to GCC 5.
|
||||
+ ifneq (,$(filter 4.9,$(word 1,$(GCC_VERSION)).$(word 2,$(GCC_VERSION))))
|
||||
+ DEFINES += -DUSE_HW_AES -DUSE_HW_SHA1 -DUSE_HW_SHA2
|
||||
+ EXTRA_SRCS += aes-armv8.c gcm-aarch64.c sha1-armv8.c sha256-armv8.c
|
||||
+ endif
|
||||
+ ifeq (,$(filter 0 1 2 3 4,$(word 1,$(GCC_VERSION))))
|
||||
+ DEFINES += -DUSE_HW_AES -DUSE_HW_SHA1 -DUSE_HW_SHA2
|
||||
+ EXTRA_SRCS += aes-armv8.c gcm-aarch64.c sha1-armv8.c sha256-armv8.c
|
||||
+ endif
|
||||
+ endif
|
||||
endif
|
||||
ifeq ($(CPU_ARCH),arm)
|
||||
ifndef NSS_DISABLE_ARM32_NEON
|
||||
EXTRA_SRCS += gcm-arm32-neon.c
|
||||
endif
|
||||
ifdef CC_IS_CLANG
|
||||
DEFINES += -DUSE_HW_AES -DUSE_HW_SHA1 -DUSE_HW_SHA2
|
||||
EXTRA_SRCS += aes-armv8.c sha1-armv8.c sha256-armv8.c
|
||||
else ifeq (1,$(CC_IS_GCC))
|
||||
- # Old compiler doesn't support ARM AES.
|
||||
+ # GCC versions older than 4.9 don't support ARM AES. The check
|
||||
+ # is done in two parts, first allows "major.minor" == "4.9",
|
||||
+ # and then rejects any major versions prior to 5. Note that
|
||||
+ # there has been no GCC 4.10, as it was renamed to GCC 5.
|
||||
ifneq (,$(filter 4.9,$(word 1,$(GCC_VERSION)).$(word 2,$(GCC_VERSION))))
|
||||
DEFINES += -DUSE_HW_AES -DUSE_HW_SHA1 -DUSE_HW_SHA2
|
||||
EXTRA_SRCS += aes-armv8.c sha1-armv8.c sha256-armv8.c
|
||||
endif
|
||||
ifeq (,$(filter 0 1 2 3 4,$(word 1,$(GCC_VERSION))))
|
||||
DEFINES += -DUSE_HW_AES -DUSE_HW_SHA1 -DUSE_HW_SHA2
|
||||
EXTRA_SRCS += aes-armv8.c sha1-armv8.c sha256-armv8.c
|
||||
endif
|
||||
@@ -723,24 +739,22 @@ USES_SOFTFLOAT_ABI := $(shell $(CC) -o -
|
||||
$(OBJDIR)/$(PROG_PREFIX)aes-armv8$(OBJ_SUFFIX): CFLAGS += -march=armv8-a -mfpu=crypto-neon-fp-armv8$(if $(USES_SOFTFLOAT_ABI), -mfloat-abi=softfp)
|
||||
$(OBJDIR)/$(PROG_PREFIX)sha1-armv8$(OBJ_SUFFIX): CFLAGS += -march=armv8-a -mfpu=crypto-neon-fp-armv8$(if $(USES_SOFTFLOAT_ABI), -mfloat-abi=softfp)
|
||||
$(OBJDIR)/$(PROG_PREFIX)sha256-armv8$(OBJ_SUFFIX): CFLAGS += -march=armv8-a -mfpu=crypto-neon-fp-armv8$(if $(USES_SOFTFLOAT_ABI), -mfloat-abi=softfp)
|
||||
ifndef NSS_DISABLE_ARM32_NEON
|
||||
$(OBJDIR)/$(PROG_PREFIX)gcm-arm32-neon$(OBJ_SUFFIX): CFLAGS += -mfpu=neon$(if $(USES_SOFTFLOAT_ABI), -mfloat-abi=softfp)
|
||||
endif
|
||||
endif
|
||||
|
||||
-ifdef NS_USE_GCC
|
||||
ifeq ($(CPU_ARCH),aarch64)
|
||||
$(OBJDIR)/$(PROG_PREFIX)aes-armv8$(OBJ_SUFFIX): CFLAGS += -march=armv8-a+crypto
|
||||
$(OBJDIR)/$(PROG_PREFIX)gcm-aarch64$(OBJ_SUFFIX): CFLAGS += -march=armv8-a+crypto
|
||||
$(OBJDIR)/$(PROG_PREFIX)sha1-armv8$(OBJ_SUFFIX): CFLAGS += -march=armv8-a+crypto
|
||||
$(OBJDIR)/$(PROG_PREFIX)sha256-armv8$(OBJ_SUFFIX): CFLAGS += -march=armv8-a+crypto
|
||||
endif
|
||||
-endif
|
||||
|
||||
ifeq ($(CPU_ARCH),ppc)
|
||||
ifndef NSS_DISABLE_ALTIVEC
|
||||
$(OBJDIR)/$(PROG_PREFIX)gcm-ppc$(OBJ_SUFFIX): CFLAGS += -mcrypto -maltivec -mvsx
|
||||
$(OBJDIR)/$(PROG_PREFIX)gcm$(OBJ_SUFFIX): CFLAGS += -mcrypto -maltivec -mvsx
|
||||
$(OBJDIR)/$(PROG_PREFIX)rijndael$(OBJ_SUFFIX): CFLAGS += -mcrypto -maltivec -mvsx
|
||||
$(OBJDIR)/$(PROG_PREFIX)sha512$(OBJ_SUFFIX): CFLAGS += -mcrypto -maltivec -mvsx \
|
||||
-funroll-loops -fpeel-loops
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user