diff options
| author | David Holsgrove <david.holsgrove@xilinx.com> | 2014-12-30 10:55:48 +1000 |
|---|---|---|
| committer | Nathan Rossi <nathan.rossi@xilinx.com> | 2014-12-30 11:04:45 +1000 |
| commit | ffadbb0b7f5880ef2d7b3667e2d20f5d27538363 (patch) | |
| tree | 0dd5f3c9d1d7852fba14fef1195d40f1697b4492 /conf/distro | |
| parent | 05ca55921548e949c7c95f9a85c568a673d4ad40 (diff) | |
| download | meta-xilinx-ffadbb0b7f5880ef2d7b3667e2d20f5d27538363.tar.gz | |
external-xilinx-toolchain: Fix version detection for gcc
* Account for blank line in gcc -v output
Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
Diffstat (limited to 'conf/distro')
| -rw-r--r-- | conf/distro/include/xilinx-versions.inc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/conf/distro/include/xilinx-versions.inc b/conf/distro/include/xilinx-versions.inc index 8d39789c..4e44f07a 100644 --- a/conf/distro/include/xilinx-versions.inc +++ b/conf/distro/include/xilinx-versions.inc | |||
| @@ -21,8 +21,11 @@ def csl_get_version(d): | |||
| 21 | bb.error('Make sure that MACHINE is set correctly in your local.conf and the toolchain supports %s.' % d.getVar("TARGET_ARCH", True)) | 21 | bb.error('Make sure that MACHINE is set correctly in your local.conf and the toolchain supports %s.' % d.getVar("TARGET_ARCH", True)) |
| 22 | return 'UNKNOWN' | 22 | return 'UNKNOWN' |
| 23 | else: | 23 | else: |
| 24 | last_line = stderr.splitlines()[-1] | 24 | lines = stderr.splitlines() |
| 25 | return last_line | 25 | for i in reversed(range(len(lines))): |
| 26 | if len(lines[i]) != 0: | ||
| 27 | return lines[i] | ||
| 28 | return 'UNKNOWN' | ||
| 26 | 29 | ||
| 27 | def csl_get_main_version(d): | 30 | def csl_get_main_version(d): |
| 28 | version = csl_get_version(d) | 31 | version = csl_get_version(d) |
