Status

defect
P3
normal
RESOLVED FIXED
20 years ago
2 years ago

People

(Reporter: cls, Assigned: cls)

Tracking

Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

()

Assignee

Description

20 years ago
Currently, it is extremely hard/borderline impossible to cross-compile Mozilla.
It is not always possible to compile Mozilla natively on a given platform.
Currently, the build system does not make a distinction between host and target
compilers nor does it distinguish between targets to be built for and run on the
target system and those to be built and run on the host system.  I believe for
both the QNX port and the OpenVMS port, cross-compiling is required.

For the most part, these changes have already been made and should be viewable
on the
http://cvs-mirror.mozilla.org/webtools/bonsai/cvsquery.cgi?treeid=default&module=all&branch=AUTOCONF_NSPR_WIN32_XCOMPILE_19990621_BRANCH&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=all&mindate=&maxdate=&cvsroot=%2Fcvsroot">AUTOCONF_NSPR_WIN32_XCOMPILE_19990621_BRANCH</a>.
However, this entire process depends upon NSPR having autoconf support (which
I'll file as a separate bug shortly).
Assignee

Updated

20 years ago
Depends on: 11893
Assignee

Comment 2

20 years ago
Adding a dependency upon the "autoconf for NSPR" bug.
Assignee

Comment 3

20 years ago
I would like to get this in before the beta release.
Target Milestone: M11

Updated

20 years ago
Status: NEW → ASSIGNED

Comment 4

20 years ago
Adding Colin and Jerry in the hopes that they might comment on this.

Comment 5

20 years ago
Another thing to consider. Some tools I believe should be built both ways,
both host and target. An example is xpidl. We need that for the build, but
we also ship it was part of the mozilla "kit".

Currently I don't see any infrastructure for this.
Assignee

Comment 6

20 years ago
Erk.  I didn't consider that but adding a $(DISTLOCAL) or $(DISTHOST) for
cross-compiled builds shouldn't be a problem.  Currently, the only things built
natively are: nsinstall, xpidl, xpt_dump, xpt_link, libhostxpt.a & jscpcfg.

Comment 7

20 years ago
mass reassigning briano's open bugs to me while he's on sabbatical.

Comment 8

20 years ago
accept bug.

Comment 9

20 years ago
not going to make M11.

Updated

20 years ago
Target Milestone: M13 → M14

Comment 10

20 years ago
mass migration to M14

Comment 11

20 years ago
There's no way I'm getting to this one with briano gone.  Setting to M18.  
Anyone who has the time to work on this is more than welcome to reassign it to 
themselves.
Target Milestone: M14 → M18
Assignee

Comment 12

20 years ago
Actually, I made some significant progress on this one a couple of weeks ago.  I
was able to fully cross-compile the entire tree from x86/linux -> x86/solaris. 
viewer & xpcshell worked but the browser did not.  It would core after
registering the modules.  Still investigating.

Comment 13

20 years ago
reassigning to chris.
Assignee: granrose → cls
Status: ASSIGNED → NEW
Assignee

Updated

20 years ago
Status: NEW → ASSIGNED
Assignee

Comment 14

20 years ago
Well, after upgrading binutils and building with a recent tree...it works!!!! I am currently using the cross-compiled browser to update this bug. I think one of the major differences is that I upgraded my cross-binutils set to 2.9.5 since I was using a cross-gcc 2.95.2 to build the browser. Also, a small patch is needed to set LD properly under NSPR. env CROSS_COMPILE=1 CFLAGS='-pipe -fpermissive' CXXFLAGS='-pipe -fpermissive' GTK_CONFIG=/usr/i386-solaris2/bin/gtk-config ../mozilla/configure --enable-nspr-autoconf --host=i386-linux --target=i386-solaris2 --x-includes=/usr/i386-solaris2/i386-solaris2/openwin/include --x-libraries=/usr/i386-solaris2/i386-solaris2/openwin/lib | & tee 0000 make MAKE='make -j5' NSDISTMODE=copy DIST=/usr/cls/solaris-mozilla | & tee 0001 There are some details that need to be worked out still..like what to do about the host utils used for the build (xpidl & friends) and will this setup work for other cross-compiling setups...namely OpenVMS & QNX?
Assignee

Comment 15

19 years ago
Ok, I just checked in changes to build the host version of internal tools with a
host_ prefix when cross compiling.  The target version will be built without the
prefix.  The host versions of the tools are installed in $(DIST)/host/{bin,lib}.

So, to cross compile, you need to pass the following env args to configure:
CROSS_COMPILE=1
GTK_CONFIG=/path/to/cross/compiled/gtk-config
GLIB_CONFIG=/path/to/cross/compiled/glib-config
LIBIDL_CONFIG=/path/to/cross/compiled/libIDL-config
HOST_LIBIDL_CONFIG=/path/to/local/libIDL-config

and run configure with at least the following args:
--host=host-canonical-name (ie, i386-linux)
--target=target-canonical-name (ie, i386-solaris2)
--enable-nspr-autoconf

Currently, only tested with gcc.  Is there another compiler that has source and
is cross-compiliable?
Status: ASSIGNED → RESOLVED
Last Resolved: 19 years ago
Resolution: --- → FIXED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.