https://gcc.gnu.org/g:4a84a19674ff7146b38449ddffda1b8d36da118f

commit r16-3496-g4a84a19674ff7146b38449ddffda1b8d36da118f
Author: Iain Sandoe <i...@sandoe.co.uk>
Date:   Mon Sep 1 14:05:48 2025 +0100

    configure, Darwin: Do not claim .cfi_xxx instruction support.
    
    While the assemblers used by Darwin that are based on LLVM, do
    support .cfi_ instructions, their use triggers production of
    compact unwind which currently does not interwork properly with
    GCC's output.
    
    When the system objdump is used in the configure process this is
    currently working by good fortune (the objdump does not recognise
    the command and we fail to detect the cfi_advance.
    
    However, if a user has binutils objdump earlier in thier PATH then
    we will detect support and try to use .cfi_ which will cause later
    and hard-to-diagnose issues.
    
    Until we have this resolved, force cfi instruction use off for
    Darwin.
    
    gcc/ChangeLog:
    
            * configure: Regenerate.
            * configure.ac: Do not claim cfi instruction support even
            if the assembler has it.
    
    Signed-off-by: Iain Sandoe <i...@sandoe.co.uk>

Diff:
---
 gcc/configure    | 6 ++++++
 gcc/configure.ac | 6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/gcc/configure b/gcc/configure
index 8aff04fa2936..5a779db0a29f 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -26639,6 +26639,12 @@ else
       esac
     fi
     ;;
+  x86_64-*-darwin* | i?86-*-darwin* | powerpc*-darwin-*)
+    # Darwin has assemblers that support .cfi_ instructions, but that then
+    # triggers emission of compact unwind which has incompatibilities with
+    # current GCC output.
+    gcc_cv_as_cfi_directive=no
+    ;;
   *-*-*)
     gcc_cv_as_cfi_directive=yes
     ;;
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 2532523b0025..7e57d527ecdd 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -3403,6 +3403,12 @@ gcc_GAS_CHECK_FEATURE([cfi directives], 
gcc_cv_as_cfi_directive,,
       esac
     fi
     ;;
+  x86_64-*-darwin* | i?86-*-darwin* | powerpc*-darwin-*)
+    # Darwin has assemblers that support .cfi_ instructions, but that then
+    # triggers emission of compact unwind which has incompatibilities with
+    # current GCC output.
+    gcc_cv_as_cfi_directive=no
+    ;;
   *-*-*)
     gcc_cv_as_cfi_directive=yes
     ;;

Reply via email to