Today I’m going to compile Firefox for Windows on a Linux box. And for that I’m not going to reinvent the wheel, but follow an existing guide.
This is what I’m going to need:
- GNU Binutils – This is linker, assembler, and various other tools.
- GCC 4.3 – I have GCC 4.4.3. I might have to install GCC 4.3, if GCC 4.4.3 doesn’t play well with Dehydra.
- mingw-runtim, w32api, and Cygwin winsup – It has something to do with GCC cross compiler.
- Netscape wintools – This is something that is need for some xpidl. A quick search reveals that it (might) stands for [X]Cross Platform Interface Definition Language.
- And, off course, configuring Firefox build.
binutils-2.18surprisingly installed with no problems.- Install
mingw-runtime-3.14 - Same for
w32api-3.11. - Get GCC 4.3 source and
winsup-src-20100315.
I had to get mpfr to install GCC, but other than that everything went without a problem.
Time to check the compiler:
[root@xxxxxx ~]# osd/mingw32/bin/i686-mingw32-gcc -v
Using built-in specs.
Target: i686-mingw32
Configured with: ../gcc-4.3.0/configure --prefix=/root/osd/mingw32/ --target=i686-mingw32 --with-gnu-ld --with-gnu-as --enable-__cxa_atexit --enable-languages=c,c++
Thread model: win32
gcc version 4.3.0 (GCC)
[root@xxxxxx ~]# osd/mingw32/bin/i686-mingw32-gcc test.c -o test.exe
[root@xxxxxx ~]# ls test*
test.c test.exe
On Windows:
C:\>test.exe
hello world!
I’m almost ready to build Firefox.