[testsuite, i386] Change mpx effective-target test into link test
Rainer Orth
ro@CeBiTec.Uni-Bielefeld.DE
Thu Dec 18 10:13:00 GMT 2014
Currently, the new gcc.dg/lto/chkp-privatize test FAILs on Solaris/x86
with gas and ld for 64-bit:
UNRESOLVED: gcc.dg/lto/chkp-privatize c_lto_chkp-privatize_0.o-c_lto_chkp-privatize_1.o execute -fPIC -flto -flto-partition=max -fcheck-pointer-bounds -mmpx
FAIL: gcc.dg/lto/chkp-privatize c_lto_chkp-privatize_0.o-c_lto_chkp-privatize_1.o link, -fPIC -flto -flto-partition=max -fcheck-pointer-bounds -mmpx
output is:
ld: fatal: relocation error: file c_lto_chkp-privatize_0.o: section [4].rela.text: invalid relocation type: 0x28
ld: fatal: symbol referencing errors
collect2: error: ld returned 1 exit status
This relocation type 0x28 (40) is R_X86_64_PLT32_BND, which Solaris 10
and 11 ld know nothing about.
Given that there's no test whatsoever in gcc/configure.ac that the whole
toolchain supports the necessary mnemonics and relocs, the logical place
seems to be the testsuite.
The following patch does just that, turning the mpx effective-target
test into a link test, thus checking both assembler and linker used.
Tested with the appropriate runtest invocations on i386-pc-solaris2.11
with as/ld (both 32 and 64-bit tests unsupported due to missing
assembler support), gas/ld (32-bit tests pass, 64-bit tests unsupported
due to missing linker support), and x86_64-unknown-linux-gnu (both 32
and 64-bit tests pass).
I wonder what's the point of having mpx-dg.exp at all: I'd rather move
the single test to target-supports.exp, avoiding the whole flurry of
mpx-dg.exp inclusions all over gcc/testsuite. Ilya? However that may
be, it can be done as a followup.
Ok for mainline?
Rainer
2014-12-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* lib/mpx-dg.exp (check_effective_target_mpx): Change into link test.
Add main.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testsuite-i386-mpx-link.patch
Type: text/x-patch
Size: 607 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20141218/7902a7a1/attachment.bin>
-------------- next part --------------
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
More information about the Gcc-patches
mailing list