public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix two test failures with --enable-default-pie [PR70150]
@ 2024-05-06  4:45 Xi Ruoyao
  2024-05-06  4:45 ` [PATCH 1/2] i386: testsuite: Add -no-pie for pr113689-1.c [PR70150] Xi Ruoyao
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Xi Ruoyao @ 2024-05-06  4:45 UTC (permalink / raw)
  To: gcc-patches; +Cc: Jakub Jelinek, Xi Ruoyao

In GCC 14.1-rc1, there are two new (comparing to GCC 13) failures if
the build is configured --enable-default-pie.  Let's fix them.

Tested on x86_64-linux-gnu.  Ok for trunk and releases/gcc-14?

Xi Ruoyao (2):
  i386: testsuite: Add -no-pie for pr113689-1.c [PR70150]
  i386: testsuite: Adapt fentryname3.c for r14-811 change [PR70150]

 gcc/testsuite/gcc.target/i386/fentryname3.c | 3 +--
 gcc/testsuite/gcc.target/i386/pr113689-1.c  | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

-- 
2.45.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] i386: testsuite: Add -no-pie for pr113689-1.c [PR70150]
  2024-05-06  4:45 [PATCH 0/2] Fix two test failures with --enable-default-pie [PR70150] Xi Ruoyao
@ 2024-05-06  4:45 ` Xi Ruoyao
  2024-05-06  4:45 ` [PATCH 2/2] i386: testsuite: Adapt fentryname3.c for r14-811 change [PR70150] Xi Ruoyao
  2024-05-15  9:59 ` Ping: [PATCH 0/2] Fix two test failures with --enable-default-pie [PR70150] Xi Ruoyao
  2 siblings, 0 replies; 5+ messages in thread
From: Xi Ruoyao @ 2024-05-06  4:45 UTC (permalink / raw)
  To: gcc-patches; +Cc: Jakub Jelinek, Xi Ruoyao

For a --enable-default-pie build, using -fno-pic (for compiler) but
not -no-pie (for linker) triggers some linker warnings counted as
excess errors:

    /usr/bin/ld: /tmp/cc8MgxiR.o: warning: relocation in read-only
    section `.text.startup'
    /usr/bin/ld: warning: creating DT_TEXTREL in a PIE

gcc/testsuite/ChangeLog:

	PR testsuite/70150
	* gcc.target/i386/pr113689-1.c (dg-options): Add -no-pie.
---
 gcc/testsuite/gcc.target/i386/pr113689-1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.target/i386/pr113689-1.c b/gcc/testsuite/gcc.target/i386/pr113689-1.c
index 9b8474ed933..0424db2dfdc 100644
--- a/gcc/testsuite/gcc.target/i386/pr113689-1.c
+++ b/gcc/testsuite/gcc.target/i386/pr113689-1.c
@@ -1,5 +1,5 @@
 /* { dg-do run { target { lp64 && fpic } } } */
-/* { dg-options "-O2 -fno-pic -fprofile -mcmodel=large" } */
+/* { dg-options "-O2 -fno-pic -no-pie -fprofile -mcmodel=large" } */
 /* { dg-skip-if "PR90698" { *-*-darwin* } } */
 /* { dg-skip-if "PR113909" { *-*-solaris2* } } */
 
-- 
2.45.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 2/2] i386: testsuite: Adapt fentryname3.c for r14-811 change [PR70150]
  2024-05-06  4:45 [PATCH 0/2] Fix two test failures with --enable-default-pie [PR70150] Xi Ruoyao
  2024-05-06  4:45 ` [PATCH 1/2] i386: testsuite: Add -no-pie for pr113689-1.c [PR70150] Xi Ruoyao
@ 2024-05-06  4:45 ` Xi Ruoyao
  2024-05-15  9:59 ` Ping: [PATCH 0/2] Fix two test failures with --enable-default-pie [PR70150] Xi Ruoyao
  2 siblings, 0 replies; 5+ messages in thread
From: Xi Ruoyao @ 2024-05-06  4:45 UTC (permalink / raw)
  To: gcc-patches; +Cc: Jakub Jelinek, Xi Ruoyao

After r14-811 "call *nop@GOTPCREL(%rip)" is only generated with
-mno-direct-extern-access even if --enable-default-pie.  So the r13-1614
change to this file is not valid anymore.

gcc/testsuite/ChangeLog:

	PR testsuite/70150
	* gcc.target/i386/fentryname3.c (dg-final): Revert r13-1614
	change.
---
 gcc/testsuite/gcc.target/i386/fentryname3.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/gcc/testsuite/gcc.target/i386/fentryname3.c b/gcc/testsuite/gcc.target/i386/fentryname3.c
