public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH][testsuite] Require shared effective target for some lto.exp tests
@ 2017-01-24 14:16 Kyrill Tkachov
  2017-01-24 22:36 ` Mike Stump
  2017-02-14 14:48 ` Richard Earnshaw (lists)
  0 siblings, 2 replies; 3+ messages in thread
From: Kyrill Tkachov @ 2017-01-24 14:16 UTC (permalink / raw)
  To: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 647 bytes --]

Hi all,

The tests in this patch fail for me on aarch64-none-elf with:
relocation R_AARCH64_ADR_PREL_PG_HI21 against external symbol `_impure_ptr' can not be used when making a shared object; recompile with -fPIC

I believe since the tests pass -shared to the linker they should be gated on the 'shared' effective target?
With this patch these tests appear as UNSUPPORTED on aarch64-none-elf rather than FAILing.

Ok for trunk?

Thanks,
Kyrill

2016-01-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

     * gcc.dg/lto/pr54709_0.c: Require 'shared' effective target.
     * gcc.dg/lto/pr61526_0.c: Likewise.
     * gcc.dg/lto/pr64415_0.c: Likewise.

[-- Attachment #2: lto-shared-tests.patch --]
[-- Type: text/x-patch, Size: 1452 bytes --]

diff --git a/gcc/testsuite/gcc.dg/lto/pr54709_0.c b/gcc/testsuite/gcc.dg/lto/pr54709_0.c
index f3db5dc..69697d8 100644
--- a/gcc/testsuite/gcc.dg/lto/pr54709_0.c
+++ b/gcc/testsuite/gcc.dg/lto/pr54709_0.c
@@ -1,6 +1,7 @@
 /* { dg-lto-do link } */
 /* { dg-require-visibility "hidden" } */
 /* { dg-require-effective-target fpic } */
+/* { dg-require-effective-target shared } */
 /* { dg-extra-ld-options { -shared } } */
 /* { dg-lto-options { { -fPIC -fvisibility=hidden -flto } } } */
 
diff --git a/gcc/testsuite/gcc.dg/lto/pr61526_0.c b/gcc/testsuite/gcc.dg/lto/pr61526_0.c
index 8a631f0..d3e2c80 100644
--- a/gcc/testsuite/gcc.dg/lto/pr61526_0.c
+++ b/gcc/testsuite/gcc.dg/lto/pr61526_0.c
@@ -1,4 +1,5 @@
 /* { dg-require-effective-target fpic } */
+/* { dg-require-effective-target shared } */
 /* { dg-lto-do link } */
 /* { dg-lto-options { { -fPIC -flto -flto-partition=1to1 } } } */
 /* { dg-extra-ld-options { -shared } } */
diff --git a/gcc/testsuite/gcc.dg/lto/pr64415_0.c b/gcc/testsuite/gcc.dg/lto/pr64415_0.c
index 4faab2b..11218e0 100644
--- a/gcc/testsuite/gcc.dg/lto/pr64415_0.c
+++ b/gcc/testsuite/gcc.dg/lto/pr64415_0.c
@@ -1,5 +1,6 @@
 /* { dg-lto-do link } */
 /* { dg-require-effective-target fpic } */
+/* { dg-require-effective-target shared } */
 /* { dg-lto-options { { -O -flto -fpic } } } */
 /* { dg-extra-ld-options { -shared } } */
 /* { dg-extra-ld-options "-Wl,-undefined,dynamic_lookup" { target *-*-darwin* } } */

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

end of thread, other threads:[~2017-02-14 14:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-24 14:16 [PATCH][testsuite] Require shared effective target for some lto.exp tests Kyrill Tkachov
2017-01-24 22:36 ` Mike Stump
2017-02-14 14:48 ` Richard Earnshaw (lists)

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