scons: Remove stale compiler options

This patch simply prunes the SUNCC and ICC compiler options as they
are both sufficiently stale that they would have to be re-written from
scratch anyhow. The patch serves to clean things up before shifting to
a build environment that enforces basic c++11 compliance as done in
the following patch.
This commit is contained in:
Andreas Hansson 2013-01-07 13:05:39 -05:00
parent 921490a060
commit 221302335b
3 changed files with 15 additions and 37 deletions

View file

@ -509,10 +509,8 @@ CXX_version = readCommand([main['CXX'],'--version'], exception=False)
CXX_V = readCommand([main['CXX'],'-V'], exception=False) CXX_V = readCommand([main['CXX'],'-V'], exception=False)
main['GCC'] = CXX_version and CXX_version.find('g++') >= 0 main['GCC'] = CXX_version and CXX_version.find('g++') >= 0
main['SUNCC'] = CXX_V and CXX_V.find('Sun C++') >= 0
main['ICC'] = CXX_V and CXX_V.find('Intel') >= 0
main['CLANG'] = CXX_version and CXX_version.find('clang') >= 0 main['CLANG'] = CXX_version and CXX_version.find('clang') >= 0
if main['GCC'] + main['SUNCC'] + main['ICC'] + main['CLANG'] > 1: if main['GCC'] + main['CLANG'] > 1:
print 'Error: How can we have two at the same time?' print 'Error: How can we have two at the same time?'
Exit(1) Exit(1)
@ -552,15 +550,6 @@ if main['GCC']:
main['LTO_LDFLAGS'] = ['-flto=%d' % GetOption('num_jobs'), main['LTO_LDFLAGS'] = ['-flto=%d' % GetOption('num_jobs'),
'-fuse-linker-plugin'] '-fuse-linker-plugin']
elif main['ICC']:
pass #Fix me... add warning flags once we clean up icc warnings
elif main['SUNCC']:
main.Append(CCFLAGS=['-Qoption ccfe'])
main.Append(CCFLAGS=['-features=gcc'])
main.Append(CCFLAGS=['-features=extensions'])
main.Append(CCFLAGS=['-library=stlport4'])
main.Append(CCFLAGS=['-xar'])
#main.Append(CCFLAGS=['-instances=semiexplicit'])
elif main['CLANG']: elif main['CLANG']:
clang_version_re = re.compile(".* version (\d+\.\d+)") clang_version_re = re.compile(".* version (\d+\.\d+)")
clang_version_match = clang_version_re.match(CXX_version) clang_version_match = clang_version_re.match(CXX_version)
@ -597,7 +586,7 @@ else:
termcap.Normal termcap.Normal
else: else:
print CXX_version.replace('\n', '<nl>') print CXX_version.replace('\n', '<nl>')
print " If you're trying to use a compiler other than GCC, ICC, SunCC," print " If you're trying to use a compiler other than GCC"
print " or clang, there appears to be something wrong with your" print " or clang, there appears to be something wrong with your"
print " environment." print " environment."
print " " print " "

View file

@ -1006,17 +1006,6 @@ if env['GCC']:
ccflags['fast'] += env['LTO_CCFLAGS'] ccflags['fast'] += env['LTO_CCFLAGS']
ldflags['fast'] += env['LTO_LDFLAGS'] ldflags['fast'] += env['LTO_LDFLAGS']
elif env['SUNCC']:
ccflags['debug'] += ['-g0']
ccflags['opt'] += ['-O']
for target in ['fast', 'prof', 'perf']:
ccflags[target] += ['-fast']
elif env['ICC']:
ccflags['debug'] += ['-g', '-O0']
ccflags['opt'] += ['-O']
for target in ['fast', 'prof', 'perf']:
ccflags[target] += ['-fast']
elif env['CLANG']: elif env['CLANG']:
ccflags['debug'] += ['-g', '-O0'] ccflags['debug'] += ['-g', '-O0']
# opt, fast, prof and perf all share the same cc flags # opt, fast, prof and perf all share the same cc flags

View file

@ -1,4 +1,16 @@
/* /*
* Copyright (c) 2012 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
* not be construed as granting a license to any other intellectual
* property including but not limited to intellectual property relating
* to a hardware implementation of the functionality of the software
* licensed hereunder. You may use the software subject to the license
* terms below provided that you ensure that this notice is replicated
* unmodified and in its entirety in all distributions of the software,
* modified or unmodified, in source code or in binary form.
*
* Copyright (c) 2006 The Regents of The University of Michigan * Copyright (c) 2006 The Regents of The University of Michigan
* All rights reserved. * All rights reserved.
* *
@ -33,10 +45,7 @@
#include "config/have_static_assert.hh" #include "config/have_static_assert.hh"
//http://msdn2.microsoft.com/en-us/library/ms937669.aspx // http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html
//http://msdn2.microsoft.com/en-us/library/aa448724.aspx
//http://docs.sun.com/source/819-3688/sun.specific.html#marker-998278
//http://gcc.gnu.org/onlinedocs/gcc-3.3.1/gcc/Function-Attributes.html#Function%20Attributes
#if defined(__GNUC__) #if defined(__GNUC__)
#define M5_ATTR_NORETURN __attribute__((noreturn)) #define M5_ATTR_NORETURN __attribute__((noreturn))
@ -45,15 +54,6 @@
#define M5_VAR_USED __attribute__((unused)) #define M5_VAR_USED __attribute__((unused))
#define M5_ATTR_PACKED __attribute__ ((__packed__)) #define M5_ATTR_PACKED __attribute__ ((__packed__))
#define M5_NO_INLINE __attribute__ ((__noinline__)) #define M5_NO_INLINE __attribute__ ((__noinline__))
#elif defined(__SUNPRO_CC)
// this doesn't do anything with sun cc, but why not
#define M5_ATTR_NORETURN __sun_attr__((__noreturn__))
#define M5_DUMMY_RETURN return (0);
#define DO_PRAGMA(x) _Pragma(#x)
#define M5_VAR_USED
#define M5_PRAGMA_NORETURN(x) DO_PRAGMA(does_not_return(x))
#define M5_ATTR_PACKED __attribute__ ((__packed__))
#define M5_NO_INLINE __attribute__ ((__noinline__))
#else #else
#error "Need to define compiler options in base/compiler.hh" #error "Need to define compiler options in base/compiler.hh"
#endif #endif