[pushed] Darwin: Correct a version check.

Message ID 20240402112607.86615-1-iain@sandoe.co.uk
State Committed
Commit 451bb0b9262d2f54173937569a29d7f1ad234e30
Headers
Series [pushed] Darwin: Correct a version check. |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gcc_build--master-arm warning Patch is already merged
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 warning Patch is already merged

Commit Message

Iain Sandoe April 2, 2024, 11:26 a.m. UTC
  Tested on x86_64-darwin17,21,23, pushed to trunk, thanks,
Iain

--- 8< ---

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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/gcc/config/darwin.cc b/gcc/config/darwin.cc
index c37a1a4756f..63b8c509405 100644
--- a/gcc/config/darwin.cc
+++ b/gcc/config/darwin.cc
@@ -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)