I had some time to read and try some stuff. So, GCC 9's -Werror=format-overflow warning is being treated as an error and aborting the build. From gcc's online documentation (available at https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html) :
"Warn about calls to formatted input/output functions such as snprintf and vsnprintf that might result in output truncation. When the exact number of bytes written by a format directive cannot be determined at compile-time it is estimated based on heuristics that depend on the level argument and on optimization. While enabling optimization will in most cases improve the accuracy of the warning, it may also result in false positives. Except as noted otherwise, the option uses the same logic -Wformat-overflow."
Therefore, by enabling lto by using -flto=2(cpu thread number), gcc9 analyzed the code better, didn't give the warning nor need the fix and produced a space net change savings of about 10MiB in comparison with the same version without lto, performance benefits are not known (it feels faster but it may be just placebo, I have to see how to quantify and display the performance gains) and a negligible amount less of time to build, but used more ram to build. Without lto it's a warning and the warning can be disabled with -Wno-format-overflow in the CPPFLAGS variable in: PKGBUILD
like this: export CPPFLAGS="$CPPFLAGS -O2 -Wno-format-overflow"
and in the mozconfig.in like this: ac_add_options --enable-optimize="-O2 -Wno-format-overflow"
The build progresses smoothly with gcc9 by just adding that and by commenting the gcc8 CC and CXX export lines at the beginning of mozconfig and removing gcc8 dependency from the PKGBUILD. Please, feel free to reproduce the fix provided and hopefully instate the needed changes so others can build with gcc9 smoothly as well. Enjoy. Edit1: fixed formatting Edit2: fixed space savings wording Edit3:fixes
Pinned Comments
WorMzy commented on 2021-03-02 16:19 (UTC) (edited on 2022-08-03 21:12 (UTC) by WorMzy)
The following key is used to sign release commits:
40481E7B8FCF9CEC
Import it into your keyring however you want.
https://wiki.archlinux.org/index.php/GnuPG#Import_a_public_key