diff options
author | Greg Noel <GregNoel@tigris.org> | 2008-09-12 08:50:56 (GMT) |
---|---|---|
committer | Greg Noel <GregNoel@tigris.org> | 2008-09-12 08:50:56 (GMT) |
commit | 03e8064ca29643a22c0f37fda4e8ff6cbd7acf1d (patch) | |
tree | a36cc8e0a326a631fc1928a2f782d83db07fe137 /src/engine/SCons/Tool/gcc.py | |
parent | d23fa934f9057475f222c1241ffb22662ce005c2 (diff) | |
download | SCons-03e8064ca29643a22c0f37fda4e8ff6cbd7acf1d.zip SCons-03e8064ca29643a22c0f37fda4e8ff6cbd7acf1d.tar.gz SCons-03e8064ca29643a22c0f37fda4e8ff6cbd7acf1d.tar.bz2 |
Add common subproc function and modify routines to use it
Diffstat (limited to 'src/engine/SCons/Tool/gcc.py')
-rw-r--r-- | src/engine/SCons/Tool/gcc.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/engine/SCons/Tool/gcc.py b/src/engine/SCons/Tool/gcc.py index 4e81ba8..232d64a 100644 --- a/src/engine/SCons/Tool/gcc.py +++ b/src/engine/SCons/Tool/gcc.py @@ -53,13 +53,9 @@ def generate(env): env['SHCCFLAGS'] = SCons.Util.CLVar('$CCFLAGS -fPIC') # determine compiler version if env['CC']: - try: - pipe = subprocess.Popen([env['CC'], '--version'], - env=env['ENV'], - stderr = subprocess.PIPE, - stdout = subprocess.PIPE) - except OSError: - return + pipe = SCons.Action._subproc(env, [env['CC'], '--version'], + stderr = subprocess.PIPE, + stdout = subprocess.PIPE) # -dumpversion was added in GCC 3.0. As long as we're supporting # GCC versions older than that, we should use --version and a # regular expression. |