public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-8260] hppa: Always enable PIE on 64-bit target
@ 2024-01-18 22:46 John David Anglin
0 siblings, 0 replies; only message in thread
From: John David Anglin @ 2024-01-18 22:46 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:0c7c65c4c359f8bfa1ebcb7b1c409af314064da2
commit r14-8260-g0c7c65c4c359f8bfa1ebcb7b1c409af314064da2
Author: John David Anglin <danglin@gcc.gnu.org>
Date: Thu Jan 18 22:46:19 2024 +0000
hppa: Always enable PIE on 64-bit target
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*-*-*.
Diff:
---
gcc/config/pa/pa.cc | 4 ++++
gcc/testsuite/gcc.dg/pic-2.c | 1 +
2 files changed, 5 insertions(+)
diff --git a/gcc/config/pa/pa.cc b/gcc/config/pa/pa.cc
index 48a370cdc20..c58b0a0d75e 100644
--- a/gcc/config/pa/pa.cc
+++ b/gcc/config/pa/pa.cc
@@ -557,6 +557,10 @@ pa_option_override (void)
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)
diff --git a/gcc/testsuite/gcc.dg/pic-2.c b/gcc/testsuite/gcc.dg/pic-2.c
index 24260538cc0..074684604bc 100644
--- a/gcc/testsuite/gcc.dg/pic-2.c
+++ b/gcc/testsuite/gcc.dg/pic-2.c
@@ -3,6 +3,7 @@
/* { 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-01-18 22:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-18 22:46 [gcc r14-8260] hppa: Always enable PIE on 64-bit target John David Anglin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).