From e7b05bfed424cb8808bc9995e8c861a0cadf291e Mon Sep 17 00:00:00 2001 From: Peter Michael Green Date: Thu, 29 Oct 2020 23:01:02 +0000 Subject: [PATCH] Commit Debian 3.0 (quilt) metadata [dgit (8.5) quilt-fixup] --- debian/patches/patch-out-neon-in-freebl.patch | 281 ++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 282 insertions(+) create mode 100644 debian/patches/patch-out-neon-in-freebl.patch diff --git a/debian/patches/patch-out-neon-in-freebl.patch b/debian/patches/patch-out-neon-in-freebl.patch new file mode 100644 index 0000000000..94667aaa1c --- /dev/null +++ b/debian/patches/patch-out-neon-in-freebl.patch @@ -0,0 +1,281 @@ +From: Peter Michael Green +Date: Thu, 29 Oct 2020 03:19:17 +0000 +X-Dgit-Generated: 1:78.4.0-1~deb10u1+rpi1 1d0bbfdae9ecd6b3ad6b08bddb57439bb12dac5e +Subject: Patch out neon in freebl + + +--- + +--- thunderbird-78.4.0.orig/security/nss/lib/freebl/Makefile ++++ thunderbird-78.4.0/security/nss/lib/freebl/Makefile +@@ -124,9 +124,9 @@ ifeq ($(CPU_ARCH),aarch64) + EXTRA_SRCS += aes-armv8.c gcm-aarch64.c + endif + ifeq ($(CPU_ARCH),arm) +-ifndef NSS_DISABLE_ARM32_NEON +- EXTRA_SRCS += gcm-arm32-neon.c +-endif ++#ifndef NSS_DISABLE_ARM32_NEON ++# EXTRA_SRCS += gcm-arm32-neon.c ++#endif + ifdef CC_IS_CLANG + DEFINES += -DUSE_HW_AES + EXTRA_SRCS += aes-armv8.c +--- thunderbird-78.4.0.orig/security/nss/lib/freebl/freebl.gyp ++++ thunderbird-78.4.0/security/nss/lib/freebl/freebl.gyp +@@ -103,13 +103,13 @@ + ], + }, + }], +- [ 'target_arch=="arm"', { +- # Gecko doesn't support non-NEON platform on Android, but tier-3 +- # platform such as Linux/arm will need it +- 'cflags_mozilla': [ +- '-mfpu=neon' +- ], +- }], ++ #[ 'target_arch=="arm"', { ++ # # Gecko doesn't support non-NEON platform on Android, but tier-3 ++ # # platform such as Linux/arm will need it ++ # 'cflags_mozilla': [ ++ # '-mfpu=neon' ++ # ], ++ #}], + [ 'target_arch=="x64"', { + 'sources': [ + 'verified/Hacl_Poly1305_128.c', +@@ -172,13 +172,13 @@ + ], + }, + }], +- [ 'target_arch=="arm"', { +- # Gecko doesn't support non-NEON platform on Android, but tier-3 +- # platform such as Linux/arm will need it +- 'cflags_mozilla': [ +- '-mfpu=neon' +- ], +- }], ++ #[ 'target_arch=="arm"', { ++ # # Gecko doesn't support non-NEON platform on Android, but tier-3 ++ # # platform such as Linux/arm will need it ++ # 'cflags_mozilla': [ ++ # '-mfpu=neon' ++ # ], ++ #}], + [ 'target_arch=="x64"', { + 'sources': [ + 'verified/Hacl_Poly1305_256.c', +@@ -219,25 +219,25 @@ + }] + ] + }, +- { +- 'target_name': 'gcm-aes-arm32-neon_c_lib', +- 'type': 'static_library', +- 'sources': [ +- 'gcm-arm32-neon.c' +- ], +- 'dependencies': [ +- '<(DEPTH)/exports.gyp:nss_exports' +- ], +- 'cflags': [ +- '-march=armv7', +- '-mfpu=neon', +- '<@(softfp_cflags)', +- ], +- 'cflags_mozilla': [ +- '-mfpu=neon', +- '<@(softfp_cflags)', +- ] +- }, ++ #{ ++ # 'target_name': 'gcm-aes-arm32-neon_c_lib', ++ # 'type': 'static_library', ++ # 'sources': [ ++ # 'gcm-arm32-neon.c' ++ # ], ++ # 'dependencies': [ ++ # '<(DEPTH)/exports.gyp:nss_exports' ++ # ], ++ # 'cflags': [ ++ # '-march=armv7', ++ # '-mfpu=neon', ++ # '<@(softfp_cflags)', ++ # ], ++ # 'cflags_mozilla': [ ++ # '-mfpu=neon', ++ # '<@(softfp_cflags)', ++ # ] ++ #}, + { + 'target_name': 'gcm-aes-aarch64_c_lib', + 'type': 'static_library', +@@ -324,37 +324,37 @@ + 'FREEBL_NO_DEPEND', + ], + }, +- { +- 'target_name': 'armv8_c_lib', +- 'type': 'static_library', +- 'sources': [ +- 'aes-armv8.c', +- ], +- 'dependencies': [ +- '<(DEPTH)/exports.gyp:nss_exports' +- ], +- 'conditions': [ +- [ 'target_arch=="arm"', { +- 'cflags': [ +- '-march=armv8-a', +- '-mfpu=crypto-neon-fp-armv8', +- '<@(softfp_cflags)', +- ], +- 'cflags_mozilla': [ +- '-march=armv8-a', +- '-mfpu=crypto-neon-fp-armv8', +- '<@(softfp_cflags)', +- ], +- }, 'target_arch=="arm64" or target_arch=="aarch64"', { +- 'cflags': [ +- '-march=armv8-a+crypto' +- ], +- 'cflags_mozilla': [ +- '-march=armv8-a+crypto' +- ], +- }] +- ] +- }, ++ #{ ++ # 'target_name': 'armv8_c_lib', ++ # 'type': 'static_library', ++ # 'sources': [ ++ # 'aes-armv8.c', ++ # ], ++ # 'dependencies': [ ++ # '<(DEPTH)/exports.gyp:nss_exports' ++ # ], ++ # 'conditions': [ ++ # [ 'target_arch=="arm"', { ++ # 'cflags': [ ++ # '-march=armv8-a', ++ # '-mfpu=crypto-neon-fp-armv8', ++ # '<@(softfp_cflags)', ++ # ], ++ # 'cflags_mozilla': [ ++ # '-march=armv8-a', ++ # '-mfpu=crypto-neon-fp-armv8', ++ # '<@(softfp_cflags)', ++ # ], ++ # }, 'target_arch=="arm64" or target_arch=="aarch64"', { ++ # 'cflags': [ ++ # '-march=armv8-a+crypto' ++ # ], ++ # 'cflags_mozilla': [ ++ # '-march=armv8-a+crypto' ++ # ], ++ # }] ++ # ] ++ #}, + { + 'target_name': 'freebl', + 'type': 'static_library', +@@ -380,21 +380,21 @@ + 'hw-acc-crypto-avx2', + ], + 'conditions': [ +- [ 'target_arch=="ia32" or target_arch=="x64"', { +- 'dependencies': [ +- 'gcm-aes-x86_c_lib', +- ], +- }, 'disable_arm_hw_aes==0 and (target_arch=="arm" or target_arch=="arm64" or target_arch=="aarch64")', { +- 'dependencies': [ +- 'armv8_c_lib' +- ], +- }], +- [ 'disable_arm32_neon==0 and target_arch=="arm"', { +- 'dependencies': [ +- 'gcm-aes-arm32-neon_c_lib', +- ], +- }], +- [ 'disable_arm32_neon==1 and target_arch=="arm"', { ++ #[ 'target_arch=="ia32" or target_arch=="x64"', { ++ # 'dependencies': [ ++ # 'gcm-aes-x86_c_lib', ++ # ], ++ #}, 'disable_arm_hw_aes==0 and (target_arch=="arm" or target_arch=="arm64" or target_arch=="aarch64")', { ++ # 'dependencies': [ ++ # 'armv8_c_lib' ++ # ], ++ #}], ++ #[ 'disable_arm32_neon==0 and target_arch=="arm"', { ++ # 'dependencies': [ ++ # 'gcm-aes-arm32-neon_c_lib', ++ # ], ++ #}], ++ [ 'target_arch=="arm"', { + 'defines!': [ + 'NSS_DISABLE_ARM32_NEON', + ], +@@ -448,21 +448,21 @@ + 'hw-acc-crypto-avx2', + ], + 'conditions': [ +- [ 'target_arch=="ia32" or target_arch=="x64"', { +- 'dependencies': [ +- 'gcm-aes-x86_c_lib', +- ] +- }, 'target_arch=="arm" or target_arch=="arm64" or target_arch=="aarch64"', { +- 'dependencies': [ +- 'armv8_c_lib', +- ], +- }], +- [ 'disable_arm32_neon==0 and target_arch=="arm"', { +- 'dependencies': [ +- 'gcm-aes-arm32-neon_c_lib', +- ], +- }], +- [ 'disable_arm32_neon==1 and target_arch=="arm"', { ++ #[ 'target_arch=="ia32" or target_arch=="x64"', { ++ # 'dependencies': [ ++ # 'gcm-aes-x86_c_lib', ++ # ] ++ #}, 'target_arch=="arm" or target_arch=="arm64" or target_arch=="aarch64"', { ++ # 'dependencies': [ ++ # 'armv8_c_lib', ++ # ], ++ #}], ++ #[ 'disable_arm32_neon==0 and target_arch=="arm"', { ++ # 'dependencies': [ ++ # 'gcm-aes-arm32-neon_c_lib', ++ # ], ++ #}], ++ [ 'target_arch=="arm"', { + 'defines!': [ + 'NSS_DISABLE_ARM32_NEON', + ], +--- thunderbird-78.4.0.orig/security/nss/lib/freebl/gcm.c ++++ thunderbird-78.4.0/security/nss/lib/freebl/gcm.c +@@ -25,7 +25,7 @@ + #elif defined(__arm__) && defined(IS_LITTLE_ENDIAN) && \ + !defined(NSS_DISABLE_ARM32_NEON) + /* We don't test on big endian platform, so disable this on big endian. */ +-#define USE_ARM_GCM ++//#define USE_ARM_GCM + #endif + + /* Forward declarations */ +--- thunderbird-78.4.0.orig/security/nss/lib/freebl/rijndael.c ++++ thunderbird-78.4.0/security/nss/lib/freebl/rijndael.c +@@ -20,10 +20,10 @@ + #include "gcm.h" + #include "mpi.h" + +-#if !defined(IS_LITTLE_ENDIAN) && !defined(NSS_X86_OR_X64) ++//#if !defined(IS_LITTLE_ENDIAN) && !defined(NSS_X86_OR_X64) + // not test yet on big endian platform of arm + #undef USE_HW_AES +-#endif ++//#endif + + #ifdef USE_HW_AES + #ifdef NSS_X86_OR_X64 diff --git a/debian/patches/series b/debian/patches/series index 2197fb1b66..97d91cbc9d 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -42,3 +42,4 @@ raspbian-rust-triplet-hack.patch try-to-disable-neon.patch try-harder-to-disable-neon.patch disable-neon-in-qcms.patch +patch-out-neon-in-freebl.patch -- 2.30.2