Tested on hppa64-hp-hpux11.11.  Committed to trunk.  Needed for
patch to remove dynamic relocations from .eh_frame.

Dave
---

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 --git a/gcc/configure.ac b/gcc/configure.ac
index 763b094d6cf..5d315a11591 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

Attachment: signature.asc
Description: PGP signature

Reply via email to