From dca9066e7deda6182b722ee4373f08909b8236d9 Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Mon, 1 Apr 2024 20:47:25 +0100 Subject: [PATCH] Darwin: Correct a version check. 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.c (darwin_override_options): Update the clang major version value in the dsymutil check. Signed-off-by: Iain Sandoe (cherry picked from commit 451bb0b9262d2f54173937569a29d7f1ad234e30) --- gcc/config/darwin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c index 0564e6f0218b..574424ac11ca 100644 --- a/gcc/config/darwin.c +++ b/gcc/config/darwin.c @@ -3369,7 +3369,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) -- 2.47.2