summaryrefslogtreecommitdiff
path: root/lib/spack/spack/compilers/gcc.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/spack/spack/compilers/gcc.py')
-rw-r--r--lib/spack/spack/compilers/gcc.py26
1 files changed, 14 insertions, 12 deletions
diff --git a/lib/spack/spack/compilers/gcc.py b/lib/spack/spack/compilers/gcc.py
index 073219dc20..638051008f 100644
--- a/lib/spack/spack/compilers/gcc.py
+++ b/lib/spack/spack/compilers/gcc.py
@@ -22,18 +22,20 @@
# along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
-#
-# This is a stub module. It should be expanded when we implement full
-# compiler support.
-#
+from spack.compiler import Compiler
+
+class Gcc(Compiler):
+ # Subclasses use possible names of C compiler
+ cc_names = ['gcc']
+
+ # Subclasses use possible names of C++ compiler
+ cxx_names = ['g++']
-import subprocess
-from spack.version import Version
+ # Subclasses use possible names of Fortran 77 compiler
+ f77_names = ['gfortran']
-cc = 'gcc'
-cxx = 'g++'
-fortran = 'gfortran'
+ # Subclasses use possible names of Fortran 90 compiler
+ f90_names = ['gfortran']
-def get_version():
- v = subprocess.check_output([cc, '-dumpversion'])
- return Version(v)
+ def __init__(self, cc, cxx, f77, f90):
+ super(Gcc, self).__init__(cc, cxx, f77, f90)