diff --git a/devito/arch/compiler.py b/devito/arch/compiler.py index b33f755972a..ba482acbb90 100644 --- a/devito/arch/compiler.py +++ b/devito/arch/compiler.py @@ -861,6 +861,7 @@ def __new__(cls, *args, **kwargs): obj = super().__new__(cls) # Keep base to initialize accordingly obj._base = _base + obj._cpp = _base._cpp return obj @@ -874,10 +875,11 @@ def __init_finalize__(self, **kwargs): self.ldflags = filter_ordered(self.ldflags + extrald) def __lookup_cmds__(self): - self.CC = environ.get('CC', 'gcc') - self.CXX = environ.get('CXX', 'g++') - self.MPICC = environ.get('MPICC', 'mpicc') - self.MPICXX = environ.get('MPICXX', 'mpicxx') + self._base.__lookup_cmds__(self) + self.CC = environ.get('CC', self.CC) + self.CXX = environ.get('CXX', self.CXX) + self.MPICC = environ.get('MPICC', self.MPICC) + self.MPICXX = environ.get('MPICXX', self.MPICXX) compiler_registry = {