]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
configure, Darwin: Do not claim .cfi_xxx instruction support.
authorIain Sandoe <iain@sandoe.co.uk>
Mon, 1 Sep 2025 13:05:48 +0000 (14:05 +0100)
committerIain Sandoe <iain@sandoe.co.uk>
Mon, 1 Sep 2025 18:13:42 +0000 (19:13 +0100)
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 <iain@sandoe.co.uk>
gcc/configure
gcc/configure.ac

index 8aff04fa29367610ccedde54cfb27f69a900bd0c..5a779db0a29f55ee85f80dbc8b46c9c6ab8ba5df 100755 (executable)
@@ -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
     ;;
index 2532523b002508d2147919e9b51938905d0d374b..7e57d527ecdde5d978614d67ed43ece28fd0d948 100644 (file)
@@ -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
     ;;