commit:     c92086906ae712ffe5cd5dde9ad470f3950695d8
Author:     Benjamin Gilbert <bgilbert <AT> backtick <DOT> net>
AuthorDate: Sat Sep 23 11:09:50 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Sep 23 12:21:29 2023 +0000
URL:        https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=c9208690

Fix check for installed LLVM

It always succeeds, and then if LLVM isn't installed, crossdev fails with
a confusing error:

    Target architecture not supported by installed LLVM toolchain

Signed-off-by: Benjamin Gilbert <bgilbert <AT> backtick.net>
Closes: https://github.com/gentoo/crossdev/pull/14
Signed-off-by: Sam James <sam <AT> gentoo.org>

 crossdev | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/crossdev b/crossdev
index b84b757..f6ad232 100755
--- a/crossdev
+++ b/crossdev
@@ -1722,7 +1722,7 @@ if ! ex_fast ; then
 
        # stage 0: binutils
        if [[ "${LLVM}" == "yes" ]] ; then
-               if [[ $(portageq has_version / "sys-devel/llvm") -ne 0 ]] ; then
+               if ! portageq has_version / "sys-devel/llvm" ; then
                        eerror "LLVM is not installed"
                        exit 1
                fi

Reply via email to