--- a/build/autoconf/nspr-build.m4
+++ b/build/autoconf/nspr-build.m4
@@ -28,17 +28,17 @@ MOZ_ARG_WITH_STRING(nspr-cflags,
NSPR_CFLAGS=$withval)
MOZ_ARG_WITH_STRING(nspr-libs,
[ --with-nspr-libs=LIBS Pass LIBS to LD when linking code that uses NSPR.
See --with-nspr-cflags for more details.],
NSPR_LIBS=$withval)
ifdef([CONFIGURING_JS],[
MOZ_ARG_ENABLE_BOOL(nspr-build,
-[ --enable-nspr-build Configure and build NSPR from source tree],
+[ --enable-nspr-build Build NSPR from source tree],
MOZ_BUILD_NSPR=1,
MOZ_BUILD_NSPR=)
])
if test -z "$BUILDING_JS" || test -n "$JS_STANDALONE"; then
_IS_OUTER_CONFIGURE=1
fi
@@ -182,77 +182,8 @@ if test -n "$MOZ_NATIVE_NSPR"; then
AC_MSG_ERROR([system NSPR does not support PR_STATIC_ASSERT]))
CFLAGS=$_SAVE_CFLAGS
fi
AC_SUBST(NSPR_PKGCONF_CHECK)
fi # _IS_OUTER_CONFIGURE
])
-
-AC_DEFUN([MOZ_SUBCONFIGURE_NSPR], [
-
-if test -z "$MOZ_NATIVE_NSPR"; then
- ac_configure_args="$_SUBDIR_CONFIG_ARGS --with-dist-prefix=$MOZ_BUILD_ROOT/dist --with-mozilla"
- if test -n "$MOZ_USING_CCACHE"; then
- # Avoid double prepending ccache by omitting --with-ccache in building NSPR.
- ac_configure_args="`echo $ac_configure_args | sed -e 's/--with-ccache[[^ ]]*//'`"
- fi
-
- if test -z "$MOZ_DEBUG"; then
- ac_configure_args="$ac_configure_args --disable-debug"
- else
- ac_configure_args="$ac_configure_args --enable-debug"
- if test -n "$MOZ_NO_DEBUG_RTL"; then
- ac_configure_args="$ac_configure_args --disable-debug-rtl"
- fi
- fi
- if test "$MOZ_OPTIMIZE" = "1"; then
- ac_configure_args="$ac_configure_args --enable-optimize"
- elif test -z "$MOZ_OPTIMIZE"; then
- ac_configure_args="$ac_configure_args --disable-optimize"
- fi
- if test -n "$HAVE_64BIT_BUILD"; then
- ac_configure_args="$ac_configure_args --enable-64bit"
- fi
- if test -n "$USE_ARM_KUSER"; then
- ac_configure_args="$ac_configure_args --with-arm-kuser"
- fi
- # A configure script generated by autoconf 2.68 does not allow the cached
- # values of "precious" variables such as CFLAGS and LDFLAGS to differ from
- # the values passed to the configure script. Since we modify CFLAGS and
- # LDFLAGS before passing them to NSPR's configure script, we cannot share
- # config.cache with NSPR. As a result, we cannot pass AS, CC, CXX, etc. to
- # NSPR via a shared config.cache file and must pass them to NSPR on the
- # configure command line.
- for var in AS CC CXX CPP LD AR RANLIB STRIP; do
- ac_configure_args="$ac_configure_args $var='`eval echo \\${${var}}`'"
- done
- # A configure script generated by autoconf 2.68 warns if --host is
- # specified but --build isn't. So we always pass --build to NSPR's
- # configure script.
- ac_configure_args="$ac_configure_args --build=$build"
- ac_configure_args="$ac_configure_args $NSPR_CONFIGURE_ARGS"
-
- # Save these, so we can mess with them for the subconfigure ..
- _SAVE_CFLAGS="$CFLAGS"
- _SAVE_CPPFLAGS="$CPPFLAGS"
- _SAVE_LDFLAGS="$LDFLAGS"
-
- if test -n "$MOZ_LINKER" -a "$ac_cv_func_dladdr" = no ; then
- # dladdr is supported by the new linker, even when the system linker doesn't
- # support it. Trick nspr into using dladdr when it's not supported.
- export CPPFLAGS="-include $_topsrcdir/mozglue/linker/dladdr.h $CPPFLAGS"
- fi
- export LDFLAGS="$LDFLAGS $NSPR_LDFLAGS"
- export CFLAGS="$CFLAGS $MOZ_FRAMEPTR_FLAGS $MOZ_FOLD_LIBS_FLAGS"
-
- AC_OUTPUT_SUBDIRS(nsprpub)
-
- # .. and restore them
- CFLAGS="$_SAVE_CFLAGS"
- CPPFLAGS="$_SAVE_CPPFLAGS"
- LDFLAGS="$_SAVE_LDFLAGS"
-
- ac_configure_args="$_SUBDIR_CONFIG_ARGS"
-fi
-
-])
deleted file mode 100644
--- a/config/external/nspr/Makefile.in
+++ /dev/null
@@ -1,56 +0,0 @@
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-include $(topsrcdir)/config/rules.mk
-
-ifdef MOZ_BUILD_NSPR
-
-# Copy NSPR to the SDK
-
-ifdef MOZ_FOLD_LIBS
-# Trick the nspr build system into not building shared libraries.
-# bug #851869.
-EXTRA_MAKE_FLAGS := SHARED_LIBRARY= IMPORT_LIBRARY= SHARED_LIB_PDB=
-
-# Work around libVersionPoint conflict between all three libraries.
-# See bug #838566.
-EXTRA_MAKE_FLAGS += XP_DEFINE=-DlibVersionPoint='libVersionPoint$$(LIBRARY_NAME)'
-else
-# nspr's make export compiles and links everything, but linking can't happen
-# during export on platforms where nspr is linked against mozcrt/mozglue.
-export:: EXTRA_MAKE_FLAGS += SHARED_LIBRARY= IMPORT_LIBRARY= SHARED_LIB_PDB=
-endif
-
-MOZ_BUILDID := $(shell cat $(DEPTH)/config/buildid)
-
-# The NSPR build system uses build-time generated dates for public API
-# exposed data structures. Use the buildid as forced date, to avoid
-# having to deal with what changing NSPR itself might mean.
-
-# SH_DATE is a date with the format "%Y-%m-%d %T"
-EXTRA_MAKE_FLAGS += SH_DATE="$(shell $(PYTHON) -c 'd = "$(MOZ_BUILDID)"; print d[0:4]+"-"+d[4:6]+"-"+d[6:8]+" "+d[8:10]+":"+d[10:12]+":"+d[12:14]')"
-
-# SH_NOW is a date as a unix timestamp in µseconds
-EXTRA_MAKE_FLAGS += SH_NOW="$(shell $(PYTHON) -c 'import time, calendar; print calendar.timegm(time.strptime("$(MOZ_BUILDID)", "%Y%m%d%H%M%S"))')000000"
-
-clean distclean export::
- $(MAKE) -C $(DEPTH)/nsprpub $@ $(EXTRA_MAKE_FLAGS)
-
-target::
-# nspr's libs and install rule re-export headers, and that can race with other
-# compilations, so use a separate directory here. The headers are exported
-# during export anyways.
- $(MAKE) -C $(DEPTH)/nsprpub libs $(EXTRA_MAKE_FLAGS) dist_includedir=$(ABS_DIST)/nspr-include
- $(MAKE) -C $(DEPTH)/nsprpub install prefix=$(ABS_DIST)/sdk exec_prefix=$(ABS_DIST)/sdk bindir=$(ABS_DIST)/sdk/dummy includedir=$(ABS_DIST)/nspr-include libdir=$(ABS_DIST)/sdk/lib datadir=$(ABS_DIST)/sdk/dummy DESTDIR= $(EXTRA_MAKE_FLAGS)
- $(INSTALL) $(DEPTH)/nsprpub/config/nspr-config $(DIST)/sdk/bin
- $(RM) -rf $(DIST)/sdk/dummy
-ifneq (,$(filter WINNT,$(OS_ARCH))) # {
- $(RM) -f $(DIST)/sdk/lib/$(DLL_PREFIX)nspr4$(DLL_SUFFIX) $(DIST)/sdk/lib/$(DLL_PREFIX)plc4$(DLL_SUFFIX) $(DIST)/sdk/lib/$(DLL_PREFIX)plds4$(DLL_SUFFIX)
- $(RM) -f $(DIST)/sdk/lib/$(LIB_PREFIX)nspr4_s.$(LIB_SUFFIX) $(DIST)/sdk/lib/$(LIB_PREFIX)plc4_s.$(LIB_SUFFIX) $(DIST)/sdk/lib/$(LIB_PREFIX)plds4_s.$(LIB_SUFFIX)
-else # } {
- $(RM) -f $(DIST)/sdk/lib/$(LIB_PREFIX)nspr4.$(LIB_SUFFIX) $(DIST)/sdk/lib/$(LIB_PREFIX)plc4.$(LIB_SUFFIX) $(DIST)/sdk/lib/$(LIB_PREFIX)plds4.$(LIB_SUFFIX)
-endif # }
-
-endif
new file mode 100644
--- /dev/null
+++ b/config/external/nspr/_pr_bld.h
@@ -0,0 +1,1 @@
+/* This file intentionally left blank. */
new file mode 100644
--- /dev/null
+++ b/config/external/nspr/ds/moz.build
@@ -0,0 +1,33 @@
+# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+if CONFIG['MOZ_FOLD_LIBS']:
+ Library('plds4')
+ DEFINES['_NSPR_BUILD_'] = True
+else:
+ SharedLibrary('plds4')
+ SOURCES += ['/nsprpub/lib/ds/plvrsion.c']
+
+# We allow warnings for third-party code that can be updated from upstream.
+ALLOW_COMPILER_WARNINGS = True
+
+USE_LIBS += ['/config/external/nspr/pr/nspr4']
+
+LOCAL_INCLUDES += [
+ '/config/external/nspr',
+ '/nsprpub/pr/include',
+]
+
+EXPORTS.nspr += [
+ '/nsprpub/lib/ds/plarena.h',
+ '/nsprpub/lib/ds/plarenas.h',
+ '/nsprpub/lib/ds/plhash.h',
+]
+
+SOURCES += [
+ '/nsprpub/lib/ds/plarena.c',
+ '/nsprpub/lib/ds/plhash.c',
+]
new file mode 100644
--- /dev/null
+++ b/config/external/nspr/libc/moz.build
@@ -0,0 +1,44 @@
+# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+if CONFIG['MOZ_FOLD_LIBS']:
+ Library('plc4')
+ DEFINES['_NSPR_BUILD_'] = True
+else:
+ SharedLibrary('plc4')
+ SOURCES += ['/nsprpub/lib/libc/src/plvrsion.c']
+
+# We allow warnings for third-party code that can be updated from upstream.
+ALLOW_COMPILER_WARNINGS = True
+
+USE_LIBS += ['/config/external/nspr/pr/nspr4']
+
+LOCAL_INCLUDES += [
+ '/config/external/nspr',
+]
+
+EXPORTS.nspr += [
+ '/nsprpub/lib/libc/include/plbase64.h',
+ '/nsprpub/lib/libc/include/plerror.h',
+ '/nsprpub/lib/libc/include/plgetopt.h',
+ '/nsprpub/lib/libc/include/plstr.h',
+]
+
+SOURCES += [
+ '/nsprpub/lib/libc/src/base64.c',
+ '/nsprpub/lib/libc/src/plerror.c',
+ '/nsprpub/lib/libc/src/plgetopt.c',
+ '/nsprpub/lib/libc/src/strcase.c',
+ '/nsprpub/lib/libc/src/strcat.c',
+ '/nsprpub/lib/libc/src/strchr.c',
+ '/nsprpub/lib/libc/src/strcmp.c',
+ '/nsprpub/lib/libc/src/strcpy.c',
+ '/nsprpub/lib/libc/src/strdup.c',
+ '/nsprpub/lib/libc/src/strlen.c',
+ '/nsprpub/lib/libc/src/strpbrk.c',
+ '/nsprpub/lib/libc/src/strstr.c',
+ '/nsprpub/lib/libc/src/strtok.c',
+]
--- a/config/external/nspr/moz.build
+++ b/config/external/nspr/moz.build
@@ -1,21 +1,27 @@
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
Library('nspr')
-if CONFIG['MOZ_FOLD_LIBS']:
- # When folding libraries, nspr is actually in the nss library.
- USE_LIBS += [
- 'nss',
+if CONFIG['MOZ_BUILD_NSPR']:
+ DIRS += [
+ 'pr',
+ 'ds',
+ 'libc',
]
-elif CONFIG['MOZ_BUILD_NSPR']:
- USE_LIBS += [
- '/nsprpub/lib/ds/plds4',
- '/nsprpub/lib/libc/src/plc4',
- '/nsprpub/pr/src/nspr4',
- ]
+ if CONFIG['MOZ_FOLD_LIBS']:
+ # When folding libraries, nspr is actually in the nss library.
+ USE_LIBS += [
+ 'nss',
+ ]
+ else:
+ USE_LIBS += [
+ '/config/external/nspr/ds/plds4',
+ '/config/external/nspr/libc/plc4',
+ '/config/external/nspr/pr/nspr4',
+ ]
else:
OS_LIBS += CONFIG['NSPR_LIBS']
new file mode 100644
--- /dev/null
+++ b/config/external/nspr/pr/copy_file.py
@@ -0,0 +1,7 @@
+#!/usr/bin/env python
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+def main(fd, copy_from):
+ fd.write(open(copy_from, 'rb').read())
new file mode 100644
--- /dev/null
+++ b/config/external/nspr/pr/moz.build
@@ -0,0 +1,222 @@
+# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+if CONFIG['MOZ_FOLD_LIBS']:
+ Library('nspr4')
+else:
+ SharedLibrary('nspr4')
+
+# We allow warnings for third-party code that can be updated from upstream.
+ALLOW_COMPILER_WARNINGS = True
+
+DEFINES['_NSPR_BUILD_'] = True
+if CONFIG['OS_ARCH'] == 'Linux':
+ OS_LIBS += CONFIG['REALTIME_LIBS']
+ DEFINES.update({
+ 'LINUX': True,
+ 'HAVE_FCNTL_FILE_LOCKING': True,
+ 'HAVE_SYSCALL': True,
+ 'HAVE_SETPRIORITY': True,
+ 'HAVE_STRERROR': True,
+ 'HAVE_LCHOWN': True,
+ '_GNU_SOURCE': True,
+ })
+ SOURCES += ['/nsprpub/pr/src/md/unix/linux.c']
+ if CONFIG['CPU_ARCH'] == 'x86_64':
+ SOURCES += ['/nsprpub/pr/src/md/unix/os_Linux_x86_64.s']
+ elif CONFIG['CPU_ARCH'] == 'x86':
+ DEFINES['i386'] = True
+ SOURCES += ['/nsprpub/pr/src/md/unix/os_Linux_x86.s']
+ elif CONFIG['CPU_ARCH'] == 'ppc':
+ SOURCES += ['/nsprpub/pr/src/md/unix/os_Linux_ppc.s']
+elif CONFIG['OS_TARGET'] == 'Darwin':
+ DEFINES.update({
+ 'DARWIN': True,
+ 'HAVE_BSD_FLOCK': True,
+ 'HAVE_SOCKLEN_T': True,
+ })
+ SOURCES += [
+ '/nsprpub/pr/src/md/unix/darwin.c',
+ '/nsprpub/pr/src/md/unix/os_Darwin.s',
+ ]
+ if not CONFIG['MOZ_IOS']:
+ DEFINES['HAVE_CRT_EXTERNS_H'] = True
+elif CONFIG['OS_TARGET'] == 'WINNT':
+ OS_LIBS += [
+ 'advapi32',
+ 'ws2_32',
+ 'mswsock',
+ 'winmm',
+ ]
+ DEFINES.update({
+ 'XP_PC': True,
+ 'WIN32': True,
+ 'WIN95': True,
+ 'WINNT': False,
+ '_PR_GLOBAL_THREADS_ONLY': True,
+ })
+ if CONFIG['CPU_ARCH'] == 'x86_64':
+ DEFINES['_AMD64_'] = True
+ else:
+ DEFINES['_X86_'] = True
+
+
+LOCAL_INCLUDES += [
+ '/config/external/nspr',
+ '/nsprpub/pr/include',
+ '/nsprpub/pr/include/private',
+]
+
+SOURCES += [
+ '/nsprpub/pr/src/io/prfdcach.c',
+ '/nsprpub/pr/src/io/priometh.c',
+ '/nsprpub/pr/src/io/pripv6.c',
+ '/nsprpub/pr/src/io/prlayer.c',
+ '/nsprpub/pr/src/io/prlog.c',
+ '/nsprpub/pr/src/io/prmapopt.c',
+ '/nsprpub/pr/src/io/prmmap.c',
+ '/nsprpub/pr/src/io/prmwait.c',
+ '/nsprpub/pr/src/io/prpolevt.c',
+ '/nsprpub/pr/src/io/prprf.c',
+ '/nsprpub/pr/src/io/prscanf.c',
+ '/nsprpub/pr/src/io/prstdio.c',
+ '/nsprpub/pr/src/linking/prlink.c',
+ '/nsprpub/pr/src/malloc/prmalloc.c',
+ '/nsprpub/pr/src/malloc/prmem.c',
+ '/nsprpub/pr/src/md/prosdep.c',
+ '/nsprpub/pr/src/memory/prseg.c',
+ '/nsprpub/pr/src/memory/prshm.c',
+ '/nsprpub/pr/src/memory/prshma.c',
+ '/nsprpub/pr/src/misc/pralarm.c',
+ '/nsprpub/pr/src/misc/pratom.c',
+ '/nsprpub/pr/src/misc/praton.c',
+ '/nsprpub/pr/src/misc/prcountr.c',
+ '/nsprpub/pr/src/misc/prdtoa.c',
+ '/nsprpub/pr/src/misc/prenv.c',
+ '/nsprpub/pr/src/misc/prerr.c',
+ '/nsprpub/pr/src/misc/prerror.c',
+ '/nsprpub/pr/src/misc/prerrortable.c',
+ '/nsprpub/pr/src/misc/prinit.c',
+ '/nsprpub/pr/src/misc/prinrval.c',
+ '/nsprpub/pr/src/misc/pripc.c',
+ '/nsprpub/pr/src/misc/prlog2.c',
+ '/nsprpub/pr/src/misc/prlong.c',
+ '/nsprpub/pr/src/misc/prnetdb.c',
+ '/nsprpub/pr/src/misc/prolock.c',
+ '/nsprpub/pr/src/misc/prrng.c',
+ '/nsprpub/pr/src/misc/prsystem.c',
+ '/nsprpub/pr/src/misc/prthinfo.c',
+ '/nsprpub/pr/src/misc/prtime.c',
+ '/nsprpub/pr/src/misc/prtpool.c',
+ '/nsprpub/pr/src/misc/prtrace.c',
+ '/nsprpub/pr/src/threads/prcmon.c',
+ '/nsprpub/pr/src/threads/prrwlock.c',
+ '/nsprpub/pr/src/threads/prtpd.c',
+]
+
+if CONFIG['OS_TARGET'] != 'WINNT':
+ DEFINES['_PR_PTHREADS'] = True
+ SOURCES += [
+ '/nsprpub/pr/src/md/unix/unix.c',
+ '/nsprpub/pr/src/md/unix/unix_errors.c',
+ '/nsprpub/pr/src/md/unix/uxproces.c',
+ '/nsprpub/pr/src/md/unix/uxrng.c',
+ '/nsprpub/pr/src/md/unix/uxshm.c',
+ '/nsprpub/pr/src/md/unix/uxwrap.c',
+ '/nsprpub/pr/src/pthreads/ptio.c',
+ '/nsprpub/pr/src/pthreads/ptmisc.c',
+ '/nsprpub/pr/src/pthreads/ptsynch.c',
+ '/nsprpub/pr/src/pthreads/ptthread.c',
+ ]
+else:
+ SOURCES += [
+ '/nsprpub/pr/src/io/prdir.c',
+ '/nsprpub/pr/src/io/prfile.c',
+ '/nsprpub/pr/src/io/prio.c',
+ '/nsprpub/pr/src/io/prsocket.c',
+ '/nsprpub/pr/src/md/windows/ntgc.c',
+ '/nsprpub/pr/src/md/windows/ntinrval.c',
+ '/nsprpub/pr/src/md/windows/ntmisc.c',
+ '/nsprpub/pr/src/md/windows/ntsec.c',
+ '/nsprpub/pr/src/md/windows/ntsem.c',
+ '/nsprpub/pr/src/md/windows/w32ipcsem.c',
+ '/nsprpub/pr/src/md/windows/w32poll.c',
+ '/nsprpub/pr/src/md/windows/w32rng.c',
+ '/nsprpub/pr/src/md/windows/w32shm.c',
+ '/nsprpub/pr/src/md/windows/w95cv.c',
+ '/nsprpub/pr/src/md/windows/w95dllmain.c',
+ '/nsprpub/pr/src/md/windows/w95io.c',
+ '/nsprpub/pr/src/md/windows/w95sock.c',
+ '/nsprpub/pr/src/md/windows/w95thred.c',
+ '/nsprpub/pr/src/md/windows/win32_errors.c',
+ '/nsprpub/pr/src/misc/pripcsem.c',
+ '/nsprpub/pr/src/threads/combined/prucpu.c',
+ '/nsprpub/pr/src/threads/combined/prucv.c',
+ '/nsprpub/pr/src/threads/combined/prulock.c',
+ '/nsprpub/pr/src/threads/combined/prustack.c',
+ '/nsprpub/pr/src/threads/combined/pruthr.c',
+ '/nsprpub/pr/src/threads/prcthr.c',
+ '/nsprpub/pr/src/threads/prdump.c',
+ '/nsprpub/pr/src/threads/prmon.c',
+ '/nsprpub/pr/src/threads/prsem.c',
+ ]
+
+EXPORTS.nspr += [
+ '!prcpucfg.h',
+ '/nsprpub/pr/include/nspr.h',
+ '/nsprpub/pr/include/pratom.h',
+ '/nsprpub/pr/include/prbit.h',
+ '/nsprpub/pr/include/prclist.h',
+ '/nsprpub/pr/include/prcmon.h',
+ '/nsprpub/pr/include/prcountr.h',
+ '/nsprpub/pr/include/prcvar.h',
+ '/nsprpub/pr/include/prdtoa.h',
+ '/nsprpub/pr/include/prenv.h',
+ '/nsprpub/pr/include/prerr.h',
+ '/nsprpub/pr/include/prerror.h',
+ '/nsprpub/pr/include/prinet.h',
+ '/nsprpub/pr/include/prinit.h',
+ '/nsprpub/pr/include/prinrval.h',
+ '/nsprpub/pr/include/prio.h',
+ '/nsprpub/pr/include/pripcsem.h',
+ '/nsprpub/pr/include/prlink.h',
+ '/nsprpub/pr/include/prlock.h',
+ '/nsprpub/pr/include/prlog.h',
+ '/nsprpub/pr/include/prlong.h',
+ '/nsprpub/pr/include/prmem.h',
+ '/nsprpub/pr/include/prmon.h',
+ '/nsprpub/pr/include/prmwait.h',
+ '/nsprpub/pr/include/prnetdb.h',
+ '/nsprpub/pr/include/prolock.h',
+ '/nsprpub/pr/include/prpdce.h',
+ '/nsprpub/pr/include/prprf.h',
+ '/nsprpub/pr/include/prproces.h',
+ '/nsprpub/pr/include/prrng.h',
+ '/nsprpub/pr/include/prrwlock.h',
+ '/nsprpub/pr/include/prshm.h',
+ '/nsprpub/pr/include/prshma.h',
+ '/nsprpub/pr/include/prsystem.h',
+ '/nsprpub/pr/include/prthread.h',
+ '/nsprpub/pr/include/prtime.h',
+ '/nsprpub/pr/include/prtpool.h',
+ '/nsprpub/pr/include/prtrace.h',
+ '/nsprpub/pr/include/prtypes.h',
+ '/nsprpub/pr/include/prvrsion.h',
+ '/nsprpub/pr/include/prwin16.h',
+]
+
+EXPORTS.nspr.private += [
+ '/nsprpub/pr/include/private/pprio.h',
+ '/nsprpub/pr/include/private/pprthred.h',
+ '/nsprpub/pr/include/private/prpriv.h',
+]
+
+
+GENERATED_FILES += ['prcpucfg.h']
+GENERATED_FILES['prcpucfg.h'].script = 'copy_file.py'
+GENERATED_FILES['prcpucfg.h'].inputs = [
+ '/nsprpub/pr/include/' + CONFIG['NSPR_MDCPUCFG']
+]
--- a/config/external/nss/moz.build
+++ b/config/external/nss/moz.build
@@ -14,24 +14,20 @@ elif CONFIG['MOZ_FOLD_LIBS']:
# TODO: The library name can be changed when bug 845217 is fixed.
SHARED_LIBRARY_NAME = 'nss3'
SDK_LIBRARY = True
# Normally, there should be /something/ to ensure nspr is built
# before this directory, but since nspr is built during "export",
# it actually doesn't matter.
- if CONFIG['OS_TARGET'] == 'WINNT':
- suffix = '_s'
- else:
- suffix = ''
USE_LIBS += [
- 'static:/nsprpub/lib/ds/plds4%s' % suffix,
- 'static:/nsprpub/lib/libc/src/plc4%s' % suffix,
- 'static:/nsprpub/pr/src/nspr4%s' % suffix,
+ '/config/external/nspr/ds/plds4',
+ '/config/external/nspr/libc/plc4',
+ '/config/external/nspr/pr/nspr4',
]
OS_LIBS += CONFIG['REALTIME_LIBS']
SYMBOLS_FILE = 'nss.symbols'
else:
Library('nss')
USE_LIBS += [
--- a/configure.in
+++ b/configure.in
@@ -1976,17 +1976,17 @@ case "$target" in
AC_DEFINE(XP_MACOSX)
AC_DEFINE(XP_DARWIN)
_PLATFORM_DEFAULT_TOOLKIT='cairo-cocoa'
# The ExceptionHandling framework is needed for Objective-C exception
# logging code in nsObjCExceptions.h. Currently we only use that in debug
# builds.
MOZ_DEBUG_LDFLAGS="$MOZ_DEBUG_LDFLAGS -framework ExceptionHandling";
fi
- TARGET_NSPR_MDCPUCFG='\"md/_darwin.cfg\"'
+ NSPR_MDCPUCFG=md/_darwin.cfg
if test "x$lto_is_enabled" = "xyes"; then
echo "Skipping -dead_strip because lto is enabled."
dnl DTrace and -dead_strip don't interact well. See bug 403132.
dnl ===================================================================
elif test "x$enable_dtrace" = "xyes"; then
echo "Skipping -dead_strip because DTrace is enabled. See bug 403132."
else
@@ -2069,17 +2069,17 @@ ia64*-hpux*)
MOZ_B2G_FM=1
MOZ_SYNTH_PICO=1
else
_PLATFORM_DEFAULT_TOOLKIT=cairo-android
if test "$COMPILE_ENVIRONMENT"; then
MOZ_LINKER=1
fi
fi
- TARGET_NSPR_MDCPUCFG='\"md/_linux.cfg\"'
+ NSPR_MDCPUCFG=md/_linux.cfg
MOZ_GFX_OPTIMIZE_MOBILE=1
MOZ_OPTIMIZE_FLAGS="-Os -fno-reorder-functions"
if test -z "$CLANG_CC"; then
MOZ_OPTIMIZE_FLAGS="-freorder-blocks $MOZ_OPTIMIZE_FLAGS"
fi
;;
@@ -2093,17 +2093,17 @@ ia64*-hpux*)
elif test "$GNU_CC" -o "$GNU_CXX"; then
MOZ_PGO_OPTIMIZE_FLAGS="-O3"
MOZ_OPTIMIZE_FLAGS="-Os"
if test -z "$CLANG_CC"; then
MOZ_OPTIMIZE_FLAGS="-freorder-blocks $MOZ_OPTIMIZE_FLAGS"
fi
fi
- TARGET_NSPR_MDCPUCFG='\"md/_linux.cfg\"'
+ NSPR_MDCPUCFG=md/_linux.cfg
MOZ_MEMORY=1
case "${target_cpu}" in
alpha*)
CFLAGS="$CFLAGS -mieee"
CXXFLAGS="$CXXFLAGS -mieee"
;;
@@ -2338,17 +2338,17 @@ ia64*-hpux*)
dnl See http://support.microsoft.com/kb/143208 to use STL
AC_DEFINE(NOMINMAX)
TARGET_MD_ARCH=win32
_PLATFORM_DEFAULT_TOOLKIT='cairo-windows'
BIN_SUFFIX='.exe'
MOZ_USER_DIR="Mozilla"
dnl Hardcode to win95 for now - cls
- TARGET_NSPR_MDCPUCFG='\"md/_win95.cfg\"'
+ NSPR_MDCPUCFG=md/_win95.cfg
dnl set NO_X11 defines here as the general check is skipped on win32
no_x=yes
AC_DEFINE(NO_X11)
case "$host" in
*-mingw*)
if test -n "$L10NBASEDIR"; then
@@ -2436,17 +2436,17 @@ ia64*-hpux*)
DSO_LDOPTS='-shared -fPIC'
if test "$LIBRUNPATH"; then
DSO_LDOPTS="-R$LIBRUNPATH $DSO_LDOPTS"
fi
;;
*-solaris*)
AC_DEFINE(SOLARIS)
- TARGET_NSPR_MDCPUCFG='\"md/_solaris.cfg\"'
+ NSPR_MDCPUCFG=md/_solaris.cfg
MOZ_FIX_LINK_PATHS=
# $ORIGIN/.. is for shared libraries under components/ to locate shared
# libraries one level up (e.g. libnspr4.so)
if test "$SOLARIS_SUNPRO_CC"; then
LDFLAGS="$LDFLAGS -z ignore -R '\$\$ORIGIN:\$\$ORIGIN/..' -z lazyload -z combreloc -z muldefs"
LIBS="-lCrun -lCstd -lc $LIBS"
AC_DEFINE(NSCAP_DISABLE_DEBUG_PTR_TYPES)
CFLAGS="$CFLAGS -xlibmieee -xstrconst -xbuiltin=%all -D__FUNCTION__=__func__"
@@ -8794,16 +8794,17 @@ AC_SUBST(NSS_DISABLE_DBM)
OS_CFLAGS="$CFLAGS"
OS_CXXFLAGS="$CXXFLAGS"
OS_CPPFLAGS="$CPPFLAGS"
OS_COMPILE_CFLAGS="$COMPILE_CFLAGS"
OS_COMPILE_CXXFLAGS="$COMPILE_CXXFLAGS"
OS_LDFLAGS="$LDFLAGS"
OS_LIBS="$LIBS"
+TARGET_NSPR_MDCPUCFG=\"${NSPR_MDCPUCFG}\"
AC_SUBST(OS_CFLAGS)
AC_SUBST(OS_CXXFLAGS)
AC_SUBST(OS_CPPFLAGS)
AC_SUBST(OS_COMPILE_CFLAGS)
AC_SUBST(OS_COMPILE_CXXFLAGS)
AC_SUBST(OS_LDFLAGS)
AC_SUBST(OS_LIBS)
AC_SUBST(CROSS_COMPILE)
@@ -8821,16 +8822,17 @@ AC_SUBST(HOST_LD)
AC_SUBST(HOST_RANLIB)
AC_SUBST(HOST_NSPR_MDCPUCFG)
AC_SUBST(HOST_BIN_SUFFIX)
AC_SUBST(HOST_OS_ARCH)
AC_SUBST(TARGET_CPU)
AC_SUBST(TARGET_VENDOR)
AC_SUBST(TARGET_OS)
+AC_SUBST(NSPR_MDCPUCFG)
AC_SUBST(TARGET_NSPR_MDCPUCFG)
AC_SUBST(TARGET_MD_ARCH)
AC_SUBST(TARGET_XPCOM_ABI)
AC_SUBST(OS_TARGET)
AC_SUBST(OS_ARCH)
AC_SUBST(OS_RELEASE)
AC_SUBST(OS_TEST)
AC_SUBST(CPU_ARCH)
@@ -9123,18 +9125,16 @@ if test -n "$_subconfigure_subdir"; then
ac_configure_args="$_save_ac_configure_args"
srcdir="$_save_srcdir"
fi
if test "$COMPILE_ENVIRONMENT"; then
export WRAP_LDFLAGS
-MOZ_SUBCONFIGURE_NSPR()
-
dnl ========================================================
dnl = Setup a nice relatively clean build environment for
dnl = sub-configures.
dnl ========================================================
CC="$_SUBDIR_CC"
CXX="$_SUBDIR_CXX"
CFLAGS="$_SUBDIR_CFLAGS"
CPPFLAGS="$_SUBDIR_CPPFLAGS"
--- a/js/src/configure.in
+++ b/js/src/configure.in
@@ -1488,16 +1488,17 @@ case "$target" in
MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
MOZ_OPTIMIZE_FLAGS="-O3 -fno-stack-protector"
CFLAGS="$CFLAGS -fno-common"
CXXFLAGS="$CXXFLAGS -fno-common"
DLL_SUFFIX=".dylib"
DSO_LDOPTS=''
STRIP="$STRIP -x -S"
_PLATFORM_DEFAULT_TOOLKIT='cairo-cocoa'
+ NSPR_MDCPUCFG=md/_darwin.cfg
TARGET_NSPR_MDCPUCFG='\"md/_darwin.cfg\"'
LDFLAGS="$LDFLAGS -lobjc"
# The ExceptionHandling framework is needed for Objective-C exception
# logging code in nsObjCExceptions.h. Currently we only use that in debug
# builds.
_SAVE_LDFLAGS=$LDFLAGS
AC_MSG_CHECKING([for -framework ExceptionHandling])
LDFLAGS="$LDFLAGS -framework ExceptionHandling"
@@ -1570,16 +1571,17 @@ ia64*-hpux*)
MOZ_POST_PROGRAM_COMMAND='chatr +s enable'
AC_DEFINE(NSCAP_DISABLE_DEBUG_PTR_TYPES)
;;
*-android*|*-linuxandroid*)
AC_DEFINE(NO_PW_GECOS)
no_x=yes
_PLATFORM_DEFAULT_TOOLKIT=cairo-android
+ NSPR_MDCPUCFG=md/_linux.cfg
TARGET_NSPR_MDCPUCFG='\"md/_linux.cfg\"'
MOZ_GFX_OPTIMIZE_MOBILE=1
MOZ_OPTIMIZE_FLAGS="-O3 -fno-reorder-functions"
if test -z "$CLANG_CC"; then
MOZ_OPTIMIZE_FLAGS="-freorder-blocks $MOZ_OPTIMIZE_FLAGS"
fi
# The Maemo builders don't know about this flag
@@ -1596,16 +1598,17 @@ ia64*-hpux*)
elif test "$GNU_CC" -o "$GNU_CXX"; then
MOZ_PGO_OPTIMIZE_FLAGS="-O3"
MOZ_OPTIMIZE_FLAGS="-O3"
if test -z "$CLANG_CC"; then
MOZ_OPTIMIZE_FLAGS="-freorder-blocks $MOZ_OPTIMIZE_FLAGS"
fi
fi
+ NSPR_MDCPUCFG=md/_linux.cfg
TARGET_NSPR_MDCPUCFG='\"md/_linux.cfg\"'
case "${target_cpu}" in
alpha*)
CFLAGS="$CFLAGS -mieee"
CXXFLAGS="$CXXFLAGS -mieee"
;;
esac
@@ -1807,16 +1810,17 @@ ia64*-hpux*)
AC_DEFINE(STDC_HEADERS)
AC_DEFINE(WIN32_LEAN_AND_MEAN)
TARGET_MD_ARCH=win32
_PLATFORM_DEFAULT_TOOLKIT='cairo-windows'
BIN_SUFFIX='.exe'
MOZ_USER_DIR="Mozilla"
dnl Hardcode to win95 for now - cls
+ NSPR_MDCPUCFG=md/_win95.cfg
TARGET_NSPR_MDCPUCFG='\"md/_win95.cfg\"'
dnl set NO_X11 defines here as the general check is skipped on win32
no_x=yes
AC_DEFINE(NO_X11)
case "$host_os" in
cygwin*|msvc*|mks*)
@@ -1886,16 +1890,17 @@ ia64*-hpux*)
DSO_LDOPTS='-shared -fPIC'
if test "$LIBRUNPATH"; then
DSO_LDOPTS="-R$LIBRUNPATH $DSO_LDOPTS"
fi
;;
*-solaris*)
AC_DEFINE(SOLARIS)
+ NSPR_MDCPUCFG=md/_solaris.cfg
TARGET_NSPR_MDCPUCFG='\"md/_solaris.cfg\"'
if test -z "$CROSS_COMPILE" && pkginfo -q SUNWpr && pkginfo -q SUNWprd; then
NO_NSPR_CONFIG_SYSTEM_LDFLAGS="-L/usr/lib/mps -R/usr/lib/mps -lnspr4"
NO_NSPR_CONFIG_SYSTEM_CFLAGS="-I/usr/include/mps"
NO_NSPR_CONFIG_SYSTEM_VERSION=["`pkgparam SUNWpr SUNW_PRODVERS | sed -e 's/^[1-9][0-9]*\.[0-9][0-9]*$/&.0/'`"]
fi
MOZ_FIX_LINK_PATHS=
# $ORIGIN/.. is for shared libraries under components/ to locate shared
@@ -3715,16 +3720,17 @@ AC_SUBST(HOST_AR_FLAGS)
AC_SUBST(HOST_LD)
AC_SUBST(HOST_RANLIB)
AC_SUBST(HOST_BIN_SUFFIX)
AC_SUBST(HOST_OS_ARCH)
AC_SUBST(TARGET_CPU)
AC_SUBST(TARGET_VENDOR)
AC_SUBST(TARGET_OS)
+AC_SUBST(NSPR_MDCPUCFG)
AC_SUBST(TARGET_NSPR_MDCPUCFG)
AC_SUBST(TARGET_MD_ARCH)
AC_SUBST(TARGET_XPCOM_ABI)
AC_SUBST(OS_TARGET)
AC_SUBST(OS_ARCH)
AC_SUBST(OS_RELEASE)
AC_SUBST(OS_TEST)
AC_SUBST(CPU_ARCH)
@@ -3835,19 +3841,16 @@ if test -n "$GNU_CC"; then
JS_CONFIG_MOZ_JS_LIBS='-L${libdir} -l${JS_LIBRARY_NAME}'
else
JS_CONFIG_MOZ_JS_LIBS='${libdir}/${JS_LIBRARY_NAME}.lib'
fi
AC_SUBST(JS_LIBRARY_NAME)
AC_SUBST(JS_CONFIG_MOZ_JS_LIBS)
AC_SUBST(JS_CONFIG_LIBS)
-if test -n "$MOZ_BUILD_NSPR"; then
- MOZ_SUBCONFIGURE_NSPR()
-fi
MOZ_SUBCONFIGURE_FFI()
MOZ_SUBCONFIGURE_JEMALLOC()
# Avoid using obsolete NSPR features
AC_DEFINE(NO_NSPR_10_SUPPORT)
dnl Spit out some output
dnl ========================================================