Neil wrote:
> Myself using Interix and "Mook" using Wine have both tried to 
> cross-compile Mozilla using MSVC as a cross compiler. Generally I would 
> like to think that NSS has been the easiest part to cross compile, but 
> here are the issues we ran into:
> 
>    1. Because we're not using GCC or MSYS, rules.mk tries to run cygpath
>       -w `pwd` which fails because we have no cygpath.
>    2. AR does not get set correctly because AR_FLAGS contains $@
>    3. LINK fails to run because the environment contains LINK=link which
>       it sees as a request to link link.obj
>    4. RC fails to run because some of the NSPR includes can't determine
>       the target processor (_X86_ does not get defined)
>    5. Because he was using VC8 Mook also had some issues with manifests.
> 
> I would be happy to write patches for these if you would advise me as to 
> whether my ideas are useful.
> 
>    1. I wrapped the code in a test for NATIVE_CC; Mook used
>       CROSS_COMPILE but I think that relies on you exporting it from the
>       shell.
>    2. AR='$(subst $@,$$@,$(AR) $(AR_FLAGS))' (Mook used a similar construct)
>    3. Mook prefixed LINK= $(LINK) to temporarily clear the variable; my
>       suggestion is to rename $(LINK) to $(LD) in the makefile
>    4. Currently we work around this by preventing rc from including
>       seccommon.h but I'd appreciate ideas for how to persuade NSS that
>       i686 is _X86_
>    5. I don't know about this, but I could ask Mook to chime in if you
>       thought it would be useful.

Neil, This is not a direct answer to any of the issues you raised, but is
a suggestion on how best to go about addressing them.

As you may know, NSS and NSPR can be built independently of the rest of
the mozilla products (browsers, email clients, etc.).  NSS and NSPR have
their own build system (Makefiles).

The mozilla products' build systems provide "wrappers" that invoke
NSS+NSPR's build systems.  When you try to build FireFox or ThunderBird,
the makefiles for those products also try to make NSS.

When people have trouble building NSS inside of one of the mozilla products,
the problem may be in the NSS makefiles, or it may be in the wrappers.
Sometimes people try to fix problems in one by making changes to the other.
That has been the cause of no little grief in the past.

If you're having problems building NSS for some particular platform,
I suggest that you first try to get NSS to build for you in its stand-
alone configuration, using only NSS's makefiles and not any of the
other mozilla products' makefiles.  When you have that working, then the
next step (if you still need it) is to get NSS building as part of the
mozilla product builds.

-- 
Nelson B
_______________________________________________
dev-tech-crypto mailing list
dev-tech-crypto@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-crypto

Reply via email to