2024-01-18 John David Anglin <danglin@gcc.gnu.org>
gcc/ChangeLog:
PR tree-optimization/69807
* config/pa/pa.cc (pa_option_override): Set flag_pie on TARGET_64BIT.
gcc/testsuite/ChangeLog:
* gcc.dg/pic-2.c: Skip on hppa*64*-*-*.
if (flag_pic == 1 || TARGET_64BIT)
flag_pic = 2;
+ /* 64-bit target is always PIE. */
+ if (TARGET_64BIT)
+ flag_pie = 2;
+
/* Disable -freorder-blocks-and-partition as we don't support hot and
cold partitioning. */
if (flag_reorder_blocks_and_partition)
/* { dg-options "-fPIC" } */
/* { dg-skip-if "__PIC__ is always 1 for MIPS" { mips*-*-* } } */
/* { dg-skip-if "__PIE__ is always defined for GCN" { amdgcn*-*-* } } */
+/* { dg-skip-if "__PIE__ is always defined for hppa64" { hppa*64*-*-* } } */
#if defined(__CYGWIN__) || defined(__WIN32__)
# if __PIC__ != 1