# --- T2-COPYRIGHT-BEGIN --- # t2/package/*/nss/hotfix-ppc-no-vsx.patch # Copyright (C) 2026 The T2 SDE Project # SPDX-License-Identifier: GPL-2.0 or patched project license # --- T2-COPYRIGHT-END --- --- nss/lib/freebl/ppc-crypto.h.vanilla 2026-07-20 13:49:30.389666474 +0200 +++ nss/lib/freebl/ppc-crypto.h 2026-07-20 13:50:17.464587166 +0200 @@ -24,5 +24,7 @@ #endif +#else +#undef HAVE_PLATFORM_GCM #endif /* defined(__powerpc64__) && !defined(NSS_DISABLE_ALTIVEC) && defined(__ALTIVEC__) */ #endif --- nss/lib/freebl/gcm.c.vanilla 2026-07-20 13:47:58.456315815 +0200 +++ nss/lib/freebl/gcm.c 2026-07-20 13:51:39.140478178 +0200 @@ -22,8 +22,16 @@ #if defined(__ARM_NEON) || defined(__ARM_NEON__) #include +#elif defined(__PPC__) +#include "ppc-crypto.h" +#endif + +/* ghash-ppc.c only provides the hw ghash if USE_PPC_CRYPTO, so the stubs + * below are required on PPC targets without VSX crypto. */ +#if defined(__PPC__) && !defined(USE_PPC_CRYPTO) +#undef HAVE_PLATFORM_GHASH #endif /* Forward declarations for platform-specific implementation of GHASH. */ PRBool platform_ghash_support(); SECStatus gcm_HashInit_hw(gcmHashContext *ghash);