[gcc r17-2761] Disable CFI directives on hppa*-*-hpux*

John David Anglin via Gcc-cvs <[email protected]>
Newsgroups gmane.comp.gcc.cvs
Message-ID <[email protected]>
https://gcc.gnu.org/g:e818a48fc88685246852739a969194e24857013f

commit r17-2761-ge818a48fc88685246852739a969194e24857013f
Author: John David Anglin <[email protected]>
Date:   Tue Jul 28 15:11:39 2026 -0400

    Disable CFI directives on hppa*-*-hpux*
    
    We want to use difference expressions in the .eh_frame section for
    EH encoding but gas defines CFI_DIFF_EXPR_OK to 0.  So, we need to
    disable generation of CFI directives on hppa*-*-hpux*.  GCC will
    generate the difference expressions itself.
    
    2026-07-28  John David Anglin  <[email protected]>
    
    gcc/ChangeLog:
    
            * configure.ac: Set gcc_cv_as_cfi_directive to no on
            hppa*-*-hpux*.
            * configure: Regenerate.

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

diff --git a/gcc/configure b/gcc/configure
index be2b9c9aad90..a9cf7ab081a3 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -27244,6 +27244,14 @@ else
   test $ac_status = 0; }; }
     then
 	case "$target" in
+  hppa*-*-hpux*)
+    # The HP dynamic linker relocates text and data separately, so
+    # differences between text and data don't work.  As a result,
+    # gas defines CFI_DIFF_EXPR_OK to 0.  We want to use difference
+    # expressions for symbols in the data segment, so we need to
+    # make sure CFI directives aren't emitted.
+    gcc_cv_as_cfi_directive=no
+    ;;
   *-*-solaris*)
     # If the linker used on Solaris (like Sun ld) isn't capable of merging
     # read-only and read-write sections, we need to make sure that the
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 763b094d6cf8..5d315a115910 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -3549,6 +3549,14 @@ gcc_GAS_CHECK_FEATURE([cfi directives], gcc_cv_as_cfi_directive,,
 	.cfi_escape 1, 2, 3, 4, 5
 	.cfi_endproc],
 [case "$target" in
+  hppa*-*-hpux*)
+    # The HP dynamic linker relocates text and data separately, so
+    # differences between text and data don't work.  As a result,
+    # gas defines CFI_DIFF_EXPR_OK to 0.  We want to use difference
+    # expressions for symbols in the data segment, so we need to
+    # make sure CFI directives aren't emitted.
+    gcc_cv_as_cfi_directive=no
+    ;;
   *-*-solaris*)
     # If the linker used on Solaris (like Sun ld) isn't capable of merging
     # read-only and read-write sections, we need to make sure that the
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.