Bug 1320690 - Re-enable bundled NSS on BSDs. r=ted
authorJan Beich <jbeich@FreeBSD.org>
Mon, 28 Nov 2016 14:33:36 +0000
changeset 374361 f5fee03d16abed4d5a8860173ed4f334f2f84bef
parent 374360 01d90b2ddaebbea4b8104082812aebec9024ce95
child 374362 5329971fb85c5881dd303005695dcbc2c77146d6
push id1419
push userjlund@mozilla.com
push dateMon, 10 Apr 2017 20:44:07 +0000
treeherdermozilla-release@5e6801b73ef6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs1320690
milestone53.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1320690 - Re-enable bundled NSS on BSDs. r=ted MozReview-Commit-ID: F9k21fzoZaT
old-configure.in
security/generate_mapfile.py
--- a/old-configure.in
+++ b/old-configure.in
@@ -2076,19 +2076,18 @@ if test -n "$_USE_SYSTEM_NSS"; then
     AM_PATH_NSS(3.28, [MOZ_SYSTEM_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])])
 fi
 
 if test -n "$MOZ_SYSTEM_NSS"; then
    NSS_LIBS="$NSS_LIBS -lcrmf"
 else
    NSS_CFLAGS="-I${DIST}/include/nss"
    case "${OS_ARCH}" in
-        # This is to match the conditions in security/generate_mapfile.py,
-        # plus Windows which doesn't run that script.
-        WINNT|Darwin|Linux)
+        # Only few platforms have been tested with GYP
+        WINNT|Darwin|Linux|DragonFly|FreeBSD|NetBSD|OpenBSD)
             ;;
         *)
             AC_MSG_ERROR([building in-tree NSS is not supported on this platform. Use --with-system-nss])
             ;;
    esac
 fi
 
 if test -z "$SKIP_LIBRARY_CHECKS"; then
--- a/security/generate_mapfile.py
+++ b/security/generate_mapfile.py
@@ -12,43 +12,38 @@
 # The NSS build system processes them using a series of sed replacements,
 # but the Mozilla build system is already running a Python script to generate
 # the file so it's simpler to just do the replacement in Python.
 
 import buildconfig
 
 
 def main(output, input):
-    # There's a check in old-configure.in under the system-nss handling
-    # that should match this.
-    if buildconfig.substs['OS_ARCH'] not in ('Linux', 'Darwin'):
-        print "Error: unhandled OS_ARCH %s" % buildconfig.substs['OS_ARCH']
-        return 1
-    is_linux = buildconfig.substs['OS_ARCH'] == 'Linux'
+    is_darwin = buildconfig.substs['OS_ARCH'] == 'Darwin'
 
     with open(input, 'rb') as f:
         for line in f:
             line = line.rstrip()
             # Remove all lines containing ';-'
             if ';-' in line:
                 continue
-            # On non-Linux, remove all lines containing ';+'
-            if not is_linux and ';+' in line:
+            # On OS X, remove all lines containing ';+'
+            if is_darwin and ';+' in line:
                 continue
             # Remove the string ' DATA '.
             line = line.replace(' DATA ', '')
             # Remove the string ';+'
             line = line.replace(';+', '')
             # Remove the string ';;'
             line = line.replace(';;', '')
             # If a ';' is present, remove everything after it,
-            # and on non-Linux, remove it as well.
+            # and on OS X, remove it as well.
             i = line.find(';')
             if i != -1:
-                if is_linux:
-                    line = line[:i+1]
+                if is_darwin:
+                    line = line[:i]
                 else:
-                    line = line[:i]
-            # On non-Linux, symbols get an underscore in front.
-            if line and not is_linux:
+                    line = line[:i+1]
+            # On OS X, symbols get an underscore in front.
+            if line and is_darwin:
                 output.write('_')
             output.write(line)
             output.write('\n')