Bug 1550708 - NSS gyp build system should produce libfreebl_64fpu_3.so for Solaris SPARC r=jcj
authorPetr Sumbera <petr.sumbera@oracle.com>
Wed, 05 Jun 2019 23:29:47 +0000
changeset 15158 d62e671272e3772019bb03e215cd8e08dcc93fff
parent 15157 da87cd7622ee673cb09ae234e4a4d41400c6c324
child 15159 96c8c580cc096e805fe9399b96da39da1e82734f
push id3394
push userjjones@mozilla.com
push dateWed, 05 Jun 2019 23:30:13 +0000
reviewersjcj
bugs1550708
Bug 1550708 - NSS gyp build system should produce libfreebl_64fpu_3.so for Solaris SPARC r=jcj Differential Revision: https://phabricator.services.mozilla.com/D30628
lib/freebl/freebl.gyp
nss.gyp
--- a/lib/freebl/freebl.gyp
+++ b/lib/freebl/freebl.gyp
@@ -217,16 +217,53 @@
          [ 'OS=="linux"', {
            'mapfile': 'freebl_hash_vector.def',
          }, {
            'mapfile': 'freebl.def',
          }],
        ]
       },
     },
+    {
+      'target_name': 'freebl_64int_3',
+      'includes': [
+        'freebl_base.gypi',
+      ],
+      'type': 'shared_library',
+      'dependencies': [
+        '<(DEPTH)/exports.gyp:nss_exports',
+        'hw-acc-crypto',
+      ],
+    },
+    {
+      'target_name': 'freebl_64fpu_3',
+      'includes': [
+        'freebl_base.gypi',
+      ],
+      'type': 'shared_library',
+      'sources': [
+        'mpi/mpi_sparc.c',
+        'mpi/mpv_sparcv9.s',
+        'mpi/montmulfv9.s',
+      ],
+      'dependencies': [
+        '<(DEPTH)/exports.gyp:nss_exports',
+        'hw-acc-crypto',
+      ],
+      'asflags_mozilla': [
+        '-mcpu=v9', '-Wa,-xarch=v9a'
+      ],
+      'defines': [
+        'MP_NO_MP_WORD',
+        'MP_USE_UINT_DIGIT',
+        'MP_ASSEMBLY_MULTIPLY',
+        'MP_USING_MONT_MULF',
+        'MP_MONT_USE_MP_MUL',
+      ],
+    },
   ],
   'conditions': [
     [ 'OS=="linux"', {
       # stub build
       'targets': [
         {
           'target_name': 'freebl3',
           'type': 'shared_library',
--- a/nss.gyp
+++ b/nss.gyp
@@ -8,20 +8,29 @@
   'conditions': [
     [ 'mozpkix_only==0', {
       'targets': [
         {
           'target_name': 'nss_libs',
           'type': 'none',
           'dependencies': [
             'lib/ckfw/builtins/builtins.gyp:nssckbi',
-            'lib/freebl/freebl.gyp:freebl3',
             'lib/softoken/softoken.gyp:softokn3',
           ],
           'conditions': [
+            [ 'OS=="solaris" and target_arch=="sparc64"', {
+              'dependencies': [
+                'lib/freebl/freebl.gyp:freebl_64int_3',
+                'lib/freebl/freebl.gyp:freebl_64fpu_3',
+              ],
+            }, {
+              'dependencies': [
+                'lib/freebl/freebl.gyp:freebl3',
+              ],
+            }],
             [ 'moz_fold_libs==0', {
               'dependencies': [
                 'lib/nss/nss.gyp:nss3',
                 'lib/smime/smime.gyp:smime3',
                 'lib/sqlite/sqlite.gyp:sqlite3',
                 'lib/ssl/ssl.gyp:ssl3',
                 'lib/util/util.gyp:nssutil3',
               ],