From 375662ed7cda243ab5cb95d9646d1e9888b41442 Mon Sep 17 00:00:00 2001 From: Thomas Nagy Date: Fri, 27 Feb 2015 17:02:03 +0100 Subject: Execurte rtems4.11-ld through ctx.cmd_and_log to improve portability (encoding, newlines) --- rtems_waf/configure.py | 4 +--- 1 file changed, 1 insertion(+), 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) -- cgit v1.2.3