Christophe Lyon
2014-10-07 21:54:20 UTC
Hi,
When Jason added the new g++.dg/ipa/devirt-28a.C test along with his
fix for PR c++/58678
(https://gcc.gnu.org/ml/gcc-patches/2014-09/msg00838.html), this new
test was failing in the ARM and AArch64 configuration I am testing.
For the arm*-none-eabi and aarch64*-none-elf configurations, this was
simply because -shared is not supported by these targets. The attached
patch adds support to test availability of this option, similarly to
what is done for -fpic.
For the record, for the arm*linux configurations, the test was also
failing because testglue.o contained relocations incompatible with
-shared. I managed to have them work by adding
set_board_info wrap_compile_flags "-mword-relocations"
to my .exp dejagnu configuration.
In summary, this patch enables to have devirt-28a.C:
- PASS on arm*linux*
- UNSUPPORTED on arm*-none-eabi and aarch64*-none-elf
instead of FAIL.
Is it OK for trunk, and 4.9 (since Jason's patch was also committed to 4.9) ?
2014-10-08 Christophe Lyon <***@linaro.org>
* lib/target-supports.exp (check_effective_target_shared): New
function.
* g++.dg/ipa/devirt-28a.C: Check if -shared is supported.
Thanks,
Christophe.
When Jason added the new g++.dg/ipa/devirt-28a.C test along with his
fix for PR c++/58678
(https://gcc.gnu.org/ml/gcc-patches/2014-09/msg00838.html), this new
test was failing in the ARM and AArch64 configuration I am testing.
For the arm*-none-eabi and aarch64*-none-elf configurations, this was
simply because -shared is not supported by these targets. The attached
patch adds support to test availability of this option, similarly to
what is done for -fpic.
For the record, for the arm*linux configurations, the test was also
failing because testglue.o contained relocations incompatible with
-shared. I managed to have them work by adding
set_board_info wrap_compile_flags "-mword-relocations"
to my .exp dejagnu configuration.
In summary, this patch enables to have devirt-28a.C:
- PASS on arm*linux*
- UNSUPPORTED on arm*-none-eabi and aarch64*-none-elf
instead of FAIL.
Is it OK for trunk, and 4.9 (since Jason's patch was also committed to 4.9) ?
2014-10-08 Christophe Lyon <***@linaro.org>
* lib/target-supports.exp (check_effective_target_shared): New
function.
* g++.dg/ipa/devirt-28a.C: Check if -shared is supported.
Thanks,
Christophe.