-
-
Notifications
You must be signed in to change notification settings - Fork 6
Developers
This section contains information related to developing Mozilla on OS/2.
The original Mozilla source code is hosted in a Mercury repository located here: http://hg.mozilla.org/releases/. Since at the time of starting the OS/2 repository of Mozilla there was no reliable git mirror, it was decided to create a clean git repository and import the upstream source code using the tarballs taken from the link above. At the present time, only the ESR (extended support) releases are imported from upstream due to the limited amount of resources available to work on the OS/2 port.
There are the following branches in the OS/2 repository:
-
vendor-esr: This is where the original ESR source tarballs are imported to (NN is the major ESR release number). After each new import a tag is created in the formFIREFOX_NN_X_Yesr_RELEASEwhere NN is the major ESR release number and X and Y are the minor and build numbers, respectively. -
master: This is where the current OS/2 development takes place. After a new upstream release is imported tovendor-esr, it is merged here. When a new OS/2 release of the given upstream release is made, a tag in the formFIREFOX_NN_X_Yesr_RELEASE_OS2_ZZZis created where ZZZ is the OS/2 release status (Alpha, Beta or GA). -
esrNN: This is the OS/2 branch that matches the given ESR line. These branches are created frommasterright before it is updated to a new major ESR release. They are meant to be used as hot-fix (maintenance) branches for possible updates to the previous ESR releases. Note that there is no branch for the current ESR release (because it is being worked on onmaster).
These build instructions assume that you have the RPM/YUM environment up and running (eCS 2.2 Beta II and below provides it by default).
- Install these packages using
yum:
yum install netlabs-exp # for perl 5.16
yum install autoconf automake libtool
yum install autoconf213
yum install ash nasm gcc gcc-wlink gcc-wrc kbuild-make m4 grep gawk perl python findutils tar pkgconfig perl-PathTools pthread-devel exceptq exceptq-devel
yum install freetype-devel fontconfig-devel libjpeg-devel libpng-devel pixman-devel cairo-devel
yum install pango-devel nspr-devel nss-devel nss-util-devel nss-softokn-devel libicu-devel libvpx-devel
yum install os2-base-unixtools-path # to have /usr/bin before /OS2
- Install RC 5 (
rc.exeVersion 5.00.007 Jan 30 2003) from OS/2 Toolkit 4.5 inPATH. - Make OS/2 Toolkit 4.5 headers available (e.g under
D:/Tools/OS2TK45/h). - Increase the value of
VIRTUALADDRESSLIMITinconfig.sys(which is 1536 by default) to something like 2048, 2560 or the maximum, 3072. Otherwise you may get errorE3009(out of memory) when linkingxul.dll. - Make sure this fragment is in
config.sys(or in your top-level environment script):
SET SHELL=sh.exe
SET EMXSHELL=sh.exe
SET CONFIG_SHELL=sh.exe
SET MAKESHELL=sh.exe
SET EXECSHELL=sh.exe
Go to the source dir and do the following under sh:
autoconf213
(cd js/src && autoconf213)
(cd js/src/ctypes/libffi && autoconf)
(cd nsprpub && autoconf)
Create a separate build directory along the source tree directory (referred to as $SOURCE_ROOT below) and do the following under sh in that directory:
export YASM=nasm
export LIBJPEG_TURBO_AS=nasm
export RANLIB=echo
# We can't add Toolkit includes in _INCS (it will casuse then to be searched
# before GCC headers and lead to conflicts), so use -idirafter.
export CPPFLAGS='-idirafter D:/Tools/OS2TK45/h'
# Extra libs for everything
export LIBS="-lmmap"
# -Zomf is to make sure configure tests run in OMF mode
export LIBS="$LIBS -Zomf"
# We need i486 or above for __sync_fetch_and_sub and similar builtins
export CFLAGS="-march=i486 -mtune=i686"
export CXXFLAGS="-march=i486 -mtune=i686"
CONFIGURE_FLAGS="
--disable-tests
--enable-system-cairo
--enable-system-pixman
--with-system-icu
--with-system-nspr
--with-system-nss
--with-system-libvpx
"
# Developer's release build
"$SOURCE_ROOT/configure" \
$CONFIGURE_FLAGS \
--disable-debug \
--enable-debug-symbols \
--enable-optimize='-O3'
# Developer's debug build
#"$SOURCE_ROOT/configure" \
# $CONFIGURE_FLAGS \
# --enable-debug \
# --enable-debug-symbols \
# --disable-optimize
Run the following under sh in the build directory (be patient, it may take many hours depending on your hardware configuration):
make -jN # N is the no. of CPUs + 1
make package # makes a .zip with binaries
make package-symbols # makes a .zip with symbols for binaries