0001-autosetup-cc-check-tools-check-only-the-name.patch 968 B

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