This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][testsuite] Require shared effective target for some lto.exp tests
- From: "Richard Earnshaw (lists)" <Richard dot Earnshaw at arm dot com>
- To: Kyrill Tkachov <kyrylo dot tkachov at foss dot arm dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 14 Feb 2017 14:41:58 +0000
- Subject: Re: [PATCH][testsuite] Require shared effective target for some lto.exp tests
- Authentication-results: sourceware.org; auth=none
- References: <588761A1.8060000@foss.arm.com>
On 24/01/17 14:16, Kyrill Tkachov wrote:
> 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.
>
OK.
R.
> lto-shared-tests.patch
>
>
> 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* } } */
>