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.tkac...@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.
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* } } */

Reply via email to