This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][testsuite] Require shared effective target for some lto.exp tests


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* } } */
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]