summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--python/mozbuild/mozbuild/frontend/gyp_reader.py2
-rw-r--r--security/generate_mapfile.py4
-rw-r--r--security/nss/coreconf/config.gypi12
3 files changed, 11 insertions, 7 deletions
diff --git a/python/mozbuild/mozbuild/frontend/gyp_reader.py b/python/mozbuild/mozbuild/frontend/gyp_reader.py
index ef24c0dc42..e6d2607032 100644
--- a/python/mozbuild/mozbuild/frontend/gyp_reader.py
+++ b/python/mozbuild/mozbuild/frontend/gyp_reader.py
@@ -319,6 +319,8 @@ def read_from_gyp(config, path, output, vars, no_chromium, no_unified, action_ov
context['ASFLAGS'] = target_conf.get('asflags_mozilla', [])
if use_defines_in_asflags and defines:
context['ASFLAGS'] += ['-D' + d for d in defines]
+ if config.substs['OS_TARGET'] == 'SunOS':
+ context['LDFLAGS'] = target_conf.get('ldflags', [])
flags = target_conf.get('cflags_mozilla', [])
if flags:
suffix_map = {
diff --git a/security/generate_mapfile.py b/security/generate_mapfile.py
index 3e841ea4b1..71e5066e78 100644
--- a/security/generate_mapfile.py
+++ b/security/generate_mapfile.py
@@ -19,10 +19,10 @@ 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'):
+ if buildconfig.substs['OS_ARCH'] not in ('Linux', 'SunOS', 'Darwin'):
print "Error: unhandled OS_ARCH %s" % buildconfig.substs['OS_ARCH']
return 1
- is_linux = buildconfig.substs['OS_ARCH'] == 'Linux'
+ is_linux = buildconfig.substs['OS_ARCH'] in ('Linux', 'SunOS')
with open(input, 'rb') as f:
for line in f:
diff --git a/security/nss/coreconf/config.gypi b/security/nss/coreconf/config.gypi
index 58f46125ef..30d9b254f0 100644
--- a/security/nss/coreconf/config.gypi
+++ b/security/nss/coreconf/config.gypi
@@ -37,7 +37,7 @@
},{
'use_system_sqlite%': 0,
}],
- ['OS=="mac" or OS=="ios" or OS=="win"', {
+ ['OS=="mac" or OS=="ios" or OS=="solaris" or OS=="win"', {
'cc_use_gnu_ld%': 0,
}, {
'cc_use_gnu_ld%': 1,
@@ -393,6 +393,11 @@
'_REENTRANT',
],
}],
+ [ 'OS!="mac" and OS!="ios" and OS!="solaris" and OS!="win"', {
+ 'ldflags': [
+ '-z', 'noexecstack',
+ ],
+ }],
[ 'OS!="mac" and OS!="ios" and OS!="win"', {
'cflags': [
'-fPIC',
@@ -406,9 +411,6 @@
'cflags_cc': [
'-std=c++11',
],
- 'ldflags': [
- '-z', 'noexecstack',
- ],
'conditions': [
[ 'target_arch=="ia32"', {
'cflags': ['-m32'],
@@ -648,7 +650,7 @@
},
},
'conditions': [
- [ 'cc_use_gnu_ld==1', {
+ [ 'cc_use_gnu_ld==1 or OS=="solaris"', {
'variables': {
'process_map_file': ['/bin/sh', '-c', '/usr/bin/env grep -v ";-" >(mapfile) | sed -e "s,;+,," -e "s; DATA ;;" -e "s,;;,," -e "s,;.*,;," > >@(_outputs)'],
},