mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Merge backout.
This commit is contained in:
commit
54232c95fb
2
CLOBBER
2
CLOBBER
@ -15,4 +15,4 @@
|
||||
#
|
||||
# Note: The description below will be part of the error message shown to users.
|
||||
#
|
||||
Bug 838652 requires a clobber
|
||||
Bug 648407 - Fold NSPR, NSS and SQLite libraries all together on B2G, Android, OSX and Windows
|
||||
|
@ -52,3 +52,4 @@ MOZ_PAY=1
|
||||
MOZ_TOOLKIT_SEARCH=
|
||||
MOZ_PLACES=
|
||||
MOZ_B2G=1
|
||||
MOZ_FOLD_LIBS=1
|
||||
|
@ -49,10 +49,12 @@
|
||||
#ifndef MOZ_STATIC_JS
|
||||
@BINPATH@/@DLL_PREFIX@mozjs@DLL_SUFFIX@
|
||||
#endif
|
||||
#ifndef MOZ_FOLD_LIBS
|
||||
@BINPATH@/@DLL_PREFIX@plc4@DLL_SUFFIX@
|
||||
@BINPATH@/@DLL_PREFIX@plds4@DLL_SUFFIX@
|
||||
@BINPATH@/@DLL_PREFIX@xpcom@DLL_SUFFIX@
|
||||
@BINPATH@/@DLL_PREFIX@nspr4@DLL_SUFFIX@
|
||||
#endif
|
||||
@BINPATH@/@DLL_PREFIX@xpcom@DLL_SUFFIX@
|
||||
@BINPATH@/@DLL_PREFIX@mozalloc@DLL_SUFFIX@
|
||||
#ifdef MOZ_DMD
|
||||
@BINPATH@/@DLL_PREFIX@dmd@DLL_SUFFIX@
|
||||
@ -640,11 +642,13 @@
|
||||
@BINPATH@/components/pipnss.xpt
|
||||
@BINPATH@/components/pippki.xpt
|
||||
@BINPATH@/@DLL_PREFIX@nss3@DLL_SUFFIX@
|
||||
#ifndef MOZ_FOLD_LIBS
|
||||
@BINPATH@/@DLL_PREFIX@nssutil3@DLL_SUFFIX@
|
||||
@BINPATH@/@DLL_PREFIX@smime3@DLL_SUFFIX@
|
||||
@BINPATH@/@DLL_PREFIX@ssl3@DLL_SUFFIX@
|
||||
#endif
|
||||
@BINPATH@/@DLL_PREFIX@softokn3@DLL_SUFFIX@
|
||||
@BINPATH@/@DLL_PREFIX@freebl3@DLL_SUFFIX@
|
||||
@BINPATH@/@DLL_PREFIX@ssl3@DLL_SUFFIX@
|
||||
#ifndef CROSS_COMPILE
|
||||
@BINPATH@/@DLL_PREFIX@freebl3.chk
|
||||
@BINPATH@/@DLL_PREFIX@softokn3.chk
|
||||
|
@ -1221,3 +1221,9 @@ pref("dom.identity.enabled", false);
|
||||
|
||||
// Override the Gecko-default value of false for Firefox.
|
||||
pref("plain_text.wrap_long_lines", true);
|
||||
|
||||
#ifndef RELEASE_BUILD
|
||||
// Enable Web Audio for Firefox Desktop in Nightly and Aurora
|
||||
pref("media.webaudio.enabled", true);
|
||||
#endif
|
||||
|
||||
|
@ -54,3 +54,6 @@ MOZ_EXTENSION_MANAGER=1
|
||||
MOZ_APP_STATIC_INI=1
|
||||
MOZ_WEBAPP_RUNTIME=1
|
||||
MOZ_MEDIA_NAVIGATOR=1
|
||||
if test "$OS_TARGET" = "WINNT" -o "$OS_TARGET" = "Darwin"; then
|
||||
MOZ_FOLD_LIBS=1
|
||||
fi
|
||||
|
@ -63,10 +63,12 @@
|
||||
@BINPATH@/@DLL_PREFIX@mozjs@DLL_SUFFIX@
|
||||
#endif
|
||||
#ifndef MOZ_NATIVE_NSPR
|
||||
#ifndef MOZ_FOLD_LIBS
|
||||
@BINPATH@/@DLL_PREFIX@nspr4@DLL_SUFFIX@
|
||||
@BINPATH@/@DLL_PREFIX@plc4@DLL_SUFFIX@
|
||||
@BINPATH@/@DLL_PREFIX@plds4@DLL_SUFFIX@
|
||||
#endif
|
||||
#endif
|
||||
@BINPATH@/@DLL_PREFIX@xpcom@DLL_SUFFIX@
|
||||
#ifdef XP_MACOSX
|
||||
@BINPATH@/XUL
|
||||
@ -120,8 +122,10 @@
|
||||
@BINPATH@/platform.ini
|
||||
#ifndef XP_OS2
|
||||
#ifndef MOZ_NATIVE_SQLITE
|
||||
#ifndef MOZ_FOLD_LIBS
|
||||
@BINPATH@/@DLL_PREFIX@mozsqlite3@DLL_SUFFIX@
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
@BINPATH@/mozsqlt3@DLL_SUFFIX@
|
||||
#endif
|
||||
@ -656,11 +660,13 @@
|
||||
#ifndef NSS_DISABLE_DBM
|
||||
@BINPATH@/@DLL_PREFIX@nssdbm3@DLL_SUFFIX@
|
||||
#endif
|
||||
#ifndef MOZ_FOLD_LIBS
|
||||
@BINPATH@/@DLL_PREFIX@nssutil3@DLL_SUFFIX@
|
||||
@BINPATH@/@DLL_PREFIX@smime3@DLL_SUFFIX@
|
||||
@BINPATH@/@DLL_PREFIX@softokn3@DLL_SUFFIX@
|
||||
@BINPATH@/@DLL_PREFIX@ssl3@DLL_SUFFIX@
|
||||
#endif
|
||||
@BINPATH@/@DLL_PREFIX@softokn3@DLL_SUFFIX@
|
||||
#endif
|
||||
@BINPATH@/chrome/pippki@JAREXT@
|
||||
@BINPATH@/chrome/pippki.manifest
|
||||
@BINPATH@/components/pipboot.xpt
|
||||
|
@ -57,6 +57,7 @@ def InvokeClWithDependencyGeneration(cmdline):
|
||||
f = open(depstarget, "w")
|
||||
for dep in sorted(deps):
|
||||
print >>f, "%s: %s" % (target, dep)
|
||||
print >>f, "%s:" % dep
|
||||
|
||||
if __name__ == "__main__":
|
||||
InvokeClWithDependencyGeneration(sys.argv[1:])
|
||||
|
37
build/unix/add_phony_targets.py
Normal file
37
build/unix/add_phony_targets.py
Normal file
@ -0,0 +1,37 @@
|
||||
# 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/.
|
||||
|
||||
import pymake.data
|
||||
import pymake.parser
|
||||
import pymake.parserdata
|
||||
import sys
|
||||
|
||||
'''
|
||||
Modifies the output of Sun Studio's -xM to look more like the output
|
||||
of gcc's -MD -MP, adding phony targets for dependencies.
|
||||
'''
|
||||
|
||||
|
||||
def add_phony_targets(path):
|
||||
print path
|
||||
deps = set()
|
||||
targets = set()
|
||||
for stmt in pymake.parser.parsefile(path):
|
||||
if isinstance(stmt, pymake.parserdata.Rule):
|
||||
assert isinstance(stmt.depexp, pymake.data.StringExpansion)
|
||||
assert isinstance(stmt.targetexp, pymake.data.StringExpansion)
|
||||
for d in stmt.depexp.s.split():
|
||||
deps.add(d)
|
||||
for t in stmt.targetexp.s.split():
|
||||
targets.add(t)
|
||||
phony_targets = deps - targets
|
||||
if not phony_targets:
|
||||
return
|
||||
with open(path, 'a') as f:
|
||||
f.writelines('%s:\n' % d for d in phony_targets)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
for f in sys.argv[1:]:
|
||||
add_phony_targets(f)
|
@ -411,7 +411,17 @@ void maybe_split_segment(Elf *elf, ElfSegment *segment, bool fill)
|
||||
// PT_LOAD.
|
||||
if (!fill)
|
||||
break;
|
||||
// Insert dummy segment to normalize the entire Elf with the header
|
||||
// sizes adjusted, before inserting a filler segment.
|
||||
{
|
||||
memset(&phdr, 0, sizeof(phdr));
|
||||
ElfSegment dummySegment(&phdr);
|
||||
elf->insertSegmentAfter(segment, &dummySegment);
|
||||
elf->normalize();
|
||||
elf->removeSegment(&dummySegment);
|
||||
}
|
||||
ElfSection *previous = section->getPrevious();
|
||||
phdr.p_type = PT_LOAD;
|
||||
phdr.p_vaddr = (previous->getAddr() + previous->getSize() + segment->getAlign() - 1) & ~(segment->getAlign() - 1);
|
||||
phdr.p_paddr = phdr.p_vaddr + segment->getVPDiff();
|
||||
phdr.p_flags = 0;
|
||||
@ -422,6 +432,8 @@ void maybe_split_segment(Elf *elf, ElfSegment *segment, bool fill)
|
||||
newSegment = new ElfSegment(&phdr);
|
||||
assert(newSegment->isElfHackFillerSegment());
|
||||
elf->insertSegmentAfter(segment, newSegment);
|
||||
} else {
|
||||
elf->normalize();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -70,18 +70,22 @@ class ExpandArgsMore(ExpandArgs):
|
||||
if os.path.splitext(arg)[1] == conf.LIB_SUFFIX:
|
||||
if os.path.exists(arg + conf.LIBS_DESC_SUFFIX):
|
||||
newlist += self._extract(self._expand_desc(arg))
|
||||
elif os.path.exists(arg) and len(ar_extract):
|
||||
continue
|
||||
elif os.path.exists(arg) and (len(ar_extract) or conf.AR == 'lib'):
|
||||
tmp = tempfile.mkdtemp(dir=os.curdir)
|
||||
self.tmp.append(tmp)
|
||||
subprocess.call(ar_extract + [os.path.abspath(arg)], cwd=tmp)
|
||||
if conf.AR == 'lib':
|
||||
out = subprocess.check_output([conf.AR, '-NOLOGO', '-LIST', arg])
|
||||
for l in out.splitlines():
|
||||
subprocess.call([conf.AR, '-NOLOGO', '-EXTRACT:%s' % l, os.path.abspath(arg)], cwd=tmp)
|
||||
else:
|
||||
subprocess.call(ar_extract + [os.path.abspath(arg)], cwd=tmp)
|
||||
objs = []
|
||||
for root, dirs, files in os.walk(tmp):
|
||||
objs += [relativize(os.path.join(root, f)) for f in files if isObject(f)]
|
||||
newlist += objs
|
||||
else:
|
||||
newlist += [arg]
|
||||
else:
|
||||
newlist += [arg]
|
||||
newlist += sorted(objs)
|
||||
continue
|
||||
newlist += [arg]
|
||||
return newlist
|
||||
|
||||
def makelist(self):
|
||||
@ -325,6 +329,9 @@ def main():
|
||||
with open(options.depend, 'w') as depfile:
|
||||
depfile.write("%s : %s\n" % (options.target, ' '.join(dep for dep in deps if os.path.isfile(dep) and dep != options.target)))
|
||||
|
||||
for dep in deps:
|
||||
if os.path.isfile(dep) and dep != options.target:
|
||||
depfile.write("%s :\n" % dep)
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
@ -44,4 +44,7 @@ if __name__ == '__main__':
|
||||
if options.depend:
|
||||
ensureParentDir(options.depend)
|
||||
with open(options.depend, 'w') as depfile:
|
||||
depfile.write("%s : %s\n" % (options.output, ' '.join(ExpandLibsDeps(args))))
|
||||
deps = ExpandLibsDeps(args)
|
||||
depfile.write("%s : %s\n" % (options.output, ' '.join(deps)))
|
||||
for dep in deps:
|
||||
depfile.write("%s :\n" % dep)
|
||||
|
@ -22,8 +22,21 @@ endif
|
||||
# Copy NSPR to the SDK
|
||||
ABS_DIST = $(call core_abspath,$(DIST))
|
||||
|
||||
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)'
|
||||
endif
|
||||
|
||||
libs export clean distclean::
|
||||
$(MAKE) -C $(DEPTH)/nsprpub $@ $(EXTRA_MAKE_FLAGS)
|
||||
|
||||
libs::
|
||||
$(MAKE) -C $(DEPTH)/nsprpub install prefix=$(ABS_DIST)/sdk exec_prefix=$(ABS_DIST)/sdk bindir=$(ABS_DIST)/sdk/dummy includedir=$(ABS_DIST)/include/nspr libdir=$(ABS_DIST)/sdk/lib datadir=$(ABS_DIST)/sdk/dummy DESTDIR=
|
||||
$(MAKE) -C $(DEPTH)/nsprpub install prefix=$(ABS_DIST)/sdk exec_prefix=$(ABS_DIST)/sdk bindir=$(ABS_DIST)/sdk/dummy includedir=$(ABS_DIST)/include/nspr 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 OS2 WINNT,$(OS_ARCH))) # {
|
||||
|
@ -986,17 +986,19 @@ define MAKE_DEPS_AUTO_CC
|
||||
if test -d $(@D); then \
|
||||
echo "Building deps for $< using Sun Studio cc"; \
|
||||
$(CC) $(COMPILE_CFLAGS) -xM $< >$(_MDDEPFILE) ; \
|
||||
$(PYTHON) $(topsrcdir)/build/unix/add_phony_targets.py $(_MDDEPFILE) ; \
|
||||
fi
|
||||
endef
|
||||
define MAKE_DEPS_AUTO_CXX
|
||||
if test -d $(@D); then \
|
||||
echo "Building deps for $< using Sun Studio CC"; \
|
||||
$(CXX) $(COMPILE_CXXFLAGS) -xM $< >$(_MDDEPFILE) ; \
|
||||
$(PYTHON) $(topsrcdir)/build/unix/add_phony_targets.py $(_MDDEPFILE) ; \
|
||||
fi
|
||||
endef
|
||||
endif # Sun Studio on Solaris
|
||||
|
||||
$(OBJS) $(HOST_OBJS): $(GLOBAL_DEPS)
|
||||
$(OBJS) $(HOST_OBJS) $(PROGOBJS) $(HOST_PROGOBJS): $(GLOBAL_DEPS)
|
||||
|
||||
# Rules for building native targets must come first because of the host_ prefix
|
||||
$(HOST_COBJS): host_%.$(OBJ_SUFFIX): %.c
|
||||
@ -1613,14 +1615,7 @@ ifneq (,$(filter-out all chrome default export realchrome tools clean clobber cl
|
||||
MDDEPEND_FILES := $(strip $(wildcard $(foreach file,$(OBJS) $(PROGOBJS) $(HOST_OBJS) $(HOST_PROGOBJS) $(TARGETS) $(XPIDLSRCS:.idl=.h) $(XPIDLSRCS:.idl=.xpt),$(MDDEPDIR)/$(notdir $(file)).pp) $(addprefix $(MDDEPDIR)/,$(EXTRA_MDDEPEND_FILES))))
|
||||
|
||||
ifneq (,$(MDDEPEND_FILES))
|
||||
# The script mddepend.pl checks the dependencies and writes to stdout
|
||||
# one rule to force out-of-date objects. For example,
|
||||
# foo.o boo.o: FORCE
|
||||
# The script has an advantage over including the *.pp files directly
|
||||
# because it handles the case when header files are removed from the build.
|
||||
# 'make' would complain that there is no way to build missing headers.
|
||||
ALL_PP_RESULTS = $(shell $(PERL) $(BUILD_TOOLS)/mddepend.pl - $(MDDEPEND_FILES))
|
||||
$(eval $(ALL_PP_RESULTS))
|
||||
include $(MDDEPEND_FILES)
|
||||
endif
|
||||
|
||||
endif
|
||||
|
@ -10,6 +10,7 @@ import mozunit
|
||||
from UserString import UserString
|
||||
# Create a controlled configuration for use by expandlibs
|
||||
config_win = {
|
||||
'AR': 'lib',
|
||||
'AR_EXTRACT': '',
|
||||
'DLL_PREFIX': '',
|
||||
'LIB_PREFIX': '',
|
||||
@ -21,6 +22,7 @@ config_win = {
|
||||
'EXPAND_LIBS_LIST_STYLE': 'list',
|
||||
}
|
||||
config_unix = {
|
||||
'AR': 'ar',
|
||||
'AR_EXTRACT': 'ar -x',
|
||||
'DLL_PREFIX': 'lib',
|
||||
'LIB_PREFIX': 'lib',
|
||||
@ -250,17 +252,46 @@ class TestExpandArgsMore(TestExpandInit):
|
||||
subprocess_call = subprocess.call
|
||||
extracted = {}
|
||||
def call(args, **kargs):
|
||||
# The command called is always AR_EXTRACT
|
||||
ar_extract = config.AR_EXTRACT.split()
|
||||
self.assertRelEqual(args[:len(ar_extract)], ar_extract)
|
||||
if config.AR == 'lib':
|
||||
self.assertEqual(args[:2], [config.AR, '-NOLOGO'])
|
||||
self.assertTrue(args[2].startswith('-EXTRACT:'))
|
||||
extract = [args[2][len('-EXTRACT:'):]]
|
||||
self.assertTrue(extract)
|
||||
args = args[3:]
|
||||
else:
|
||||
# The command called is always AR_EXTRACT
|
||||
ar_extract = config.AR_EXTRACT.split()
|
||||
self.assertEqual(args[:len(ar_extract)], ar_extract)
|
||||
args = args[len(ar_extract):]
|
||||
# Remaining argument is always one library
|
||||
self.assertRelEqual([os.path.splitext(arg)[1] for arg in args[len(ar_extract):]], [config.LIB_SUFFIX])
|
||||
# Simulate AR_EXTRACT extracting one object file for the library
|
||||
lib = os.path.splitext(os.path.basename(args[len(ar_extract)]))[0]
|
||||
extracted[lib] = os.path.join(kargs['cwd'], "{0}".format(Obj(lib)))
|
||||
self.touch([extracted[lib]])
|
||||
self.assertEqual(len(args), 1)
|
||||
arg = args[0]
|
||||
self.assertEqual(os.path.splitext(arg)[1], config.LIB_SUFFIX)
|
||||
# Simulate file extraction
|
||||
lib = os.path.splitext(os.path.basename(arg))[0]
|
||||
if config.AR != 'lib':
|
||||
extract = [lib, lib + '2']
|
||||
extract = [os.path.join(kargs['cwd'], f) for f in extract]
|
||||
if config.AR != 'lib':
|
||||
extract = [Obj(f) for f in extract]
|
||||
if not lib in extracted:
|
||||
extracted[lib] = []
|
||||
extracted[lib].extend(extract)
|
||||
self.touch(extract)
|
||||
subprocess.call = call
|
||||
|
||||
def check_output(args, **kargs):
|
||||
# The command called is always AR
|
||||
ar = config.AR
|
||||
self.assertEqual(args[0:3], [ar, '-NOLOGO', '-LIST'])
|
||||
# Remaining argument is always one library
|
||||
self.assertRelEqual([os.path.splitext(arg)[1] for arg in args[3:]],
|
||||
[config.LIB_SUFFIX])
|
||||
# Simulate LIB -NOLOGO -LIST
|
||||
lib = os.path.splitext(os.path.basename(args[3]))[0]
|
||||
return '%s\n%s\n' % (Obj(lib), Obj(lib + '2'))
|
||||
subprocess.check_output = check_output
|
||||
|
||||
# ExpandArgsMore does the same as ExpandArgs
|
||||
self.touch([self.tmpfile('liby', Lib('y'))])
|
||||
with ExpandArgsMore(['foo', '-bar'] + self.arg_files + [self.tmpfile('liby', Lib('y'))]) as args:
|
||||
@ -271,15 +302,16 @@ class TestExpandArgsMore(TestExpandInit):
|
||||
args.extract()
|
||||
|
||||
files = self.files + self.liby_files + self.libx_files
|
||||
if not len(config.AR_EXTRACT):
|
||||
# If we don't have an AR_EXTRACT, extract() expands libraries with a
|
||||
# descriptor when the corresponding library exists (which ExpandArgs
|
||||
# alone doesn't)
|
||||
self.assertRelEqual(args, ['foo', '-bar'] + files)
|
||||
else:
|
||||
# With AR_EXTRACT, it uses the descriptors when there are, and actually
|
||||
# extracts the remaining libraries
|
||||
self.assertRelEqual(args, ['foo', '-bar'] + [extracted[os.path.splitext(os.path.basename(f))[0]] if f.endswith(config.LIB_SUFFIX) else f for f in files])
|
||||
# With AR_EXTRACT, it uses the descriptors when there are, and
|
||||
# actually
|
||||
# extracts the remaining libraries
|
||||
extracted_args = []
|
||||
for f in files:
|
||||
if f.endswith(config.LIB_SUFFIX):
|
||||
extracted_args.extend(sorted(extracted[os.path.splitext(os.path.basename(f))[0]]))
|
||||
else:
|
||||
extracted_args.append(f)
|
||||
self.assertRelEqual(args, ['foo', '-bar'] + extracted_args)
|
||||
|
||||
tmp = args.tmp
|
||||
# Check that all temporary files are properly removed
|
||||
|
18
configure.in
18
configure.in
@ -290,7 +290,7 @@ if test -n "$CROSS_COMPILE" -a "$target" != "$host"; then
|
||||
_SAVE_LDFLAGS="$LDFLAGS"
|
||||
|
||||
AC_MSG_CHECKING([for host c compiler])
|
||||
AC_CHECK_PROGS(HOST_CC, $HOST_CC gcc cc /usr/ucb/cc cl icc, "")
|
||||
AC_CHECK_PROGS(HOST_CC, $HOST_CC cc gcc /usr/ucb/cc cl icc, "")
|
||||
if test -z "$HOST_CC"; then
|
||||
AC_MSG_ERROR([no acceptable c compiler found in \$PATH])
|
||||
fi
|
||||
@ -3965,12 +3965,17 @@ if test -n "$MOZ_NATIVE_NSS"; then
|
||||
NSS_LIBS="$NSS_LIBS -lcrmf"
|
||||
else
|
||||
NSS_CFLAGS='-I$(LIBXUL_DIST)/include/nss'
|
||||
if test -z "$IMPORT_LIB_SUFFIX"; then
|
||||
DLL_LINK_SUFFIX='$(DLL_SUFFIX)'
|
||||
else
|
||||
DLL_LINK_SUFFIX='.$(IMPORT_LIB_SUFFIX)'
|
||||
fi
|
||||
NSS_DEP_LIBS="\
|
||||
\$(LIBXUL_DIST)/lib/\$(LIB_PREFIX)crmf.\$(LIB_SUFFIX) \
|
||||
\$(LIBXUL_DIST)/lib/\$(DLL_PREFIX)smime$NSS_VERSION\$(DLL_SUFFIX) \
|
||||
\$(LIBXUL_DIST)/lib/\$(DLL_PREFIX)ssl$NSS_VERSION\$(DLL_SUFFIX) \
|
||||
\$(LIBXUL_DIST)/lib/\$(DLL_PREFIX)nss$NSS_VERSION\$(DLL_SUFFIX) \
|
||||
\$(LIBXUL_DIST)/lib/\$(DLL_PREFIX)nssutil$NSS_VERSION\$(DLL_SUFFIX)"
|
||||
\$(LIBXUL_DIST)/lib/\$(DLL_PREFIX)smime$NSS_VERSION${DLL_LINK_SUFFIX} \
|
||||
\$(LIBXUL_DIST)/lib/\$(DLL_PREFIX)ssl$NSS_VERSION${DLL_LINK_SUFFIX} \
|
||||
\$(LIBXUL_DIST)/lib/\$(DLL_PREFIX)nss$NSS_VERSION${DLL_LINK_SUFFIX} \
|
||||
\$(LIBXUL_DIST)/lib/\$(DLL_PREFIX)nssutil$NSS_VERSION${DLL_LINK_SUFFIX}"
|
||||
|
||||
if test -z "$GNU_CC" -a "$OS_ARCH" = "WINNT" -o "$OS_ARCH" = "OS2"; then
|
||||
NSS_LIBS="\
|
||||
@ -7930,7 +7935,7 @@ dnl ========================================================
|
||||
MOZ_ARG_HEADER(Build dependencies)
|
||||
|
||||
if test "$GNU_CC" -a "$GNU_CXX"; then
|
||||
_DEPEND_CFLAGS='$(filter-out %/.pp,-MD -MF $(MDDEPDIR)/$(@F).pp)'
|
||||
_DEPEND_CFLAGS='-MD -MP -MF $(MDDEPDIR)/$(@F).pp'
|
||||
dnl Sun Studio on Solaris use -xM instead of -MD, see config/rules.mk
|
||||
elif test "$SOLARIS_SUNPRO_CC"; then
|
||||
_DEPEND_CFLAGS=
|
||||
@ -8861,6 +8866,7 @@ AC_SUBST(LIBJPEG_TURBO_X64_ASM)
|
||||
AC_SUBST(LIBJPEG_TURBO_ARM_ASM)
|
||||
|
||||
AC_SUBST(MOZ_PACKAGE_JSSHELL)
|
||||
AC_SUBST(MOZ_FOLD_LIBS)
|
||||
|
||||
AC_MSG_CHECKING([for posix_fallocate])
|
||||
AC_TRY_LINK([#define _XOPEN_SOURCE 600
|
||||
|
@ -11,14 +11,6 @@
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(function() {
|
||||
ok(!window.AudioContext, "AudioContext should be hidden behind a pref");
|
||||
var accessThrows = false;
|
||||
try {
|
||||
new AudioContext();
|
||||
} catch (e) {
|
||||
accessThrows = true;
|
||||
}
|
||||
ok(accessThrows, "AudioContext should be hidden behind a pref");
|
||||
SpecialPowers.setBoolPref("media.webaudio.enabled", true);
|
||||
var ac = new AudioContext();
|
||||
ok(ac, "Create a AudioContext object");
|
||||
|
@ -13,7 +13,11 @@ include $(DEPTH)/config/autoconf.mk
|
||||
MODULE = sqlite3
|
||||
LIBRARY_NAME = mozsqlite3
|
||||
SHORT_LIBNAME = mozsqlt3
|
||||
ifdef MOZ_FOLD_LIBS
|
||||
FORCE_STATIC_LIB = 1
|
||||
else
|
||||
FORCE_SHARED_LIB = 1
|
||||
endif
|
||||
VISIBILITY_FLAGS =
|
||||
LIB_IS_C_ONLY = 1
|
||||
|
||||
|
@ -57,6 +57,7 @@ def InvokeClWithDependencyGeneration(cmdline):
|
||||
f = open(depstarget, "w")
|
||||
for dep in sorted(deps):
|
||||
print >>f, "%s: %s" % (target, dep)
|
||||
print >>f, "%s:" % dep
|
||||
|
||||
if __name__ == "__main__":
|
||||
InvokeClWithDependencyGeneration(sys.argv[1:])
|
||||
|
37
js/src/build/unix/add_phony_targets.py
Normal file
37
js/src/build/unix/add_phony_targets.py
Normal file
@ -0,0 +1,37 @@
|
||||
# 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/.
|
||||
|
||||
import pymake.data
|
||||
import pymake.parser
|
||||
import pymake.parserdata
|
||||
import sys
|
||||
|
||||
'''
|
||||
Modifies the output of Sun Studio's -xM to look more like the output
|
||||
of gcc's -MD -MP, adding phony targets for dependencies.
|
||||
'''
|
||||
|
||||
|
||||
def add_phony_targets(path):
|
||||
print path
|
||||
deps = set()
|
||||
targets = set()
|
||||
for stmt in pymake.parser.parsefile(path):
|
||||
if isinstance(stmt, pymake.parserdata.Rule):
|
||||
assert isinstance(stmt.depexp, pymake.data.StringExpansion)
|
||||
assert isinstance(stmt.targetexp, pymake.data.StringExpansion)
|
||||
for d in stmt.depexp.s.split():
|
||||
deps.add(d)
|
||||
for t in stmt.targetexp.s.split():
|
||||
targets.add(t)
|
||||
phony_targets = deps - targets
|
||||
if not phony_targets:
|
||||
return
|
||||
with open(path, 'a') as f:
|
||||
f.writelines('%s:\n' % d for d in phony_targets)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
for f in sys.argv[1:]:
|
||||
add_phony_targets(f)
|
@ -1,139 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
# 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/.
|
||||
|
||||
# mddepend.pl - Reads in dependencies generated my -MD flag. Prints list
|
||||
# of objects that need to be rebuilt. These can then be added to the
|
||||
# PHONY target. Using this script copes with the problem of header
|
||||
# files that have been removed from the build.
|
||||
#
|
||||
# Usage:
|
||||
# mddepend.pl <output_file> <dependency_files...>
|
||||
#
|
||||
# Send comments, improvements, bugs to Steve Lamm (slamm@netscape.com).
|
||||
|
||||
use strict;
|
||||
|
||||
use constant DEBUG => 0;
|
||||
|
||||
my $outfile = shift @ARGV;
|
||||
my $silent = $ENV{MAKEFLAGS} =~ /^\w*s|\s-s/;
|
||||
|
||||
my $line = '';
|
||||
my %alldeps;
|
||||
# Parse dependency files
|
||||
while (<>) {
|
||||
s/\r?\n$//; # Handle both unix and DOS line endings
|
||||
$line .= $_;
|
||||
if ($line =~ /\\$/) {
|
||||
chop $line;
|
||||
next;
|
||||
}
|
||||
|
||||
$line =~ s|\\|/|g;
|
||||
|
||||
my ($obj,$rest) = split /\s*:\s+/, $line, 2;
|
||||
$line = '';
|
||||
next if !$obj || !$rest;
|
||||
|
||||
my @deps = split /\s+/, $rest;
|
||||
push @{$alldeps{$obj}}, @deps;
|
||||
if (DEBUG >= 2) {
|
||||
foreach my $dep (@deps) { print STDERR "add $obj $dep\n"; }
|
||||
}
|
||||
}
|
||||
|
||||
# Test dependencies
|
||||
my %modtimes; # cache
|
||||
my @objs; # force rebuild on these
|
||||
OBJ_LOOP: foreach my $obj (keys %alldeps) {
|
||||
my $mtime = (stat $obj)[9] or next;
|
||||
|
||||
my %not_in_cache;
|
||||
my $deps = $alldeps{$obj};
|
||||
foreach my $dep_file (@{$deps}) {
|
||||
my $dep_mtime = $modtimes{$dep_file};
|
||||
if (not defined $dep_mtime) {
|
||||
print STDERR "Skipping $dep_file for $obj, will stat() later\n" if DEBUG >= 2;
|
||||
$not_in_cache{$dep_file} = 1;
|
||||
next;
|
||||
}
|
||||
|
||||
print STDERR "Found $dep_file in cache\n" if DEBUG >= 2;
|
||||
|
||||
if ($dep_mtime > $mtime) {
|
||||
print STDERR "$dep_file($dep_mtime) newer than $obj($mtime)\n" if DEBUG;
|
||||
}
|
||||
elsif ($dep_mtime == -1) {
|
||||
print STDERR "Couldn't stat $dep_file for $obj\n" if DEBUG;
|
||||
}
|
||||
else {
|
||||
print STDERR "$dep_file($dep_mtime) older than $obj($mtime)\n" if DEBUG >= 2;
|
||||
next;
|
||||
}
|
||||
|
||||
push @objs, $obj; # dependency is missing or newer
|
||||
next OBJ_LOOP; # skip checking the rest of the dependencies
|
||||
}
|
||||
|
||||
foreach my $dep_file (keys %not_in_cache) {
|
||||
print STDERR "STAT $dep_file for $obj\n" if DEBUG >= 2;
|
||||
my $dep_mtime = $modtimes{$dep_file} = (stat $dep_file)[9] || -1;
|
||||
|
||||
if ($dep_mtime > $mtime) {
|
||||
print STDERR "$dep_file($dep_mtime) newer than $obj($mtime)\n" if DEBUG;
|
||||
}
|
||||
elsif ($dep_mtime == -1) {
|
||||
print STDERR "Couldn't stat $dep_file for $obj\n" if DEBUG;
|
||||
}
|
||||
else {
|
||||
print STDERR "$dep_file($dep_mtime) older than $obj($mtime)\n" if DEBUG >= 2;
|
||||
next;
|
||||
}
|
||||
|
||||
push @objs, $obj; # dependency is missing or newer
|
||||
next OBJ_LOOP; # skip checking the rest of the dependencies
|
||||
}
|
||||
|
||||
# If we get here it means nothing needs to be done for $obj
|
||||
}
|
||||
|
||||
# Output objects to rebuild (if needed).
|
||||
if ($outfile eq '-') {
|
||||
if (@objs) {
|
||||
print "@objs: FORCE\n";
|
||||
}
|
||||
} elsif (@objs) {
|
||||
my $old_output;
|
||||
my $new_output = "@objs: FORCE\n";
|
||||
|
||||
# Read in the current dependencies file.
|
||||
open(OLD, "<$outfile")
|
||||
and $old_output = <OLD>;
|
||||
close(OLD);
|
||||
|
||||
# Only write out the dependencies if they are different.
|
||||
if ($new_output ne $old_output) {
|
||||
open(OUT, ">$outfile") and print OUT "$new_output";
|
||||
print "Updating dependencies file, $outfile\n" unless $silent;
|
||||
if (DEBUG) {
|
||||
print "new: $new_output\n";
|
||||
print "was: $old_output\n" if $old_output ne '';
|
||||
}
|
||||
}
|
||||
} elsif (-s $outfile) {
|
||||
# Remove the old dependencies because all objects are up to date.
|
||||
print "Removing old dependencies file, $outfile\n" unless $silent;
|
||||
|
||||
if (DEBUG) {
|
||||
my $old_output;
|
||||
open(OLD, "<$outfile")
|
||||
and $old_output = <OLD>;
|
||||
close(OLD);
|
||||
print "was: $old_output\n";
|
||||
}
|
||||
|
||||
unlink $outfile;
|
||||
}
|
@ -70,18 +70,22 @@ class ExpandArgsMore(ExpandArgs):
|
||||
if os.path.splitext(arg)[1] == conf.LIB_SUFFIX:
|
||||
if os.path.exists(arg + conf.LIBS_DESC_SUFFIX):
|
||||
newlist += self._extract(self._expand_desc(arg))
|
||||
elif os.path.exists(arg) and len(ar_extract):
|
||||
continue
|
||||
elif os.path.exists(arg) and (len(ar_extract) or conf.AR == 'lib'):
|
||||
tmp = tempfile.mkdtemp(dir=os.curdir)
|
||||
self.tmp.append(tmp)
|
||||
subprocess.call(ar_extract + [os.path.abspath(arg)], cwd=tmp)
|
||||
if conf.AR == 'lib':
|
||||
out = subprocess.check_output([conf.AR, '-NOLOGO', '-LIST', arg])
|
||||
for l in out.splitlines():
|
||||
subprocess.call([conf.AR, '-NOLOGO', '-EXTRACT:%s' % l, os.path.abspath(arg)], cwd=tmp)
|
||||
else:
|
||||
subprocess.call(ar_extract + [os.path.abspath(arg)], cwd=tmp)
|
||||
objs = []
|
||||
for root, dirs, files in os.walk(tmp):
|
||||
objs += [relativize(os.path.join(root, f)) for f in files if isObject(f)]
|
||||
newlist += objs
|
||||
else:
|
||||
newlist += [arg]
|
||||
else:
|
||||
newlist += [arg]
|
||||
newlist += sorted(objs)
|
||||
continue
|
||||
newlist += [arg]
|
||||
return newlist
|
||||
|
||||
def makelist(self):
|
||||
@ -325,6 +329,9 @@ def main():
|
||||
with open(options.depend, 'w') as depfile:
|
||||
depfile.write("%s : %s\n" % (options.target, ' '.join(dep for dep in deps if os.path.isfile(dep) and dep != options.target)))
|
||||
|
||||
for dep in deps:
|
||||
if os.path.isfile(dep) and dep != options.target:
|
||||
depfile.write("%s :\n" % dep)
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
@ -44,4 +44,7 @@ if __name__ == '__main__':
|
||||
if options.depend:
|
||||
ensureParentDir(options.depend)
|
||||
with open(options.depend, 'w') as depfile:
|
||||
depfile.write("%s : %s\n" % (options.output, ' '.join(ExpandLibsDeps(args))))
|
||||
deps = ExpandLibsDeps(args)
|
||||
depfile.write("%s : %s\n" % (options.output, ' '.join(deps)))
|
||||
for dep in deps:
|
||||
depfile.write("%s :\n" % dep)
|
||||
|
@ -986,17 +986,19 @@ define MAKE_DEPS_AUTO_CC
|
||||
if test -d $(@D); then \
|
||||
echo "Building deps for $< using Sun Studio cc"; \
|
||||
$(CC) $(COMPILE_CFLAGS) -xM $< >$(_MDDEPFILE) ; \
|
||||
$(PYTHON) $(topsrcdir)/build/unix/add_phony_targets.py $(_MDDEPFILE) ; \
|
||||
fi
|
||||
endef
|
||||
define MAKE_DEPS_AUTO_CXX
|
||||
if test -d $(@D); then \
|
||||
echo "Building deps for $< using Sun Studio CC"; \
|
||||
$(CXX) $(COMPILE_CXXFLAGS) -xM $< >$(_MDDEPFILE) ; \
|
||||
$(PYTHON) $(topsrcdir)/build/unix/add_phony_targets.py $(_MDDEPFILE) ; \
|
||||
fi
|
||||
endef
|
||||
endif # Sun Studio on Solaris
|
||||
|
||||
$(OBJS) $(HOST_OBJS): $(GLOBAL_DEPS)
|
||||
$(OBJS) $(HOST_OBJS) $(PROGOBJS) $(HOST_PROGOBJS): $(GLOBAL_DEPS)
|
||||
|
||||
# Rules for building native targets must come first because of the host_ prefix
|
||||
$(HOST_COBJS): host_%.$(OBJ_SUFFIX): %.c
|
||||
@ -1613,14 +1615,7 @@ ifneq (,$(filter-out all chrome default export realchrome tools clean clobber cl
|
||||
MDDEPEND_FILES := $(strip $(wildcard $(foreach file,$(OBJS) $(PROGOBJS) $(HOST_OBJS) $(HOST_PROGOBJS) $(TARGETS) $(XPIDLSRCS:.idl=.h) $(XPIDLSRCS:.idl=.xpt),$(MDDEPDIR)/$(notdir $(file)).pp) $(addprefix $(MDDEPDIR)/,$(EXTRA_MDDEPEND_FILES))))
|
||||
|
||||
ifneq (,$(MDDEPEND_FILES))
|
||||
# The script mddepend.pl checks the dependencies and writes to stdout
|
||||
# one rule to force out-of-date objects. For example,
|
||||
# foo.o boo.o: FORCE
|
||||
# The script has an advantage over including the *.pp files directly
|
||||
# because it handles the case when header files are removed from the build.
|
||||
# 'make' would complain that there is no way to build missing headers.
|
||||
ALL_PP_RESULTS = $(shell $(PERL) $(BUILD_TOOLS)/mddepend.pl - $(MDDEPEND_FILES))
|
||||
$(eval $(ALL_PP_RESULTS))
|
||||
include $(MDDEPEND_FILES)
|
||||
endif
|
||||
|
||||
endif
|
||||
|
@ -3976,7 +3976,7 @@ dnl ========================================================
|
||||
MOZ_ARG_HEADER(Build dependencies)
|
||||
|
||||
if test "$GNU_CC" -a "$GNU_CXX"; then
|
||||
_DEPEND_CFLAGS='$(filter-out %/.pp,-MD -MF $(MDDEPDIR)/$(@F).pp)'
|
||||
_DEPEND_CFLAGS='-MD -MP -MF $(MDDEPDIR)/$(@F).pp'
|
||||
dnl Sun Studio on Solaris use -xM instead of -MD, see config/rules.mk
|
||||
elif test "$SOLARIS_SUNPRO_CC"; then
|
||||
_DEPEND_CFLAGS=
|
||||
|
@ -47,3 +47,5 @@ MOZ_EXTENSION_MANAGER=1
|
||||
MOZ_APP_STATIC_INI=1
|
||||
|
||||
MOZ_FENNEC=1
|
||||
|
||||
MOZ_FOLD_LIBS=1
|
||||
|
@ -35,10 +35,12 @@
|
||||
#ifndef MOZ_STATIC_JS
|
||||
@BINPATH@/@DLL_PREFIX@mozjs@DLL_SUFFIX@
|
||||
#endif
|
||||
#ifndef MOZ_FOLD_LIBS
|
||||
@BINPATH@/@DLL_PREFIX@plc4@DLL_SUFFIX@
|
||||
@BINPATH@/@DLL_PREFIX@plds4@DLL_SUFFIX@
|
||||
@BINPATH@/@DLL_PREFIX@xpcom@DLL_SUFFIX@
|
||||
@BINPATH@/@DLL_PREFIX@nspr4@DLL_SUFFIX@
|
||||
#endif
|
||||
@BINPATH@/@DLL_PREFIX@xpcom@DLL_SUFFIX@
|
||||
@BINPATH@/@DLL_PREFIX@mozalloc@DLL_SUFFIX@
|
||||
@BINPATH@/@DLL_PREFIX@mozglue@DLL_SUFFIX@
|
||||
@BINPATH@/@DLL_PREFIX@omxplugin@DLL_SUFFIX@
|
||||
@ -70,7 +72,9 @@
|
||||
#endif
|
||||
@BINPATH@/application.ini
|
||||
@BINPATH@/platform.ini
|
||||
#ifndef MOZ_FOLD_LIBS
|
||||
@BINPATH@/@DLL_PREFIX@mozsqlite3@DLL_SUFFIX@
|
||||
#endif
|
||||
@BINPATH@/blocklist.xml
|
||||
#ifdef XP_UNIX
|
||||
@BINPATH@/run-mozilla.sh
|
||||
@ -475,11 +479,13 @@
|
||||
@BINPATH@/components/pipnss.xpt
|
||||
@BINPATH@/components/pippki.xpt
|
||||
@BINPATH@/@DLL_PREFIX@nss3@DLL_SUFFIX@
|
||||
#ifndef MOZ_FOLD_LIBS
|
||||
@BINPATH@/@DLL_PREFIX@nssutil3@DLL_SUFFIX@
|
||||
@BINPATH@/@DLL_PREFIX@smime3@DLL_SUFFIX@
|
||||
@BINPATH@/@DLL_PREFIX@ssl3@DLL_SUFFIX@
|
||||
#endif
|
||||
@BINPATH@/@DLL_PREFIX@softokn3@DLL_SUFFIX@
|
||||
@BINPATH@/@DLL_PREFIX@freebl3@DLL_SUFFIX@
|
||||
@BINPATH@/@DLL_PREFIX@ssl3@DLL_SUFFIX@
|
||||
#ifndef CROSS_COMPILE
|
||||
@BINPATH@/@DLL_PREFIX@freebl3.chk
|
||||
@BINPATH@/@DLL_PREFIX@softokn3.chk
|
||||
|
@ -28,9 +28,11 @@ ifndef MOZ_PROFILE_GENERATE
|
||||
libs::
|
||||
$(INSTALL) ../tool/signmar$(BIN_SUFFIX) $(TESTROOT)/unit
|
||||
$(INSTALL) $(DEPTH)/dist/bin/$(DLL_PREFIX)nss3$(DLL_SUFFIX) $(TESTROOT)/unit
|
||||
ifndef MOZ_FOLD_LIBS
|
||||
$(INSTALL) $(DEPTH)/dist/bin/$(DLL_PREFIX)nssutil3$(DLL_SUFFIX) $(TESTROOT)/unit
|
||||
$(INSTALL) $(DEPTH)/dist/bin/$(DLL_PREFIX)plc4$(DLL_SUFFIX) $(TESTROOT)/unit
|
||||
$(INSTALL) $(DEPTH)/dist/bin/$(DLL_PREFIX)nspr4$(DLL_SUFFIX) $(TESTROOT)/unit
|
||||
$(INSTALL) $(DEPTH)/dist/bin/$(DLL_PREFIX)plds4$(DLL_SUFFIX) $(TESTROOT)/unit
|
||||
endif
|
||||
endif
|
||||
endif # Not Android
|
||||
|
@ -104,10 +104,16 @@ JNI_Throw(JNIEnv* jenv, const char* classname, const char* msg)
|
||||
#undef JNI_STUBS
|
||||
|
||||
static void * xul_handle = NULL;
|
||||
#ifndef MOZ_FOLD_LIBS
|
||||
static void * sqlite_handle = NULL;
|
||||
static void * nss_handle = NULL;
|
||||
static void * nspr_handle = NULL;
|
||||
static void * plc_handle = NULL;
|
||||
#else
|
||||
#define sqlite_handle nss_handle
|
||||
#define nspr_handle nss_handle
|
||||
#define plc_handle nss_handle
|
||||
#endif
|
||||
static void * nss_handle = NULL;
|
||||
|
||||
template <typename T> inline void
|
||||
xul_dlsym(const char *symbolName, T *value)
|
||||
@ -257,8 +263,18 @@ loadGeckoLibs(const char *apkName)
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
static int loadSQLiteLibs(const char *apkName)
|
||||
static mozglueresult loadNSSLibs(const char *apkName);
|
||||
|
||||
static mozglueresult
|
||||
loadSQLiteLibs(const char *apkName)
|
||||
{
|
||||
if (sqlite_handle)
|
||||
return SUCCESS;
|
||||
|
||||
#ifdef MOZ_FOLD_LIBS
|
||||
if (loadNSSLibs(apkName) != SUCCESS)
|
||||
return FAILURE;
|
||||
#else
|
||||
chdir(getenv("GRE_HOME"));
|
||||
|
||||
RefPtr<Zip> zip = ZipCollection::GetZip(apkName);
|
||||
@ -284,6 +300,7 @@ static int loadSQLiteLibs(const char *apkName)
|
||||
__android_log_print(ANDROID_LOG_ERROR, "GeckoLibLoad", "Couldn't get a handle to libmozsqlite3!");
|
||||
return FAILURE;
|
||||
}
|
||||
#endif
|
||||
|
||||
setup_sqlite_functions(sqlite_handle);
|
||||
return SUCCESS;
|
||||
@ -292,6 +309,9 @@ static int loadSQLiteLibs(const char *apkName)
|
||||
static mozglueresult
|
||||
loadNSSLibs(const char *apkName)
|
||||
{
|
||||
if (nss_handle && nspr_handle && plc_handle)
|
||||
return SUCCESS;
|
||||
|
||||
chdir(getenv("GRE_HOME"));
|
||||
|
||||
RefPtr<Zip> zip = ZipCollection::GetZip(apkName);
|
||||
@ -308,6 +328,7 @@ loadNSSLibs(const char *apkName)
|
||||
nss_handle = __wrap_dlopen(file, RTLD_GLOBAL | RTLD_LAZY);
|
||||
delete [] file;
|
||||
|
||||
#ifndef MOZ_FOLD_LIBS
|
||||
file = new char[strlen(apkName) + sizeof("!/libnspr4.so")];
|
||||
sprintf(file, "%s!/libnspr4.so", apkName);
|
||||
nspr_handle = __wrap_dlopen(file, RTLD_GLOBAL | RTLD_LAZY);
|
||||
@ -317,6 +338,7 @@ loadNSSLibs(const char *apkName)
|
||||
sprintf(file, "%s!/libplc4.so", apkName);
|
||||
plc_handle = __wrap_dlopen(file, RTLD_GLOBAL | RTLD_LAZY);
|
||||
delete [] file;
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
free(file_ids);
|
||||
@ -328,6 +350,7 @@ loadNSSLibs(const char *apkName)
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
#ifndef MOZ_FOLD_LIBS
|
||||
if (!nspr_handle) {
|
||||
__android_log_print(ANDROID_LOG_ERROR, "GeckoLibLoad", "Couldn't get a handle to libnspr4!");
|
||||
return FAILURE;
|
||||
@ -337,6 +360,7 @@ loadNSSLibs(const char *apkName)
|
||||
__android_log_print(ANDROID_LOG_ERROR, "GeckoLibLoad", "Couldn't get a handle to libplc4!");
|
||||
return FAILURE;
|
||||
}
|
||||
#endif
|
||||
|
||||
return setup_nss_functions(nss_handle, nspr_handle, plc_handle);
|
||||
}
|
||||
|
@ -19,6 +19,10 @@ DEFINES += \
|
||||
-DANDROID_PACKAGE_NAME='"$(ANDROID_PACKAGE_NAME)"' \
|
||||
$(NULL)
|
||||
|
||||
ifdef MOZ_FOLD_LIBS
|
||||
DEFINES += -DMOZ_FOLD_LIBS
|
||||
endif
|
||||
|
||||
CPPSRCS = \
|
||||
nsGeckoUtils.cpp \
|
||||
APKOpen.cpp \
|
||||
|
@ -136,10 +136,14 @@ void __stdcall InetStatusCallback(HINTERNET hInternet, DWORD_PTR dwContext,
|
||||
DWORD dwStatusInformationLength)
|
||||
{
|
||||
if (dwInternetStatus == INTERNET_STATUS_NAME_RESOLVED) {
|
||||
// The documentation states the IP address is a PCTSTR but it is actually a
|
||||
// PCSTR.
|
||||
// The documentation states the IP address is a PCTSTR but it is usually a
|
||||
// PCSTR and only sometimes a PCTSTR.
|
||||
StatsLock_AcquireExclusive();
|
||||
wsprintf(g_ServerIP, _T("%S"), lpvStatusInformation);
|
||||
if (wcslen(g_ServerIP) == 1)
|
||||
{
|
||||
wsprintf(g_ServerIP, _T("%s"), lpvStatusInformation);
|
||||
}
|
||||
StatsLock_ReleaseExclusive();
|
||||
}
|
||||
|
||||
|
Binary file not shown.
@ -18,4 +18,6 @@ def writeMakeDependOutput(filename):
|
||||
f.write('\n\n')
|
||||
for filename in targets[1:]:
|
||||
f.write('%s: %s\n' % (makeQuote(filename), makeQuote(targets[0])))
|
||||
for filename in dependencies:
|
||||
f.write('%s:\n' % filename)
|
||||
|
||||
|
@ -12,17 +12,30 @@ include $(DEPTH)/config/autoconf.mk
|
||||
CC_WRAPPER =
|
||||
CXX_WRAPPER =
|
||||
|
||||
ifdef MOZ_FOLD_LIBS
|
||||
MODULE = nss
|
||||
# TODO: The library name can be changed when bug 845217 is fixed.
|
||||
LIBRARY_NAME = nss3
|
||||
FORCE_SHARED_LIB = 1
|
||||
endif
|
||||
|
||||
default::
|
||||
|
||||
include $(topsrcdir)/config/config.mk
|
||||
|
||||
NSS_DLLS = \
|
||||
NSS_LIBS = \
|
||||
nss3 \
|
||||
nssutil3 \
|
||||
smime3 \
|
||||
ssl3 \
|
||||
$(NULL)
|
||||
|
||||
ifdef MOZ_FOLD_LIBS
|
||||
NSS_DLLS = $(LIBRARY_NAME)
|
||||
else
|
||||
NSS_DLLS = $(NSS_LIBS)
|
||||
endif
|
||||
|
||||
NSS_EXTRA_DLLS = \
|
||||
nssckbi \
|
||||
softokn3 \
|
||||
@ -127,7 +140,11 @@ ifeq ($(OS_ARCH),WINNT)
|
||||
DEFAULT_GMAKE_FLAGS += INSTALL="$(NSINSTALL) -t"
|
||||
endif
|
||||
ifndef MOZ_NATIVE_SQLITE
|
||||
ifdef MOZ_FOLD_LIBS
|
||||
DEFAULT_GMAKE_FLAGS += SQLITE_LIB_NAME=nss3
|
||||
else
|
||||
DEFAULT_GMAKE_FLAGS += SQLITE_LIB_NAME=mozsqlite3
|
||||
endif # MOZ_FOLD_LIBS
|
||||
DEFAULT_GMAKE_FLAGS += SQLITE_INCLUDE_DIR=$(ABS_DIST)/include
|
||||
endif
|
||||
ifdef NSS_DISABLE_DBM
|
||||
@ -242,6 +259,8 @@ DEFAULT_GMAKE_FLAGS += XCFLAGS="$(CFLAGS)"
|
||||
DEFAULT_GMAKE_FLAGS += DARWIN_DYLIB_VERSIONS="-compatibility_version 1 -current_version 1 $(LDFLAGS)"
|
||||
endif
|
||||
|
||||
DEFAULT_GMAKE_FLAGS += NSS_NO_PKCS11_BYPASS=1
|
||||
|
||||
# Put NSS headers directly under $(DIST)/include
|
||||
DEFAULT_GMAKE_FLAGS += PUBLIC_EXPORT_DIR='$(ABS_DIST)/include/$$(MODULE)'
|
||||
DEFAULT_GMAKE_FLAGS += SOURCE_XPHEADERS_DIR='$$(SOURCE_XP_DIR)/include/$$(MODULE)'
|
||||
@ -283,8 +302,10 @@ NSS_DIRS =
|
||||
ifndef NSS_DISABLE_DBM
|
||||
NSS_DIRS += dbm
|
||||
endif
|
||||
ifndef MOZ_FOLD_LIBS
|
||||
NSS_DIRS += nss/lib
|
||||
endif
|
||||
NSS_DIRS += \
|
||||
nss/lib \
|
||||
nss/cmd/lib \
|
||||
nss/cmd/shlibsign \
|
||||
$(NULL)
|
||||
@ -301,7 +322,26 @@ ifneq (,$(filter %--build-id,$(LDFLAGS)))
|
||||
DEFAULT_GMAKE_ENV = LDFLAGS=-Wl,--build-id
|
||||
endif
|
||||
|
||||
NSS_DIST_DLL_FILES := $(addprefix $(DIST)/lib/$(DLL_PREFIX),$(addsuffix $(DLL_SUFFIX),$(NSS_DLLS) $(NSS_EXTRA_DLLS)))
|
||||
ifdef MOZ_FOLD_LIBS
|
||||
# TODO: The following can be replaced by something simpler when bug 844880
|
||||
# is fixed.
|
||||
# All static libraries required for nss, smime, ssl and nssutil.
|
||||
NSS_STATIC_LIBS := $(shell $(MAKE) --no-print-directory -f $(srcdir)/nss.mk DEPTH="$(DEPTH)" topsrcdir="$(topsrcdir)" srcdir="$(srcdir)" echo-variable-libs)
|
||||
# Corresponding build directories
|
||||
NSS_STATIC_DIRS := $(foreach lib,$(NSS_STATIC_LIBS),$(patsubst %/,%,$(dir $(lib))))
|
||||
NSS_DIRS += $(NSS_STATIC_DIRS)
|
||||
|
||||
# TODO: The following can be replaced by something simpler when bug 844884
|
||||
# is fixed.
|
||||
# Remaining nss/lib directories
|
||||
NSS_DIRS += nss/lib/freebl nss/lib/softoken nss/lib/jar nss/lib/crmf nss/lib/ckfw nss/lib/libpkix
|
||||
ifeq (WINNT,$(OS_TARGET))
|
||||
NSS_DIRS += nss/lib/zlib
|
||||
endif
|
||||
endif # MOZ_FOLD_LIBS
|
||||
|
||||
# Filter-out $(LIBRARY_NAME) because it's already handled in config/rules.mk.
|
||||
NSS_DIST_DLL_FILES := $(addprefix $(DIST)/lib/$(DLL_PREFIX),$(addsuffix $(DLL_SUFFIX),$(filter-out $(LIBRARY_NAME),$(NSS_DLLS)) $(NSS_EXTRA_DLLS)))
|
||||
NSS_DIST_DLL_DEST := $(DIST)/bin
|
||||
INSTALL_TARGETS += NSS_DIST_DLL
|
||||
|
||||
@ -317,10 +357,100 @@ NSS_SDK_LIB_FILES := \
|
||||
NSS_SDK_LIB_DEST := $(DIST)/sdk/lib
|
||||
INSTALL_TARGETS += NSS_SDK_LIB
|
||||
|
||||
ifdef MOZ_FOLD_LIBS
|
||||
ifeq (WINNT,$(OS_TARGET))
|
||||
SUFFIX = _s.$(LIB_SUFFIX)
|
||||
else
|
||||
SUFFIX = .$(LIB_SUFFIX)
|
||||
endif
|
||||
|
||||
# Fold NSPR libs
|
||||
EXTRA_DSO_LDOPTS += $(DEPTH)/nsprpub/pr/src/$(LIB_PREFIX)nspr4$(SUFFIX)
|
||||
EXTRA_DSO_LDOPTS += $(DEPTH)/nsprpub/lib/ds/$(LIB_PREFIX)plds4$(SUFFIX)
|
||||
EXTRA_DSO_LDOPTS += $(DEPTH)/nsprpub/lib/libc/src/$(LIB_PREFIX)plc4$(SUFFIX)
|
||||
|
||||
# Fold SQLite
|
||||
EXTRA_DSO_LDOPTS += $(DEPTH)/db/sqlite3/src/$(LIB_PREFIX)mozsqlite3.$(LIB_SUFFIX)
|
||||
|
||||
# Add all static libraries for nss, smime, ssl and nssutil
|
||||
SHARED_LIBRARY_LIBS = $(addprefix ../,$(NSS_STATIC_LIBS))
|
||||
|
||||
ifeq (WINNT,$(OS_TARGET))
|
||||
# Create a .def file based on the various .def files for nss, smime, ssl and
|
||||
# nssutil.
|
||||
NSS_STATIC_LIBS_DEFS := $(wildcard $(addprefix $(srcdir)/../,$(NSS_STATIC_LIBS:.$(LIB_SUFFIX)=.def)))
|
||||
DEFFILE = nss3.def
|
||||
|
||||
nss3.def: $(NSS_STATIC_LIBS_DEFS) $(DEPTH)/db/sqlite3/src/sqlite-processed.def
|
||||
echo LIBRARY nss3$(DLL_SUFFIX) > $@.tmp
|
||||
echo EXPORTS >> $@.tmp
|
||||
grep -v -h -e ^LIBRARY -e ^EXPORTS -e ^\; $^ >> $@.tmp
|
||||
mv $@.tmp $@
|
||||
endif
|
||||
|
||||
# Force the linker to include everything from the static libraries.
|
||||
EXPAND_LIBS_EXEC += --extract
|
||||
else
|
||||
$(NSS_DIST_DLL_FILES) $(NSS_SDK_LIB_FILES): libs-nss/lib
|
||||
endif # MOZ_FOLD_LIBS
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
ifdef MOZ_FOLD_LIBS
|
||||
$(SHARED_LIBRARY): $(SHARED_LIBRARY_LIBS)
|
||||
|
||||
EXTRA_DSO_LDOPTS += $(REALTIME_LIBS)
|
||||
|
||||
ifdef IMPORT_LIB_SUFFIX
|
||||
IMPORT_PREFIX = $(LIB_PREFIX)
|
||||
IMPORT_SUFFIX = .$(IMPORT_LIB_SUFFIX)
|
||||
else
|
||||
IMPORT_PREFIX = $(DLL_PREFIX)
|
||||
IMPORT_SUFFIX = $(DLL_SUFFIX)
|
||||
endif
|
||||
|
||||
NSPR_IMPORT_LIBS = $(addprefix $(DIST)/lib/$(IMPORT_PREFIX),$(addsuffix $(IMPORT_SUFFIX),nspr4 plc4 plds4))
|
||||
SQLITE_IMPORT_LIB = $(DIST)/lib/$(IMPORT_PREFIX)mozsqlite3$(IMPORT_SUFFIX)
|
||||
|
||||
# TODO: The following can be replaced by something simpler when bug 844884
|
||||
# is fixed.
|
||||
# Associate target files with the rules that build them.
|
||||
$(DIST)/lib/$(LIB_PREFIX)crmf.$(LIB_SUFFIX): libs-nss/lib/crmf
|
||||
$(DIST)/lib/$(DLL_PREFIX)freebl3$(DLL_SUFFIX): libs-nss/lib/freebl
|
||||
$(DIST)/lib/$(DLL_PREFIX)nssckbi$(DLL_SUFFIX): libs-nss/lib/ckfw
|
||||
$(DIST)/lib/$(DLL_PREFIX)softokn3$(DLL_SUFFIX): libs-nss/lib/softoken
|
||||
$(DIST)/lib/$(DLL_PREFIX)nssdbm3$(DLL_SUFFIX): libs-nss/lib/softoken
|
||||
$(foreach lib,$(NSS_STATIC_LIBS),$(eval ../$(lib): libs-$(patsubst %/,%,$(dir $(lib)))))
|
||||
|
||||
# Create fake import libraries for the folded libraries, so that linking
|
||||
# against them works both for the NSS build system (see dependencies below)
|
||||
# and for the rest of the mozilla build system.
|
||||
$(NSPR_IMPORT_LIBS) \
|
||||
$(SQLITE_IMPORT_LIB) \
|
||||
$(DIST)/lib/$(IMPORT_PREFIX)nssutil3$(IMPORT_SUFFIX) \
|
||||
$(DIST)/lib/$(IMPORT_PREFIX)ssl3$(IMPORT_SUFFIX) \
|
||||
$(DIST)/lib/$(IMPORT_PREFIX)smime3$(IMPORT_SUFFIX): $(DIST)/lib/$(IMPORT_PREFIX)nss3$(IMPORT_SUFFIX)
|
||||
ifeq (WINNT,$(OS_TARGET))
|
||||
cp $< $@
|
||||
else
|
||||
ln -sf $< $@
|
||||
endif
|
||||
|
||||
# Interdependencies between nss sub-directories, and dependencies on NSPR/SQLite
|
||||
libs-nss/lib/ckfw: libs-nss/lib/nss/../base $(NSPR_IMPORT_LIBS)
|
||||
libs-nss/lib/softoken: $(NSPR_IMPORT_LIBS) $(SQLITE_IMPORT_LIB)
|
||||
libs-nss/lib/softoken: libs-nss/lib/freebl
|
||||
ifndef NSS_DISABLE_DBM
|
||||
libs-nss/lib/softoken: libs-dbm
|
||||
endif
|
||||
libs-nss/lib/softoken: $(DIST)/lib/$(IMPORT_PREFIX)nssutil3$(IMPORT_SUFFIX)
|
||||
libs-nss/lib/freebl: $(DIST)/lib/$(IMPORT_PREFIX)nssutil3$(IMPORT_SUFFIX) $(NSPR_IMPORT_LIBS)
|
||||
|
||||
# For each directory where we build static libraries, force the NSS build system
|
||||
# to only build static libraries.
|
||||
$(addprefix libs-,$(NSS_STATIC_DIRS)): DEFAULT_GMAKE_FLAGS += SHARED_LIBRARY= IMPORT_LIBRARY=
|
||||
endif # MOZ_FOLD_LIBS
|
||||
|
||||
DEFAULT_GMAKE_FLAGS += $(EXTRA_GMAKE_FLAGS)
|
||||
|
||||
$(addprefix libs-,$(NSS_DIRS)): libs-%:
|
||||
@ -349,7 +479,17 @@ clean clobber clobber_all realclean distclean depend:: $(addprefix clean-,$(NSS_
|
||||
NSS_CMD_TARGETS := $(addprefix libs-,$(filter-out nss/cmd/lib,$(filter nss/cmd/%,$(NSS_DIRS))))
|
||||
libs:: $(NSS_CMD_TARGETS)
|
||||
|
||||
ifdef MOZ_FOLD_LIBS
|
||||
$(NSS_CMD_TARGETS): $(addprefix $(DIST)/lib/$(IMPORT_PREFIX),$(addsuffix $(IMPORT_SUFFIX),$(NSS_LIBS)))
|
||||
libs-nss/cmd/modutil: libs-nss/lib/jar
|
||||
ifeq (WINNT,$(OS_TARGET))
|
||||
libs-nss/cmd/modutil: libs-nss/lib/zlib
|
||||
endif
|
||||
$(NSS_CMD_TARGETS): libs-nss/cmd/lib
|
||||
else
|
||||
$(NSS_CMD_TARGETS): libs-nss/lib libs-nss/cmd/lib
|
||||
endif # MOZ_FOLD_LIBS
|
||||
|
||||
ifndef NSS_DISABLE_DBM
|
||||
libs-nss/lib: libs-dbm
|
||||
endif
|
||||
|
@ -30,6 +30,6 @@ hacked-certdata.txt : $(srcdir)/../nss/lib/ckfw/builtins/certdata.txt
|
||||
combined-certdata.txt : hacked-certdata.txt $(srcdir)/b2g-certdata.txt
|
||||
cat $^ > $@
|
||||
|
||||
libs-nss/lib: combined-certdata.txt
|
||||
libs-nss/lib libs-nss/lib/ckfw: combined-certdata.txt
|
||||
|
||||
DEFAULT_GMAKE_FLAGS += NSS_CERTDATA_TXT='$(CURDIR)/combined-certdata.txt'
|
||||
|
27
security/build/nss.mk
Normal file
27
security/build/nss.mk
Normal file
@ -0,0 +1,27 @@
|
||||
# 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 $(DEPTH)/config/autoconf.mk
|
||||
|
||||
include $(topsrcdir)/config/config.mk
|
||||
|
||||
dirs :=
|
||||
|
||||
define add_dirs
|
||||
SHARED_LIBRARY_DIRS :=
|
||||
include $(topsrcdir)/security/$(1)/config.mk
|
||||
dirs += $$(addprefix $(1)/,$$(SHARED_LIBRARY_DIRS)) $(1)
|
||||
endef
|
||||
$(foreach dir,util nss ssl smime,$(eval $(call add_dirs,nss/lib/$(dir))))
|
||||
|
||||
libs :=
|
||||
define add_lib
|
||||
LIBRARY_NAME :=
|
||||
include $(topsrcdir)/security/$(1)/manifest.mn
|
||||
libs += $$(addprefix $(1)/,$(LIB_PREFIX)$$(LIBRARY_NAME).$(LIB_SUFFIX))
|
||||
endef
|
||||
$(foreach dir,$(dirs),$(eval $(call add_lib,$(dir))))
|
||||
|
||||
echo-variable-%:
|
||||
@echo $($*)
|
@ -70,7 +70,6 @@ JSSHELL_BINS = \
|
||||
$(DIST)/bin/$(DLL_PREFIX)mozglue$(DLL_SUFFIX) \
|
||||
$(NULL)
|
||||
ifndef MOZ_NATIVE_NSPR
|
||||
JSSHELL_BINS += $(DIST)/bin/$(DLL_PREFIX)nspr4$(DLL_SUFFIX)
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
ifeq ($(_MSC_VER),1400)
|
||||
JSSHELL_BINS += $(DIST)/bin/Microsoft.VC80.CRT.manifest
|
||||
@ -87,10 +86,15 @@ ifeq ($(_MSC_VER),1700)
|
||||
JSSHELL_BINS += $(DIST)/bin/msvcr110.dll
|
||||
endif
|
||||
else
|
||||
ifdef MOZ_FOLD_LIBS
|
||||
JSSHELL_BINS += $(DIST)/bin/$(DLL_PREFIX)nss3$(DLL_SUFFIX)
|
||||
else
|
||||
JSSHELL_BINS += \
|
||||
$(DIST)/bin/$(DLL_PREFIX)nspr4$(DLL_SUFFIX) \
|
||||
$(DIST)/bin/$(DLL_PREFIX)plds4$(DLL_SUFFIX) \
|
||||
$(DIST)/bin/$(DLL_PREFIX)plc4$(DLL_SUFFIX) \
|
||||
$(NULL)
|
||||
endif # MOZ_FOLD_LIBS
|
||||
endif
|
||||
endif # MOZ_NATIVE_NSPR
|
||||
MAKE_JSSHELL = $(ZIP) -9j $(PKG_JSSHELL) $(JSSHELL_BINS)
|
||||
@ -515,6 +519,10 @@ endif
|
||||
|
||||
DEFINES += -DDLL_PREFIX=$(DLL_PREFIX) -DDLL_SUFFIX=$(DLL_SUFFIX) -DBIN_SUFFIX=$(BIN_SUFFIX)
|
||||
|
||||
ifdef MOZ_FOLD_LIBS
|
||||
DEFINES += -DMOZ_FOLD_LIBS=1
|
||||
endif
|
||||
|
||||
GARBAGE += $(DIST)/$(PACKAGE) $(PACKAGE)
|
||||
|
||||
# The following target stages files into two directories: one directory for
|
||||
|
@ -7,7 +7,6 @@ if CONFIG['LIBXUL_SDK']:
|
||||
error('toolkit.mozbuild is not compatible with --enable-libxul-sdk=')
|
||||
|
||||
if not CONFIG['MOZ_NATIVE_NSPR']:
|
||||
add_tier_dir('nspr', 'nsprpub', static=True)
|
||||
add_tier_dir('nspr', 'config/nspr')
|
||||
|
||||
if not CONFIG['MOZ_NATIVE_SQLITE']:
|
||||
|
@ -21,9 +21,9 @@
|
||||
class SharedLibrary {
|
||||
public:
|
||||
|
||||
SharedLibrary(unsigned long aStart,
|
||||
unsigned long aEnd,
|
||||
unsigned long aOffset,
|
||||
SharedLibrary(uintptr_t aStart,
|
||||
uintptr_t aEnd,
|
||||
uintptr_t aOffset,
|
||||
const std::string& aBreakpadId,
|
||||
const std::string& aName)
|
||||
: mStart(aStart)
|
||||
|
@ -538,3 +538,5 @@ if __name__ == '__main__':
|
||||
deps = [dep.replace('\\', '/') for dep in idl.deps]
|
||||
|
||||
print >>depfd, "%s: %s" % (options.outfile, " ".join(deps))
|
||||
for dep in deps:
|
||||
print >>depfd, "%s:" % dep
|
||||
|
@ -16,3 +16,4 @@ MOZ_SERVICES_COMMON=1
|
||||
MOZ_SERVICES_CRYPTO=1
|
||||
MOZ_SERVICES_METRICS=1
|
||||
MOZ_SERVICES_SYNC=1
|
||||
MOZ_MEDIA_NAVIGATOR=1
|
||||
|
Loading…
Reference in New Issue
Block a user