External Publication
Visit Post

Browser Development • [PPPC64] Steps to successfully build Pale Moon 34.3.0.1 on Linux/PPC (BigEndian)

Pale Moon forum - Forum index [Unofficial] June 25, 2026
Source

Hi.

The problem: Cloning the git repository and building Pale Moon on older PPC970, Power5, Power6 and most probably Power7 hardware results in a binary that contains vector instructions for power cpus like Power8 and newer. This binary is (of course) not executable on the older hardware.

In this post I will describe what needs to be done to get a working build.

The problem is located in the platform module.

The solution is to patch the following 3 files:

CODE:

 platform/security/nss/lib/freebl/freebl.gyp platform/security/nss/lib/freebl/gcm-ppc.c platform/security/nss/lib/freebl/ppc-crypto.h

The developers of the freebl code have some code to select the right CPU platform and version but it does not work as we need it. However by inserting/changing some really small patterns it works.

The following is a "git diff" output:

CODE:

diff --git a/security/nss/lib/freebl/freebl.gyp b/security/nss/lib/freebl/freebl.gypindex 23940ef774..f9f5c6e575 100644--- a/security/nss/lib/freebl/freebl.gyp+++ b/security/nss/lib/freebl/freebl.gyp@@ -291,7 +291,6 @@ 'type': 'static_library', 'sources': [ 'gcm-ppc.c',- 'sha512-p8.s', ], 'dependencies': [ '<(DEPTH)/exports.gyp:nss_exports'@@ -415,16 +414,13 @@ 'conditions': [ [ 'disable_crypto_vsx==0', { 'cflags': [- '-mcrypto', '-maltivec',- '-mvsx', '-funroll-loops', '-fpeel-loops' ], 'cflags_mozilla': [ '-mcrypto', '-maltivec',- '-mvsx', '-funroll-loops', '-fpeel-loops' ],diff --git a/security/nss/lib/freebl/gcm-ppc.c b/security/nss/lib/freebl/gcm-ppc.cindex 9bd4f29569..327dec740c 100644--- a/security/nss/lib/freebl/gcm-ppc.c+++ b/security/nss/lib/freebl/gcm-ppc.c@@ -8,6 +8,10 @@ #include "gcm.h" #include "secerr.h" +#if defined(USE_PPC_CRYPTO)+#undef USE_PPC_CRYPTO+#endif+ #if defined(USE_PPC_CRYPTO) SECStatusdiff --git a/security/nss/lib/freebl/ppc-crypto.h b/security/nss/lib/freebl/ppc-crypto.hindex 4d283895f2..c3b45c3329 100644--- a/security/nss/lib/freebl/ppc-crypto.h+++ b/security/nss/lib/freebl/ppc-crypto.h@@ -23,7 +23,7 @@ */ #if (defined(__clang__) || (defined(__GNUC__) && __GNUC__ >= 8)) && \ defined(IS_LITTLE_ENDIAN) && defined(__VSX__)-#define USE_PPC_CRYPTO+// #define USE_PPC_CRYPTO #endif #endif /* defined(__powerpc64__) && !defined(NSS_DISABLE_ALTIVEC) && defined(__ALTIVEC__) */

Here are some infos on the build environment :

hardware: PowerMac G5 with Debian Sid gcc version: 15.2.0-12 optimization level: -O1

Quality of the build : acceptable for every day use; will crash after some hours of use (but this is another problem...)

I hope this may be usefull.

Best regards.


Discussion in the ATmosphere

Loading comments...