13
0

remove unnecessary and *nix-centric LANG= from start of command used to get gcc version; use python's platform.uname() rather than os.uname() to get platform information

This commit is contained in:
Paul Davis 2013-12-05 14:43:32 -05:00
parent 75212b28b2
commit 60134ddcba

View File

@ -6,6 +6,7 @@ import re
import string
import subprocess
import sys
import platform as PLATFORM
def fetch_git_revision ():
cmd = "git describe HEAD"
@ -85,7 +86,7 @@ i18n_children = [
# Version stuff
def fetch_gcc_version (CC):
cmd = "LANG= %s --version" % CC
cmd = "%s --version" % CC
output = subprocess.Popen(cmd, shell=True, stderr=subprocess.STDOUT, stdout=subprocess.PIPE).communicate()[0].splitlines()
o = output[0].decode('utf-8')
version = o.split(' ')[2].split('.')
@ -127,7 +128,7 @@ def set_compiler_flags (conf,opt):
optimization_flags = []
debug_flags = []
u = os.uname ()
u = PLATFORM.uname ()
cpu = u[4]
platform = u[0].lower()
version = u[2]