openocd: fix build error

The update of RANLIB environment to "ranlib -D" in OE caused an error in
the openocd executable check. Indeed it is not compatible with a
environment compound with the tool name and a parameter.

cc.tcl:272: Error: wrong # args: should be "find-executable name"
configure: error: ./configure.gnu failed for jimtcl

This patch fixes it by patching openocd executable test to check the first
word of the environment only.

Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Kory Maincent 2022-11-08 10:56:06 +01:00 committed by Khem Raj
parent 7a52d62deb
commit b1381caa61
2 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,30 @@
From 29e8dfae4593c91f11d7ea31a4722a6d82f6c950 Mon Sep 17 00:00:00 2001
From: Kory Maincent <kory.maincent@bootlin.com>
Date: Wed, 2 Nov 2022 16:39:30 +0100
Subject: [PATCH] autosetup: cc-check-tools: check only the name of the tool
without its params
Update the tool existence check. Test only the first word of the
args to keep only the executable without its parameters.
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
---
autosetup/cc.tcl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/jimtcl/autosetup/cc.tcl b/jimtcl/autosetup/cc.tcl
index 585d259..4c87854 100644
--- a/jimtcl/autosetup/cc.tcl
+++ b/jimtcl/autosetup/cc.tcl
@@ -264,7 +264,7 @@ proc cc-check-tools {args} {
foreach tool $args {
set TOOL [string toupper $tool]
set exe [get-env $TOOL [get-define cross]$tool]
- if {[find-executable {*}$exe]} {
+ if {[find-executable {*}[regexp -inline {\S+} $exe]]} {
define $TOOL $exe
continue
}
--
2.25.1

View File

@ -9,6 +9,7 @@ SRC_URI = " \
git://repo.or.cz/r/git2cl.git;protocol=http;destsuffix=tools/git2cl;name=git2cl;branch=master \
git://repo.or.cz/r/jimtcl.git;protocol=http;destsuffix=git/jimtcl;name=jimtcl;branch=master \
git://repo.or.cz/r/libjaylink.git;protocol=http;destsuffix=git/src/jtag/drivers/libjaylink;name=libjaylink;branch=master \
file://0001-autosetup-cc-check-tools-check-only-the-name.patch \
"
SRCREV_FORMAT = "openocd"