From 14eb6b4ad61ad57ac3a619a49277ecb3e639f101 Mon Sep 17 00:00:00 2001 From: Steven Knight Date: Thu, 30 Oct 2003 06:10:11 +0000 Subject: Update the tool specifications for the SGI MIPSpro tools. --- bin/files | 1 + doc/man/scons.1 | 1 + src/CHANGES.txt | 5 +++++ src/RELEASE.txt | 15 ++++++++------- src/engine/MANIFEST.in | 1 + src/engine/SCons/Tool/__init__.py | 4 ++-- src/engine/SCons/Tool/sgic++.py | 28 ++++++++++++++++++++++++++++ src/engine/SCons/Tool/sgicc.py | 7 +++---- src/engine/SCons/Tool/sgilink.py | 6 +++--- test/import.py | 1 + 10 files changed, 53 insertions(+), 16 deletions(-) create mode 100644 src/engine/SCons/Tool/sgic++.py diff --git a/bin/files b/bin/files index 043eadb..574e17c 100644 --- a/bin/files +++ b/bin/files @@ -77,6 +77,7 @@ ./SCons/Tool/qt.py ./SCons/Tool/rmic.py ./SCons/Tool/sgiar.py +./SCons/Tool/sgic++.py ./SCons/Tool/sgicc.py ./SCons/Tool/sgilink.py ./SCons/Tool/sunar.py diff --git a/doc/man/scons.1 b/doc/man/scons.1 index 5e1e7b7..a378539 100644 --- a/doc/man/scons.1 +++ b/doc/man/scons.1 @@ -939,6 +939,7 @@ pdftex qt rmic sgiar +sgic++ sgicc sgilink sunar diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 7b5a93b..798bacf 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -19,6 +19,11 @@ RELEASE X.XX - XXX, XX XXX XXXX XX:XX:XX -XXXX - Fix subclassing the Environment and Scanner classes. + From Steve Leblanc: + + - SGI fixes: Fix C++ compilation, add a separate Tool/sgic++.py module, + remove '-LANG:std' from the default SGI $CXXFLAGS and $LINKFLAGS. + From Gary Oberbrunner: - Fix how the man page un-indents after examples in some browsers. diff --git a/src/RELEASE.txt b/src/RELEASE.txt index 6e43f50..f13736a 100644 --- a/src/RELEASE.txt +++ b/src/RELEASE.txt @@ -20,11 +20,17 @@ more effectively, please sign up for the scons-users mailing list at: -RELEASE 0.93 - Thu, 23 Oct 2003 07:26:55 -0500 +RELEASE X.XX - XXX, XX XXX XXXX XX:XX:XX -XXXX - This is the fourth beta release of SCons. Please consult the + This is the fifth beta release of SCons. Please consult the CHANGES.txt file for a list of specific changes since last release. + Please note the following important changes since release 0.93: + + - The '-LANG:std' option has been removed from the default $CXXFLAGS + and $LINKFLAGS variables on SGI systems. SGI users who need that flag + for C++ compilation will need to explicitly add it to those variables. + Please note the following important changes since release 0.92: - Construction variables are now expanded anywhere within a @@ -41,11 +47,6 @@ RELEASE 0.93 - Thu, 23 Oct 2003 07:26:55 -0500 of using the env.ParseConfig() method. The global function will be removed in some future release of SCons. - Please note the following important changes since release 0.91: - - - The Debian package available from the SCons web site now - uses Python version 2.2. - SCons is developed with an extensive regression test suite, and a rigorous development methodology for continually improving that suite. Because of this, SCons is of sufficient quality that you can use it diff --git a/src/engine/MANIFEST.in b/src/engine/MANIFEST.in index 3c71aba..24e3d76 100644 --- a/src/engine/MANIFEST.in +++ b/src/engine/MANIFEST.in @@ -93,6 +93,7 @@ SCons/Tool/RCS.py SCons/Tool/rmic.py SCons/Tool/SCCS.py SCons/Tool/sgiar.py +SCons/Tool/sgic++.py SCons/Tool/sgicc.py SCons/Tool/sgilink.py SCons/Tool/sunar.py diff --git a/src/engine/SCons/Tool/__init__.py b/src/engine/SCons/Tool/__init__.py index 9ddfdf3..b71b08b 100644 --- a/src/engine/SCons/Tool/__init__.py +++ b/src/engine/SCons/Tool/__init__.py @@ -248,7 +248,7 @@ def tool_list(platform, env): "prefer MIPSPro on IRIX" linkers = ['sgilink', 'gnulink'] c_compilers = ['sgicc', 'gcc', 'cc'] - cxx_compilers = ['sgicc', 'g++', 'c++'] + cxx_compilers = ['sgic++', 'g++', 'c++'] assemblers = ['as', 'gas'] fortran_compilers = ['f77', 'g77'] ars = ['sgiar'] @@ -299,7 +299,7 @@ def tool_list(platform, env): ar = None else: # Don't use g++ if the C compiler has built-in C++ support: - if c_compiler in ('msvc', 'icc', 'sgicc'): + if c_compiler in ('msvc', 'icc'): cxx_compiler = None else: cxx_compiler = FindTool(cxx_compilers, env) or cxx_compilers[0] diff --git a/src/engine/SCons/Tool/sgic++.py b/src/engine/SCons/Tool/sgic++.py new file mode 100644 index 0000000..a818d39 --- /dev/null +++ b/src/engine/SCons/Tool/sgic++.py @@ -0,0 +1,28 @@ +"""SCons.Tool.sgic++ + +Tool-specific initialization for MIPSpro C++ on SGI. + +There normally shouldn't be any need to import this module directly. +It will usually be imported through the generic SCons.Tool.Tool() +selection method. + +""" +__revision__ = "" + +import os.path +import string + +cplusplus = __import__('c++', globals(), locals(), []) + +def generate(env): + """Add Builders and construction variables for SGI MIPS C++ to an Environment.""" + + cplusplus.generate(env) + + env['CXX'] = 'CC' + env['SHCXX'] = 'CC' + env['SHOBJSUFFIX'] = '.o' + env['STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME'] = 1 + +def exists(env): + return env.Detect('CC') diff --git a/src/engine/SCons/Tool/sgicc.py b/src/engine/SCons/Tool/sgicc.py index cc285e7..da2c26d 100644 --- a/src/engine/SCons/Tool/sgicc.py +++ b/src/engine/SCons/Tool/sgicc.py @@ -1,6 +1,6 @@ """SCons.Tool.sgicc -Tool-specific initialization for MIPSPro CC and cc. +Tool-specific initialization for MIPSPro cc on SGI. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() @@ -38,11 +38,10 @@ import cc def generate(env): """Add Builders and construction variables for gcc to an Environment.""" cc.generate(env) - + env['CXX'] = 'CC' - env['CXXFLAGS'] = ['$CCFLAGS', '-LANG:std'] env['SHOBJSUFFIX'] = '.o' env['STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME'] = 1 def exists(env): - return env.Detect('CC') + return env.Detect('cc') diff --git a/src/engine/SCons/Tool/sgilink.py b/src/engine/SCons/Tool/sgilink.py index aba06cf..5643c08 100644 --- a/src/engine/SCons/Tool/sgilink.py +++ b/src/engine/SCons/Tool/sgilink.py @@ -1,6 +1,6 @@ """SCons.Tool.sgilink -Tool-specific initialization for the SGI MIPSPro linker. +Tool-specific initialization for the SGI MIPSPro linker on SGI. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() @@ -41,8 +41,8 @@ def generate(env): """Add Builders and construction variables for MIPSPro to an Environment.""" link.generate(env) - env['LINK'] = env.Detect(linkers) or 'cc' - env['LINKFLAGS'] = '-LANG:std' + env['LINK'] = env.Detect(linkers) or 'cc' + env['SHLINKFLAGS'] = '$LINKFLAGS -shared' def exists(env): return env.Detect(linkers) diff --git a/test/import.py b/test/import.py index 48c17be..d30328b 100644 --- a/test/import.py +++ b/test/import.py @@ -96,6 +96,7 @@ tools = [ 'rmic', 'SCCS', 'sgiar', + 'sgic++', 'sgicc', 'sgilink', 'Subversion', -- cgit v0.12