diff options
author | Andreas Hansson <andreas.hansson@arm.com> | 2015-06-09 09:21:11 -0400 |
---|---|---|
committer | Andreas Hansson <andreas.hansson@arm.com> | 2015-06-09 09:21:11 -0400 |
commit | b29e55d44a70de6ed126a03fcd938bfe34a3a8a5 (patch) | |
tree | 6beab27d66677e5afa0b2a7aa1b04a1236d902fb /SConstruct | |
parent | 6599dd87c8332e4db3d898c9a28531ce2740c37f (diff) | |
download | gem5-b29e55d44a70de6ed126a03fcd938bfe34a3a8a5.tar.xz |
scons: Allow GNU assembler version strings with hyphen
Make scons a bit more forgiving when determining the GNU assembler version.
Diffstat (limited to 'SConstruct')
-rwxr-xr-x | SConstruct | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/SConstruct b/SConstruct index d229960c2..981cd0da9 100755 --- a/SConstruct +++ b/SConstruct @@ -599,10 +599,16 @@ if main['GCC']: # assemblers detect this as an error, "Error: expecting string # instruction after `rep'" if compareVersions(gcc_version, "4.8") > 0: - as_version = readCommand([main['AS'], '-v', '/dev/null'], - exception=False).split() + as_version_raw = readCommand([main['AS'], '-v', '/dev/null'], + exception=False).split() - if not as_version or compareVersions(as_version[-1], "2.23") < 0: + # version strings may contain extra distro-specific + # qualifiers, so play it safe and keep only what comes before + # the first hyphen + as_version = as_version_raw[-1].split('-')[0] if as_version_raw \ + else None + + if not as_version or compareVersions(as_version, "2.23") < 0: print termcap.Yellow + termcap.Bold + \ 'Warning: This combination of gcc and binutils have' + \ ' known incompatibilities.\n' + \ |