0001-configure-Fix-check-tcg-not-executing-any-tests.patch 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. From f295491361ed7fbe729ef6f029d83f68b8e2bee3 Mon Sep 17 00:00:00 2001
  2. From: Mukilan Thiyagarajan <quic_mthiyaga@quicinc.com>
  3. Date: Wed, 21 Dec 2022 09:04:06 +0000
  4. Subject: [PATCH] configure: Fix check-tcg not executing any tests
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. After configuring with --target-list=hexagon-linux-user
  9. running `make check-tcg` just prints the following:
  10. ```
  11. make: Nothing to be done for 'check-tcg'
  12. ```
  13. In the probe_target_compiler function, the 'break'
  14. command is used incorrectly. There are no lexically
  15. enclosing loops associated with that break command which
  16. is an unspecfied behaviour in the POSIX standard.
  17. The dash shell implementation aborts the currently executing
  18. loop, in this case, causing the rest of the logic for the loop
  19. in line 2490 to be skipped, which means no Makefiles are
  20. generated for the tcg target tests.
  21. Fixes: c3b570b5a9a24d25 (configure: don't enable
  22. cross compilers unless in target_list)
  23. Signed-off-by: Mukilan Thiyagarajan <quic_mthiyaga@quicinc.com>
  24. Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
  25. Link: https://patchew.org/QEMU/20221207082309.9966-1-quic._5Fmthiyaga@quicinc.com/
  26. Message-Id: <20221207082309.9966-1-quic_mthiyaga@quicinc.com>
  27. Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
  28. Message-Id: <20221221090411.1995037-2-alex.bennee@linaro.org>
  29. Upstream-Status: Backport [https://github.com/qemu/qemu/commit/73acb87be536d23e42db73a306104d8fd316ff20]
  30. Signed-off-by: Alexander Kanavin <alex@linutronix.de>
  31. ---
  32. configure | 4 +---
  33. 1 file changed, 1 insertion(+), 3 deletions(-)
  34. diff --git a/configure b/configure
  35. index 0c1db72b8..6b4589273 100755
  36. --- a/configure
  37. +++ b/configure
  38. @@ -1881,9 +1881,7 @@ probe_target_compiler() {
  39. # We shall skip configuring the target compiler if the user didn't
  40. # bother enabling an appropriate guest. This avoids building
  41. # extraneous firmware images and tests.
  42. - if test "${target_list#*$1}" != "$1"; then
  43. - break;
  44. - else
  45. + if test "${target_list#*$1}" = "$1"; then
  46. return 1
  47. fi