public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: John David Anglin <danglin@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r14-8260] hppa: Always enable PIE on 64-bit target
Date: Thu, 18 Jan 2024 22:46:57 +0000 (GMT)	[thread overview]
Message-ID: <20240118224657.564F23858D33@sourceware.org> (raw)

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

                 reply	other threads:[~2024-01-18 22:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240118224657.564F23858D33@sourceware.org \
    --to=danglin@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).