Also, the mach script assumes certain syntax is available in all Linux sh, which is not necessarily true. At least on my machine (Linux Mint 19.2 Cinnamon, built on Ubuntu 18.04) the sh binary doesn't recognize the double square brackets ([[ ]]), treating them as errors.
A simple shebang replacement from #!/bin/sh to #!/bin/bash fixes the issue. Since that may break portability I believe shipping different mach scripts (i.e. mach_macos - or mach_darwin - and mach_linux) would be straightforward and beneficial.
Same separation might be useful for .mozconfig too. Thankfully I had a template from previously building Pale Moon, otherwise it would've been difficult to modify it for Linux. Here's a possible sample that also provides hints as to how to select a compiler different than the system default, use the SSE2 instruction set in case the sources are capable of using AVX/AVX2, and limit the number of CPU threads for machines with limited RAM:

My machine is quite old for today's standards (CPU Intel Core i5 M460, 8GB DDR3), compilation takes 3 hours, and it's frustrating to wait a long time only to get some error in the end. Hopefully these suggestions would help others.