index c14a4ebb0cf..bd7c997c178 100644
--- a/gcc/testsuite/gcc.target/i386/fentryname3.c
+++ b/gcc/testsuite/gcc.target/i386/fentryname3.c
@@ -3,8 +3,7 @@
 /* { dg-require-profiling "-pg" } */
 /* { dg-options "-pg -mfentry"  } */
 /* { dg-final { scan-assembler "section.*__entry_loc" } } */
-/* { dg-final { scan-assembler "0x0f, 0x1f, 0x44, 0x00, 0x00" { target nonpic } } } */
-/* { dg-final { scan-assembler "call\t\\*nop@GOTPCREL" { target { ! nonpic } } } } */
+/* { dg-final { scan-assembler "0x0f, 0x1f, 0x44, 0x00, 0x00" } } */
 /* { dg-final { scan-assembler-not "__fentry__" } } */
 
 __attribute__((fentry_name("nop"), fentry_section("__entry_loc")))
-- 
2.45.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Ping: [PATCH 0/2] Fix two test failures with --enable-default-pie [PR70150]
  2024-05-06  4:45 [PATCH 0/2] Fix two test failures with --enable-default-pie [PR70150] Xi Ruoyao
  2024-05-06  4:45 ` [PATCH 1/2] i386: testsuite: Add -no-pie for pr113689-1.c [PR70150] Xi Ruoyao
  2024-05-06  4:45 ` [PATCH 2/2] i386: testsuite: Adapt fentryname3.c for r14-811 change [PR70150] Xi Ruoyao
@ 2024-05-15  9:59 ` Xi Ruoyao
  2024-05-29  6:36   ` Ping^2: " Xi Ruoyao
  2 siblings, 1 reply; 5+ messages in thread
From: Xi Ruoyao @ 2024-05-15  9:59 UTC (permalink / raw)
  To: gcc-patches; +Cc: Jakub Jelinek

Ping.

On Mon, 2024-05-06 at 12:45 +0800, Xi Ruoyao wrote:
> In GCC 14.1-rc1, there are two new (comparing to GCC 13) failures if
> the build is configured --enable-default-pie.  Let's fix them.
> 
> Tested on x86_64-linux-gnu.  Ok for trunk and releases/gcc-14?
> 
> Xi Ruoyao (2):
>   i386: testsuite: Add -no-pie for pr113689-1.c [PR70150]
>   i386: testsuite: Adapt fentryname3.c for r14-811 change [PR70150]
> 
>  gcc/testsuite/gcc.target/i386/fentryname3.c | 3 +--
>  gcc/testsuite/gcc.target/i386/pr113689-1.c  | 2 +-
>  2 files changed, 2 insertions(+), 3 deletions(-)

-- 
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Ping^2: [PATCH 0/2] Fix two test failures with --enable-default-pie [PR70150]
  2024-05-15  9:59 ` Ping: [PATCH 0/2] Fix two test failures with --enable-default-pie [PR70150] Xi Ruoyao
@ 2024-05-29  6:36   ` Xi Ruoyao
  0 siblings, 0 replies; 5+ messages in thread
From: Xi Ruoyao @ 2024-05-29  6:36 UTC (permalink / raw)
  To: gcc-patches; +Cc: Jakub Jelinek

Ping again.

On Mon, 2024-05-06 at 12:45 +0800, Xi Ruoyao wrote:
> In GCC 14.1-rc1, there are two new (comparing to GCC 13) failures if
> the build is configured --enable-default-pie.  Let's fix them.
> 
> Tested on x86_64-linux-gnu.  Ok for trunk and releases/gcc-14?
> 
> Xi Ruoyao (2):
>   i386: testsuite: Add -no-pie for pr113689-1.c [PR70150]
>   i386: testsuite: Adapt fentryname3.c for r14-811 change [PR70150]
> 
>  gcc/testsuite/gcc.target/i386/fentryname3.c | 3 +--
>  gcc/testsuite/gcc.target/i386/pr113689-1.c  | 2 +-
>  2 files changed, 2 insertions(+), 3 deletions(-)


-- 
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-05-29  6:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-06  4:45 [PATCH 0/2] Fix two test failures with --enable-default-pie [PR70150] Xi Ruoyao
2024-05-06  4:45 ` [PATCH 1/2] i386: testsuite: Add -no-pie for pr113689-1.c [PR70150] Xi Ruoyao
2024-05-06  4:45 ` [PATCH 2/2] i386: testsuite: Adapt fentryname3.c for r14-811 change [PR70150] Xi Ruoyao
2024-05-15  9:59 ` Ping: [PATCH 0/2] Fix two test failures with --enable-default-pie [PR70150] Xi Ruoyao
2024-05-29  6:36   ` Ping^2: " Xi Ruoyao

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).