diff options
author | Andreas Hansson <andreas.hansson@arm.com> | 2013-09-18 08:46:32 -0400 |
---|---|---|
committer | Andreas Hansson <andreas.hansson@arm.com> | 2013-09-18 08:46:32 -0400 |
commit | cecb951f603bd3105a0de0fdf9fefa9780c2f20e (patch) | |
tree | 3a04e24ed1fab8e765eeb2e53d0a5fb0f3020bdd /SConstruct | |
parent | fe5212f9328c10939bbd062c7c57b4c299376803 (diff) | |
download | gem5-cecb951f603bd3105a0de0fdf9fefa9780c2f20e.tar.xz |
swig: Warn on use of incompatible swig/gcc combinations
This patch removes the fixed swig warning concerning 2.0.9/2.0.10 and
adds a warning message for incompatible combinations of swig and gcc.
Diffstat (limited to 'SConstruct')
-rwxr-xr-x | SConstruct | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/SConstruct b/SConstruct index a2ccac05f..578c65394 100755 --- a/SConstruct +++ b/SConstruct @@ -730,14 +730,16 @@ if compareVersions(swig_version[2], min_swig_version) < 0: print ' Installed version:', swig_version[2] Exit(1) -if swig_version[2] in ["2.0.9", "2.0.10"]: +# Older versions of swig do not play well with more recent versions of +# gcc due to assumptions on implicit includes (cstddef) and use of +# namespaces +if main['GCC'] and compareVersions(gcc_version, '4.6') > 0 and \ + compareVersions(swig_version[2], '2') < 0: print '\n' + termcap.Yellow + termcap.Bold + \ - 'Warning: SWIG version 2.0.9/10 sometimes generates broken code.\n' + \ + 'Warning: SWIG 1.x cause issues with gcc 4.6 and later.\n' + \ termcap.Normal + \ - 'This problem only affects some platforms and some Python\n' + \ - 'versions. See the following SWIG bug report for details:\n' + \ - 'http://sourceforge.net/p/swig/bugs/1297/\n' - + 'Use SWIG 2.x to avoid assumptions on implicit includes\n' + \ + 'and use of namespaces\n' # Set up SWIG flags & scanner swig_flags=Split('-c++ -python -modern -templatereduce $_CPPINCFLAGS') |