summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2005-08-24 17:33:37 (GMT)
committerSteven Knight <knight@baldmt.com>2005-08-24 17:33:37 (GMT)
commit0f8064fbb31c680b4029dc2ffc4f0312b7ec766d (patch)
tree177094547c955f0e04f5bc0310a68c945c700759 /src/engine/SCons
parent828f2bc8936354dfa67ef595efdcb7c5e43f8bf5 (diff)
downloadSCons-0f8064fbb31c680b4029dc2ffc4f0312b7ec766d.zip
SCons-0f8064fbb31c680b4029dc2ffc4f0312b7ec766d.tar.gz
SCons-0f8064fbb31c680b4029dc2ffc4f0312b7ec766d.tar.bz2
On Solaris, enable the -KPIC option by default when compiling shared objects, and accomodate Sun Workshop by changing the prefix instead of the suffix. (Steve-o) Add the +Z option for compiling shared objects on HP-UX.
Diffstat (limited to 'src/engine/SCons')
-rw-r--r--src/engine/SCons/Tool/hpc++.py1
-rw-r--r--src/engine/SCons/Tool/hpcc.py3
-rw-r--r--src/engine/SCons/Tool/sunc++.py6
-rw-r--r--src/engine/SCons/Tool/suncc.py7
4 files changed, 15 insertions, 2 deletions
diff --git a/src/engine/SCons/Tool/hpc++.py b/src/engine/SCons/Tool/hpc++.py
index 3276412..8c4b4dd 100644
--- a/src/engine/SCons/Tool/hpc++.py
+++ b/src/engine/SCons/Tool/hpc++.py
@@ -64,6 +64,7 @@ def generate(env):
if acc:
env['CXX'] = acc or 'aCC'
+ env['SHCXXFLAGS'] = SCons.Util.CLVar('$CXXFLAGS +Z')
# determine version of aCC
line = os.popen(acc + ' -V 2>&1').readline().rstrip()
if string.find(line, 'aCC: HP ANSI C++') == 0:
diff --git a/src/engine/SCons/Tool/hpcc.py b/src/engine/SCons/Tool/hpcc.py
index f4ff80c..15f23dc 100644
--- a/src/engine/SCons/Tool/hpcc.py
+++ b/src/engine/SCons/Tool/hpcc.py
@@ -32,6 +32,8 @@ selection method.
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
+import SCons.Util
+
import cc
def generate(env):
@@ -39,6 +41,7 @@ def generate(env):
cc.generate(env)
env['CXX'] = 'aCC'
+ env['SHCCFLAGS'] = SCons.Util.CLVar('$CCFLAGS +Z')
def exists(env):
return env.Detect('aCC')
diff --git a/src/engine/SCons/Tool/sunc++.py b/src/engine/SCons/Tool/sunc++.py
index 22d01db..91c0f6c 100644
--- a/src/engine/SCons/Tool/sunc++.py
+++ b/src/engine/SCons/Tool/sunc++.py
@@ -33,6 +33,8 @@ selection method.
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
+import SCons.Util
+
import os.path
cplusplus = __import__('c++', globals(), locals(), [])
@@ -66,7 +68,9 @@ def generate(env):
env['CXX'] = cxx
env['SHCXX'] = shcxx
env['CXXVERSION'] = version
- env['SHOBJSUFFIX'] = '.os'
+ env['SHCXXFLAGS'] = SCons.Util.CLVar('$CXXFLAGS -KPIC')
+ env['SHOBJPREFIX'] = 'so_'
+ env['SHOBJSUFFIX'] = '.o'
def exists(env):
path, cxx, shcxx, version = get_cppc(env)
diff --git a/src/engine/SCons/Tool/suncc.py b/src/engine/SCons/Tool/suncc.py
index e851cd1..35d2aca 100644
--- a/src/engine/SCons/Tool/suncc.py
+++ b/src/engine/SCons/Tool/suncc.py
@@ -32,6 +32,8 @@ selection method.
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
+import SCons.Util
+
import cc
def generate(env):
@@ -41,7 +43,10 @@ def generate(env):
"""
cc.generate(env)
- env['CXX'] = 'CC'
+ env['CXX'] = 'CC'
+ env['SHCCFLAGS'] = SCons.Util.CLVar('$CCFLAGS -KPIC')
+ env['SHOBJPREFIX'] = 'so_'
+ env['SHOBJSUFFIX'] = '.o'
def exists(env):
return env.Detect('CC')