On 10/14/2009 02:46 PM, CB wrote: > I'm using WindRiver Linux 2.0 to cross compile nss to a PowerPC. The > 3.11.4 build instructions and troubleshooting don't cover something > like this. Can someone point me to documentation that would describe > how to set the compiler, flags, install location, etc...? > I know some folks have has some success at cross compiling. (Caveat, I have not tried to cross compile NSS in quite a while).
Your best bet is to create a cross-compile ${OS_CONFIG}.mk file for your target platform in mozilla/security/coreconf. You can use Linux.mk and Linux2.6.mk as samples (or WINCE.mk and WINCE3.0.mk which are cross complied from windows to WINCE). coreconf normally determines OS_CONFIG automatically from OS_TARGET and OS_RELEASE. The latter two are automatically determined by examining uname on your platform. To cross compile, you would set the OS_TARGET and OS_TARGET_RELEASE environment variables to your target OS. This will override the what coreconf will automatically pick up. NSS builds 2 types of tools as part of the build process: 1) tools to help in the build, and 2) target tools. The latter is basically nsinstall, built by coreconf. Those tools build with the compiler specified by NATIVE_CC and with the flags specified with NATIVE_FLAGS [WINCE avoids this altogether. on windows, nsinstall is shipped in the mozilla build environment and not built]. So setting those targets plus the NATIVE_CC and NATIVE_FLAGS should get you to the point where NSS tries to create it's check files (*.ckh), after all the libraries and most of the tools have built. The problem here is NSS uses the tools and libraries it has just built to build the .chk files. Probably the easiest way to handle that is to require NSS and shlibsign to be installed on your native machine and modify mozilla/security/nss/cmd/shlibsign/sign.sh to use the native machine's shlibsign (If you add a 'NATIVE_SHLIBSIGN' environment variable which sign.sh picks up, that could be used by other cross-platforms as well, and will likely be accepted as a patch to NSS in general. If you get this working, it might be good to record what you had to do on our wiki at https://developer.mozilla.org/en/NSS bob
-- dev-tech-crypto mailing list dev-tech-crypto@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-tech-crypto