
_ARG2ABI = {'x86': 'ia32', 'amd64': 'em64t', 'default': 'ia32'}

def get_abi(env):
    try:
        abi = env['ICC_ABI']
    except KeyError:
        abi = 'default'

    try:
        return _ARG2ABI[abi]
    except KeyError:
        ValueError("Unknown abi %s" % abi)


_ARG2ABI = {'x86': 'ia32', 'amd64': 'em64t', 'default': 'ia32'}

def get_abi(env, lang='C'):
    if lang == 'C' or lang == 'CXX':
        try:
            abi = env['ICC_ABI']
        except KeyError:
            abi = 'default'
    elif lang == 'FORTRAN':
        try:
            abi = env['IFORT_ABI']
        except KeyError:
            abi = 'default'

    try:
        return _ARG2ABI[abi]
    except KeyError:
        ValueError("Unknown abi %s" % abi)

Add a language argument to get abi for intel tools.
Add a language argument to get abi for intel tools.

  
  _ARG2ABI = {'x86': 'ia32', 'amd64': 'em64t', 'default': 'ia32'}
  
- def get_abi(env):
+ def get_abi(env, lang='C'):
+     if lang == 'C' or lang == 'CXX':
-     try:
+         try:
-         abi = env['ICC_ABI']
+             abi = env['ICC_ABI']
-     except KeyError:
+         except KeyError:
-         abi = 'default'
+             abi = 'default'
+     elif lang == 'FORTRAN':
+         try:
+             abi = env['IFORT_ABI']
+         except KeyError:
+             abi = 'default'
  
      try:
          return _ARG2ABI[abi]
      except KeyError:
          ValueError("Unknown abi %s" % abi)
  
Add a language argument to get abi for intel tools.
## Code Before:

_ARG2ABI = {'x86': 'ia32', 'amd64': 'em64t', 'default': 'ia32'}

def get_abi(env):
    try:
        abi = env['ICC_ABI']
    except KeyError:
        abi = 'default'

    try:
        return _ARG2ABI[abi]
    except KeyError:
        ValueError("Unknown abi %s" % abi)

## Instruction:
Add a language argument to get abi for intel tools.
## Code After:

_ARG2ABI = {'x86': 'ia32', 'amd64': 'em64t', 'default': 'ia32'}

def get_abi(env, lang='C'):
    if lang == 'C' or lang == 'CXX':
        try:
            abi = env['ICC_ABI']
        except KeyError:
            abi = 'default'
    elif lang == 'FORTRAN':
        try:
            abi = env['IFORT_ABI']
        except KeyError:
            abi = 'default'

    try:
        return _ARG2ABI[abi]
    except KeyError:
        ValueError("Unknown abi %s" % abi)
