summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Nagy <tnagy2pow10@gmail.com>2015-02-27 17:02:03 +0100
committerThomas Nagy <tnagy2pow10@gmail.com>2015-02-27 17:02:03 +0100
commitafabcccd5de42029fa0008c13e4d8d802fb6108c (patch)
treec1bb22b5a347c9c85aa0e347e6e205150f5c1878
parentc60bddddbe9b9ff5ff0a462eefae3eec0a3d428e (diff)
Execurte rtems4.11-ld through ctx.cmd_and_log to improve portability (encoding, newlines)
-rw-r--r--rtems_waf/configure.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/rtems_waf/configure.py b/rtems_waf/configure.py
index db93f293e7..aceb0a5518 100644
--- a/rtems_waf/configure.py
+++ b/rtems_waf/configure.py
@@ -156,9 +156,7 @@ def depend_version(ctx):
ctx.start_msg("Checking Binutils version")
cmd = ctx.env.BIN_RTEMS_LD + ["-v"]
- p = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=None)
- stdout, stderr = p.communicate()
- ctx.env.LD_VERSION = stdout.decode("utf-8").split(" ")[4].replace("\n", "")
+ ctx.env.LD_VERSION = ctx.cmd_and_log(cmd, quiet=0).strip().split(" ")[-1]
ctx.end_msg(ctx.env.LD_VERSION)