diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2016-01-04 17:18:41 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2016-01-04 17:18:41 -0500 |
commit | 46127111c3cad66f6ec1e6db1d75e3db063fd1a0 (patch) | |
tree | dc1778f6b028b63865d3dc5849c4b813d8e52a34 /SConstruct | |
parent | 772eedf8a13c2c0468b1fd94beb5406dbfcb3b6e (diff) | |
download | gpsd-46127111c3cad66f6ec1e6db1d75e3db063fd1a0.tar.gz |
Address Savannah bug #44648: GPSD won't build...
...if CCFLAGS contains options that are only compatible with the cross-compiler
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -1094,10 +1094,23 @@ else: # ensure that we build the python modules with scan-build, too if env['CC'] is None or env['CC'].find('scan-build') < 0: python_env['CC'] = cc + # As we seem to be changing compilers we must assume that the + # CCFLAGS are incompatible with the new compiler. If we should + # use other flags, the variable or the variable for this + # should be predefined. + if cc.split()[0] != env['CC']: + python_env['CCFLAGS'] = '' else: python_env['CC'] = ' '.join([env['CC']] + cc.split()[1:]) if env['CXX'] is None or env['CXX'].find('scan-build') < 0: python_env['CXX'] = cxx + # As we seem to be changing compilers we must assume that the + # CCFLAGS or CXXFLAGS are incompatible with the new + # compiler. If we should use other flags, the variable or the + # variable for this should be predefined. + if cxx.split()[0] != env['CXX']: + python_env['CCFLAGS'] = '' + python_env['CXXFLAGS'] = '' else: python_env['CXX'] = ' '.join([env['CXX']] + cxx.split()[1:]) |