Skip to content

Commit

Permalink
Fixing compiler_version for Fedora.
Browse files Browse the repository at this point in the history
BUG=353433

Review URL: https://codereview.chromium.org/195923004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257716 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
mithro@mithis.com committed Mar 18, 2014
1 parent e8ee625 commit 2ea79a2
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions build/compiler_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,21 @@ def GetVersion(compiler, tool):
version_re = re.compile(r"(\d+)\.(\d+)")
elif tool == "assembler":
compiler = compiler + " -Xassembler --version -x assembler -c /dev/null"
# GNU assembler (GNU Binutils for Ubuntu) 2.22
version_re = re.compile(r"GNU [^ ]+ \(.*\) (\d+).(\d+)")
# Unmodified: GNU assembler (GNU Binutils) 2.24
# Ubuntu: GNU assembler (GNU Binutils for Ubuntu) 2.22
# Fedora: GNU assembler version 2.23.2
version_re = re.compile(r"^GNU [^ ]+ .* (\d+).(\d+).*?$", re.M)
elif tool == "linker":
compiler = compiler + " -Xlinker --version"
# GNU gold (GNU Binutils for Ubuntu 2.22) 1.11
version_re = re.compile(r"GNU [^ ]+ \(.*\) (\d+).(\d+)")
# Using BFD linker
# Unmodified: GNU ld (GNU Binutils) 2.24
# Ubuntu: GNU ld (GNU Binutils for Ubuntu) 2.22
# Fedora: GNU ld version 2.23.2
# Using Gold linker
# Unmodified: GNU gold (GNU Binutils 2.24) 1.11
# Ubuntu: GNU gold (GNU Binutils for Ubuntu 2.22) 1.11
# Fedora: GNU gold (version 2.23.2) 1.11
version_re = re.compile(r"^GNU [^ ]+ .* (\d+).(\d+).*?$", re.M)
else:
raise Exception("Unknown tool %s" % tool)

Expand Down

0 comments on commit 2ea79a2

Please sign in to comment.