Revision acbdabb7

View differences:

configure
296 296
  return (libs, cflags)
297 297

  
298 298

  
299
def cc_macros():
300
  """Checks predefined macros using the CC command."""
299
def cc_macros(cc=None):
300
  """Checks predefined macros using the C compiler command."""
301

  
302
  if cc is None:
303
    cc = CC
301 304

  
302 305
  try:
303
    p = subprocess.Popen(shlex.split(CC) + ['-dM', '-E', '-'],
306
    p = subprocess.Popen(shlex.split(cc) + ['-dM', '-E', '-'],
304 307
                         stdin=subprocess.PIPE,
305 308
                         stdout=subprocess.PIPE,
306 309
                         stderr=subprocess.PIPE)
......
375 378
def host_arch_cc():
376 379
  """Host architecture check using the CC command."""
377 380

  
378
  k = cc_macros()
381
  # use 'cc', as CC may be set to a target arch compiler command
382
  # in case of cross-compilation
383
  k = cc_macros('cc')
379 384

  
380 385
  matchup = {
381 386
    '__x86_64__'  : 'x64',

Also available in: Unified diff