This is the mail archive of the mailing list for the binutils 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: [ld/testsuite] Skip "Mixing PIC and non-PIC" testcase on ARM/AArch64 if when no -fpie or -fPIE

On 02/03/16 17:40, H.J. Lu wrote:
On Wed, Mar 2, 2016 at 9:36 AM, Jiong Wang <> wrote:

On 02/03/16 16:40, H.J. Lu wrote:
On Wed, Mar 2, 2016 at 8:08 AM, Jiong Wang <>
Have you looked at the testcase I added? Are there anything
which are target specific?

I do have looked at the testcase, they do be purely C code.

If the convention of generic is syntax generic instead of both syntax
sematics, I don't have further comment on this.

Anyway, attached patch skips the non-pie version "Mixing PIC and

Not sure if it's trivial enough to qualify obvious, so OK for master

2016-03-02  Jiong Wang  <>


     * ld-elf/shared.exp (mix_pic_and_non_pic): Only run on ARM and
       when -fPIE or -fpie specified.
That is wrong.  If you don't want to see FAIL, you can skip the whole.
mix_pic_and_non_pic.  Please don't modify mix_pic_and_non_pic.

Then, how about the updated version?

2016-03-02  Jiong Wang  <>


     * ld-elf/shared.exp: Skip "Mixing PIC and non-PIC" on ARM and AArch64
     if -fpie or -fPIE not specified.

Please use setup_xfail instead of skipping.

setup_xfail will actually update one global xfail related flag which affect
pass/fail after it. so you must put "setup_xfail" accurately before the fail
want to xfail or the pass you want to xpass.
There is

ld-elf/comm-data.exp:setup_xfail "arm*-*-*" "ld/13802"

How does it work?

I think that's because it's using run_ld_link_test, while your "mix_pic_and_non_pic"
is using run_cc_link_test.

From ld.log, those compile steps in run_cc_link_test is treated as a seperate tesing, thus an internal PASS is generated. So if you put setup_xfail outside mix_pic_and_non_pic, then the flag setup will be wrongly taken by the later PASS and turns it into XPASS.

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