From ce1c300502555e95cbf82882bd3deeb53ec6839e Mon Sep 17 00:00:00 2001 From: Moonchild Date: Tue, 5 Apr 2022 20:19:49 +0200 Subject: Issue #1847 - Fixes for SunOS --- security/generate_mapfile.py | 4 ++-- security/nss/coreconf/config.gypi | 12 +++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) (limited to 'security') 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)'], }, -- cgit v1.2.3