summaryrefslogtreecommitdiff
path: root/nss
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2012-10-14 23:35:54 +0300
committerTor Lillqvist <tml@iki.fi>2012-10-14 23:49:11 +0300
commitc96b4c550db2e5206786b9b689c2eb293ee787bb (patch)
tree0361ae4044cb466ddc982fe41e0359c86f538418 /nss
parent9715b31f9dc4b77ad566b00b6427832203d4bc42 (diff)
Handle cross-compilation of nss (for desktop OSes)
A bit messy, but then so is the nss configuration and build mechanism. Change-Id: If2259e3da81521a2f87a5b312c6acd9d40e75ae5
Diffstat (limited to 'nss')
-rw-r--r--nss/makefile.mk26
1 files changed, 25 insertions, 1 deletions
diff --git a/nss/makefile.mk b/nss/makefile.mk
index bff00b280947..7e27b93a75ab 100644
--- a/nss/makefile.mk
+++ b/nss/makefile.mk
@@ -74,7 +74,13 @@ my_prefix=/@.__________________________________________________$(EXTRPATH)
my_prefix=$(OUTDIR)
.END
-CONFIGURE_ACTION=mozilla/nsprpub/configure --prefix=$(my_prefix) --includedir=$(OUTDIR)/inc/mozilla/nspr ; \
+CONFIGURE_ACTION=mozilla/nsprpub/configure --prefix=$(my_prefix) --includedir=$(OUTDIR)/inc/mozilla/nspr
+
+.IF "$(CROSS_COMPILING)"=="YES"
+CONFIGURE_ACTION+=--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)
+.ENDIF
+
+CONFIGURE_ACTION+= ; \
sed -e 's\#@prefix@\#$(OUTDIR)\#' -e 's\#@includedir@\#$(OUTDIR)/inc/mozilla/nss\#' -e 's\#@MOD_MAJOR_VERSION@\#$(VER_MAJOR)\#' -e 's\#@MOD_MINOR_VERSION@\#$(VER_MINOR)\#' -e 's\#@MOD_PATCH_VERSION@\#$(VER_PATCH)\#' mozilla/security/nss/nss-config.in > mozilla/security/nss/nss-config ; \
chmod a+x mozilla/security/nss/nss-config
@@ -114,6 +120,24 @@ OUT2BIN=config/nspr-config mozilla/security/nss/nss-config
BUILD_DIR=mozilla/security/nss
BUILD_ACTION= $(GNUMAKE) nss_build_all -j1
+
+.IF "$(CROSS_COMPILING)"=="YES"
+
+.IF "$(OS)-$(CPUNAME)"="MACOSX-POWERPC"
+# Hardcode this for now... need to add more when/if cross-compiling to
+# other desktop OSes, yeah, this is silly, but the nss build mechanism
+# is a bit messy, I could not figure out how to get it to get CPU_ARCH
+# automatically when cross-compiling
+BUILD_ACTION+= CPU_ARCH=ppc
+.ENDIF
+
+# When cross-compiling need to use a nsinstall built for the build
+# platform, so yeah, whole nss built for the build platform just for
+# that... But oh well, nss is small compared to LO;)
+BUILD_ACTION+= NSINSTALL=$(SRC_ROOT)/nss/$(INPATH_FOR_BUILD)/misc/build/$(TARFILE_ROOTDIR)/mozilla/security/coreconf/nsinstall/out/nsinstall
+
+.ENDIF
+
#Note: with the new version the libfreebl3.so gets built in a way that does
# not conflict with the system one on Linux automatically;
# it is no longer necessary to add a workaround for #i105566# && moz#513024#