wyatt8740

PowerPC Seamonkey 2.49.x mozconfig

Apr 25th, 2021
350
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.21 KB | None | 0 0
  1. # If cross compiling, build Seamonkey from inside a chroot, since a lot of the
  2. # '-dev' libs don't work otherwise in multiarch (due to conflicts with native
  3. # architecture '-dev' packages).
  4.  
  5. # built in mid-to-late 2018 in Debian Sid.
  6.  
  7. # if building _on a PPC host_, you might have to change a few of the lines
  8. # below. I'll try to mark them. There might also be some other lines I
  9. # hardcoded that need changing on your particular setup, such as the
  10. # 'MOZ_OBJDIR' definition. There used to be a bug (which may or may not exist
  11. # anymore) that needed to be worked around by hardcoding the MOZ_OBJDIR path.
  12.  
  13. # You may also be able to speed up the build on multi-core/multi-CPU systems by
  14. # changing 'MOZ_MAKE_FLAGS="-j3"' to something else (your core count); if
  15. # running on a single-core machine, you should probably either remove the line
  16. # entirely, or else set it as 'MOZ_MAKE_FLAGS="-j1"' instead (so that it only
  17. # tries to run a single build job at a time instead of running three).
  18.  
  19. # This config stemmed from the Seamonkey and Firefox builds I was already doing
  20. # on my Intel machines, and I simply modified it for PPC builds. Also, if you
  21. # are having trouble feel free to contact me and ask for help, but my reply
  22. # times may vary wildly since I'm a student who doesn't have a very predictable
  23. # workload.
  24.  
  25.  
  26. ######################## CROSS-COMPILATION BLOCK START ########################
  27. # Try commenting out this area if not cross-compiling. Edit as necessary. #
  28. ###############################################################################
  29.  
  30. # Whether or not to cross compile. Comment out for native builds. Will run
  31. # tests that don't otherwise try to run on a cross-compilation (since you
  32. # can't run non-native binaries, usually).
  33. CROSS_COMPILE=1
  34.  
  35. # compilation machine type designation:
  36. ac_add_options --host=x86_64-linux-gnu
  37.  
  38. # target machine type designation (same as cross-compiler prefix):
  39. ac_add_options --target=powerpc-linux-gnu
  40.  
  41. # PATHs to search for pkg-config '.pc' files; multiple paths separated by
  42. # colons (':') can be specified.
  43. export PKG_CONFIG_PATH=/usr/lib/powerpc-linux-gnu/pkgconfig
  44.  
  45. # Compiler/binutils program names for cross-compilation:
  46. # May or may not be necessary; can't remember anymore.
  47. export CC=powerpc-linux-gnu-gcc
  48. export CXX=powerpc-linux-gnu-g++
  49. export LD=powerpc-linux-gnu-ld
  50. export AR=powerpc-linux-gnu-ar
  51. export AS=powerpc-linux-gnu-as
  52. export NM=powerpc-linux-gnu-nm
  53. export CPP=powerpc-linux-gnu-cpp
  54. export RANLIB=powerpc-linux-gnu-ranlib
  55. export GPROF=powerpc-linux-gnu-gprof
  56. export GCOV=powerpc-linux-gnu-gcov
  57. export OBJCOPY=powerpc-linux-gnu-objcopy
  58. export OBJDUMP=powerpc-linux-gnu-objdump
  59. export PKGCONFIG=powerpc-linux-gnu-pkg-config
  60. export PKG_CONFIG=powerpc-linux-gnu-pkg-config
  61. export STRIP=powerpc-linux-gnu-strip
  62.  
  63. ######################### CROSS-COMPILATION BLOCK END #########################
  64.  
  65. ################### MISC. BUILD SYSTEM OPTIONS/TOGGLES START ##################
  66. # Change these to fit your needs, target CPU type, and build machine. #
  67. ###############################################################################
  68.  
  69. # MOZ_MAKE_FLAGS
  70. # Number of make jobs to run at a time.
  71. # rule of thumb: set to the number of CPU cores on your build machine.
  72. # Often speeds up build time pretty significantly on multi-core systems.
  73. # -----------------------------------------------------------------------------
  74. mk_add_options MOZ_MAKE_FLAGS="-j3"
  75.  
  76. # MOZ_OBJDIR
  77. # Where to put intermediate compilation objects (.o files)
  78. # rule of thumb: try the full path to your source code folder, plus
  79. # 'obj-powerpc-linux-gnu'). You may want to create the directory before
  80. # you build, but I don't know if it's necessary or not.
  81. # I _believe_ there was a bug at the time with the build system, one which
  82. # basically required hard-coding this path as the workaround.
  83. # -----------------------------------------------------------------------------
  84. mk_add_options MOZ_OBJDIR=/home/wyatt/development/powerpc/seamonkey-2.49.5/obj-powerpc-linux-gnu
  85.  
  86. # prefix
  87. # install-time destination for files on the target machine.
  88. # Probably /usr or /usr/local on most linux machines, but could also be
  89. # somewhere like /opt/seamonkey. Just make sure (PREFIX)/bin is on your
  90. # PATH environment variable, or you won't be able to just type 'seamonkey'
  91. # to run it!
  92. #
  93. # Defaults to '/usr/local' if not set, I think.
  94. # -----------------------------------------------------------------------------
  95. ac_add_options --prefix=/usr
  96.  
  97. # More miscellaneous Mozilla build options
  98.  
  99. # Build the 'release' target (not a 'debug' or 'development' one)
  100. ac_add_options --enable-release
  101.  
  102. # Disable automatic updater, since we aren't a supported architecture anyway :)
  103. ac_add_options --disable-updater
  104.  
  105. # disable geographical location functionality (optional):
  106. ac_add_options --disable-necko-wifi
  107.  
  108. # Audio subsystems selection:
  109. # FF 52 and onward build with alsa disabled by default in favor of only
  110. # supporting pulseaudio. Since I don't use pulseaudio, I changed this. This
  111. # has to be done at build-time. I believe it's okay to have both enabled
  112. # as well, but I have had many negative experiences with pulse, so I
  113. # personally try to keep it out of my software whenever possible.
  114. #
  115. # If you use pulseaudio, you should probably enable it, since from what I've
  116. # read on the mailing lists and bug tracker there might be trouble with
  117. # microphones/audio inputs in the alsa code. Stereo playback works fine.
  118. ac_add_options --disable-pulseaudio
  119. ac_add_options --enable-alsa
  120.  
  121. # --enable-application=suite just says to build seamonkey, not Firefox.
  122. # Firefox's internal application name is 'browser.'
  123. ac_add_options --enable-application=suite
  124.  
  125. # Tests on cross-compilation may cause build failures.
  126. # even if they work, they also slow down build time.
  127. ac_add_options --disable-tests
  128.  
  129. # Brand as 'seamonkey'
  130. ac_add_options --enable-official-branding
  131.  
  132. #################### MISC. BUILD SYSTEM OPTIONS/TOGGLES END ###################
  133.  
  134. ##################### POWERPC BUG FIXES/WORKAROUNDS START #####################
  135. # SM will probably either fail to build or crash without these. #
  136. ###############################################################################
  137.  
  138. # COMPILER OPTIMIZATIONS (--enable-optimize):
  139. # This was a VERY HACKY thing I did, basically bolting additional compiler
  140. # flags off the end of the optimization flag. Don't try this at home, kids
  141. # (I should really have exported 'CXXFLAGS' and 'CFLAGS' instead, and left
  142. # the -O2 and possibly the -f* options here).
  143. # ----------------------------------------------------------------------------#
  144. # READ THE NOTES AT THE BOTTOM OF THE FILE BEFORE YOU CHANGE THIS; I KNOW IT #
  145. # LOOKS WEIRD, BUT THERE'S A REASON. #
  146. # You will probably have to change at least the '-I' inclusion below for your #
  147. # machine, if you are cross compiling (unless you're on GCC 7.3 on Debian). #
  148. # -----------------------------------------------------------------------------
  149. ac_add_options --enable-optimize="-O2 -I/usr/powerpc-linux-gnu/include/7.3.0/powerpc-linux-gnu -Wl,--no-keep-memory -Wl,--relax -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2"
  150.  
  151. # Fix ICU bug that causes cryptic segfaults
  152. # (this one was a REALLY fun bug to try to figure out).
  153. ac_add_options --with-system-icu
  154.  
  155.  
  156. # I don't remember why this line is here, but it was commented out in my
  157. # mozconfig. Keeping for posterity.
  158. # ac_add_options --with-l10n-base=/root/seamonkey-2.49.5/l10n
  159.  
  160.  
  161. # See below notes about optimization flags; essentially, these flags are
  162. # critical, and without them your seamonkey build will be highly unstable
  163. # (randomly crash) and perform quite badly - at least under GCC 7.3.
  164. export LDFLAGS="-Wl,--no-keep-memory -Wl,--relax"
  165. export CFLAGS="-Wl,--no-keep-memory -Wl,--relax -fno-delete-null-pointer-checks -fno-schedule-insns2"
  166. export CXXFLAGS="-Wl,--no-keep-memory -Wl,--relax -fno-delete-null-pointer-checks -fno-schedule-insns2"
  167.  
  168. ###################### POWERPC BUG FIXES/WORKAROUNDS END ######################
  169.  
  170. #==============================================================================
  171. # PLEASE, PLEASE, PLEASE NOTE that without:
  172. # '-Wl,--no-keep-memory -Wl,--relax -fno-delete-null-pointer-checks -fno-lifetime-dse'
  173. # SOMEWHERE in the build flags, the resulting seamonkey build (using GCC 7.3,
  174. # at least) will be HIGHLY unstable and badly-performing.
  175. #
  176. # These compiler flags are CRITICAL, so if you decide to clean up the
  177. # '--enable-optimize' arguments, make sure that you put the other flags
  178. # somewhere else and don't just omit them.
  179. #
  180. # I feel like I put these here specifically because I needed the '-Wl,*' flags
  181. # to be on some compilation/link-time procedures, and CFLAGS/CXXFLAGS/LDFLAGS
  182. # weren't getting applied to them, but I noticed the optimization ones _were_
  183. # so I slapped them on the end of it.
  184.  
  185. # It's possible that LLVM/Clang or newer GCC wouldn't have these problems (and
  186. # indeed, LLVM/Clang doesn't even have -fno-schedule-insns2 or
  187. # -fno-lifetime-dse, I think), but I have not tried LLVM/Clang builds for
  188. # PowerPC yet.
  189. #==============================================================================
  190.  
Advertisement
Add Comment
Please, Sign In to add comment