]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Darwin: Correct a version check.
authorIain Sandoe <iain@sandoe.co.uk>
Mon, 1 Apr 2024 19:47:25 +0000 (20:47 +0100)
committerIain Sandoe <iain@sandoe.co.uk>
Tue, 2 Apr 2024 11:24:31 +0000 (12:24 +0100)
When the version for dsymutil comes from a clang build, it is
of the form NNmm.pp.qq where NN and mm are the major and minor
LLVM version components.  We need to check for a major version
greater than or equal to 7 - so use 700 in the check.

gcc/ChangeLog:

* config/darwin.cc (darwin_override_options): Update the
clang major version value in the dsymutil check.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
gcc/config/darwin.cc

index c37a1a4756f20c6fe23b569676a7a82b112d8bf2..63b8c509405d22c0b5356a95337e907bc43062bd 100644 (file)
@@ -3420,7 +3420,7 @@ darwin_override_options (void)
       /* External toolchains based on LLVM or clang 7+ have support for
         dwarf-4.  */
       if ((dsymutil_version.kind == LLVM && dsymutil_version.major >= 7)
-         || (dsymutil_version.kind == CLANG && dsymutil_version.major >= 7))
+         || (dsymutil_version.kind == CLANG && dsymutil_version.major >= 700))
        dwarf_version = 4;
       else if (dsymutil_version.kind == DWARFUTILS
               && dsymutil_version.major >= 121)