Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # If cross compiling, build Seamonkey from inside a chroot, since a lot of the
- # '-dev' libs don't work otherwise in multiarch (due to conflicts with native
- # architecture '-dev' packages).
- # built in mid-to-late 2018 in Debian Sid.
- # if building _on a PPC host_, you might have to change a few of the lines
- # below. I'll try to mark them. There might also be some other lines I
- # hardcoded that need changing on your particular setup, such as the
- # 'MOZ_OBJDIR' definition. There used to be a bug (which may or may not exist
- # anymore) that needed to be worked around by hardcoding the MOZ_OBJDIR path.
- # You may also be able to speed up the build on multi-core/multi-CPU systems by
- # changing 'MOZ_MAKE_FLAGS="-j3"' to something else (your core count); if
- # running on a single-core machine, you should probably either remove the line
- # entirely, or else set it as 'MOZ_MAKE_FLAGS="-j1"' instead (so that it only
- # tries to run a single build job at a time instead of running three).
- # This config stemmed from the Seamonkey and Firefox builds I was already doing
- # on my Intel machines, and I simply modified it for PPC builds. Also, if you
- # are having trouble feel free to contact me and ask for help, but my reply
- # times may vary wildly since I'm a student who doesn't have a very predictable
- # workload.
- ######################## CROSS-COMPILATION BLOCK START ########################
- # Try commenting out this area if not cross-compiling. Edit as necessary. #
- ###############################################################################
- # Whether or not to cross compile. Comment out for native builds. Will run
- # tests that don't otherwise try to run on a cross-compilation (since you
- # can't run non-native binaries, usually).
- CROSS_COMPILE=1
- # compilation machine type designation:
- ac_add_options --host=x86_64-linux-gnu
- # target machine type designation (same as cross-compiler prefix):
- ac_add_options --target=powerpc-linux-gnu
- # PATHs to search for pkg-config '.pc' files; multiple paths separated by
- # colons (':') can be specified.
- export PKG_CONFIG_PATH=/usr/lib/powerpc-linux-gnu/pkgconfig
- # Compiler/binutils program names for cross-compilation:
- # May or may not be necessary; can't remember anymore.
- export CC=powerpc-linux-gnu-gcc
- export CXX=powerpc-linux-gnu-g++
- export LD=powerpc-linux-gnu-ld
- export AR=powerpc-linux-gnu-ar
- export AS=powerpc-linux-gnu-as
- export NM=powerpc-linux-gnu-nm
- export CPP=powerpc-linux-gnu-cpp
- export RANLIB=powerpc-linux-gnu-ranlib
- export GPROF=powerpc-linux-gnu-gprof
- export GCOV=powerpc-linux-gnu-gcov
- export OBJCOPY=powerpc-linux-gnu-objcopy
- export OBJDUMP=powerpc-linux-gnu-objdump
- export PKGCONFIG=powerpc-linux-gnu-pkg-config
- export PKG_CONFIG=powerpc-linux-gnu-pkg-config
- export STRIP=powerpc-linux-gnu-strip
- ######################### CROSS-COMPILATION BLOCK END #########################
- ################### MISC. BUILD SYSTEM OPTIONS/TOGGLES START ##################
- # Change these to fit your needs, target CPU type, and build machine. #
- ###############################################################################
- # MOZ_MAKE_FLAGS
- # Number of make jobs to run at a time.
- # rule of thumb: set to the number of CPU cores on your build machine.
- # Often speeds up build time pretty significantly on multi-core systems.
- # -----------------------------------------------------------------------------
- mk_add_options MOZ_MAKE_FLAGS="-j3"
- # MOZ_OBJDIR
- # Where to put intermediate compilation objects (.o files)
- # rule of thumb: try the full path to your source code folder, plus
- # 'obj-powerpc-linux-gnu'). You may want to create the directory before
- # you build, but I don't know if it's necessary or not.
- # I _believe_ there was a bug at the time with the build system, one which
- # basically required hard-coding this path as the workaround.
- # -----------------------------------------------------------------------------
- mk_add_options MOZ_OBJDIR=/home/wyatt/development/powerpc/seamonkey-2.49.5/obj-powerpc-linux-gnu
- # prefix
- # install-time destination for files on the target machine.
- # Probably /usr or /usr/local on most linux machines, but could also be
- # somewhere like /opt/seamonkey. Just make sure (PREFIX)/bin is on your
- # PATH environment variable, or you won't be able to just type 'seamonkey'
- # to run it!
- #
- # Defaults to '/usr/local' if not set, I think.
- # -----------------------------------------------------------------------------
- ac_add_options --prefix=/usr
- # More miscellaneous Mozilla build options
- # Build the 'release' target (not a 'debug' or 'development' one)
- ac_add_options --enable-release
- # Disable automatic updater, since we aren't a supported architecture anyway :)
- ac_add_options --disable-updater
- # disable geographical location functionality (optional):
- ac_add_options --disable-necko-wifi
- # Audio subsystems selection:
- # FF 52 and onward build with alsa disabled by default in favor of only
- # supporting pulseaudio. Since I don't use pulseaudio, I changed this. This
- # has to be done at build-time. I believe it's okay to have both enabled
- # as well, but I have had many negative experiences with pulse, so I
- # personally try to keep it out of my software whenever possible.
- #
- # If you use pulseaudio, you should probably enable it, since from what I've
- # read on the mailing lists and bug tracker there might be trouble with
- # microphones/audio inputs in the alsa code. Stereo playback works fine.
- ac_add_options --disable-pulseaudio
- ac_add_options --enable-alsa
- # --enable-application=suite just says to build seamonkey, not Firefox.
- # Firefox's internal application name is 'browser.'
- ac_add_options --enable-application=suite
- # Tests on cross-compilation may cause build failures.
- # even if they work, they also slow down build time.
- ac_add_options --disable-tests
- # Brand as 'seamonkey'
- ac_add_options --enable-official-branding
- #################### MISC. BUILD SYSTEM OPTIONS/TOGGLES END ###################
- ##################### POWERPC BUG FIXES/WORKAROUNDS START #####################
- # SM will probably either fail to build or crash without these. #
- ###############################################################################
- # COMPILER OPTIMIZATIONS (--enable-optimize):
- # This was a VERY HACKY thing I did, basically bolting additional compiler
- # flags off the end of the optimization flag. Don't try this at home, kids
- # (I should really have exported 'CXXFLAGS' and 'CFLAGS' instead, and left
- # the -O2 and possibly the -f* options here).
- # ----------------------------------------------------------------------------#
- # READ THE NOTES AT THE BOTTOM OF THE FILE BEFORE YOU CHANGE THIS; I KNOW IT #
- # LOOKS WEIRD, BUT THERE'S A REASON. #
- # You will probably have to change at least the '-I' inclusion below for your #
- # machine, if you are cross compiling (unless you're on GCC 7.3 on Debian). #
- # -----------------------------------------------------------------------------
- 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"
- # Fix ICU bug that causes cryptic segfaults
- # (this one was a REALLY fun bug to try to figure out).
- ac_add_options --with-system-icu
- # I don't remember why this line is here, but it was commented out in my
- # mozconfig. Keeping for posterity.
- # ac_add_options --with-l10n-base=/root/seamonkey-2.49.5/l10n
- # See below notes about optimization flags; essentially, these flags are
- # critical, and without them your seamonkey build will be highly unstable
- # (randomly crash) and perform quite badly - at least under GCC 7.3.
- export LDFLAGS="-Wl,--no-keep-memory -Wl,--relax"
- export CFLAGS="-Wl,--no-keep-memory -Wl,--relax -fno-delete-null-pointer-checks -fno-schedule-insns2"
- export CXXFLAGS="-Wl,--no-keep-memory -Wl,--relax -fno-delete-null-pointer-checks -fno-schedule-insns2"
- ###################### POWERPC BUG FIXES/WORKAROUNDS END ######################
- #==============================================================================
- # PLEASE, PLEASE, PLEASE NOTE that without:
- # '-Wl,--no-keep-memory -Wl,--relax -fno-delete-null-pointer-checks -fno-lifetime-dse'
- # SOMEWHERE in the build flags, the resulting seamonkey build (using GCC 7.3,
- # at least) will be HIGHLY unstable and badly-performing.
- #
- # These compiler flags are CRITICAL, so if you decide to clean up the
- # '--enable-optimize' arguments, make sure that you put the other flags
- # somewhere else and don't just omit them.
- #
- # I feel like I put these here specifically because I needed the '-Wl,*' flags
- # to be on some compilation/link-time procedures, and CFLAGS/CXXFLAGS/LDFLAGS
- # weren't getting applied to them, but I noticed the optimization ones _were_
- # so I slapped them on the end of it.
- # It's possible that LLVM/Clang or newer GCC wouldn't have these problems (and
- # indeed, LLVM/Clang doesn't even have -fno-schedule-insns2 or
- # -fno-lifetime-dse, I think), but I have not tried LLVM/Clang builds for
- # PowerPC yet.
- #==============================================================================
Advertisement
Add Comment
Please, Sign In to add comment