diff options
Diffstat (limited to 'gcc/testsuite/lib/target-supports.exp')
-rw-r--r-- | gcc/testsuite/lib/target-supports.exp | 73 |
1 files changed, 70 insertions, 3 deletions
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 5272bcd3791..8d89ed830fd 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -491,6 +491,7 @@ proc check_profiling_available { test_what } { || [istarget avr-*-*] || [istarget bfin-*-*] || [istarget powerpc-*-eabi*] + || [istarget powerpc-*-elf] || [istarget cris-*-*] || [istarget crisv32-*-*] || [istarget fido-*-elf] @@ -501,6 +502,7 @@ proc check_profiling_available { test_what } { || [istarget mep-*-elf] || [istarget mips*-*-elf*] || [istarget moxie-*-elf*] + || [istarget rx-*-*] || [istarget xstormy16-*] || [istarget xtensa*-*-elf] || [istarget *-*-rtems*] @@ -686,6 +688,18 @@ proc check_effective_target_hard_float { } { }] } + # This proc is actually checking the availabilty of FPU + # support for doubles, so on the RX we must fail if the + # 64-bit double multilib has been selected. + if { [istarget rx-*-*] } { + return 0 + # return [check_no_compiler_messages hard_float assembly { + #if defined __RX_64_BIT_DOUBLES__ + #error FOO + #endif + # }] + } + # The generic test equates hard_float with "no call for adding doubles". return [check_no_messages_and_pattern hard_float "!\\(call" rtl-expand { double a (double b, double c) { return b + c; } @@ -2505,8 +2519,8 @@ proc check_effective_target_vect_short_mult { } { if { [istarget ia64-*-*] || [istarget spu-*-*] || [istarget i?86-*-*] - || [istarget x86_64-*-*] - || [istarget powerpc*-*-*] + || [istarget x86_64-*-*] + || [istarget powerpc*-*-*] || [check_effective_target_arm32] } { set et_vect_short_mult_saved 1 } @@ -2646,7 +2660,7 @@ proc check_effective_target_section_anchors { } { verbose "check_effective_target_section_anchors: using cached result" 2 } else { set et_section_anchors_saved 0 - if { [istarget powerpc*-*-*] + if { [istarget powerpc*-*-*] || [istarget arm*-*-*] } { set et_section_anchors_saved 1 } @@ -2984,6 +2998,28 @@ proc add_options_for_ieee { flags } { return $flags } +# Add to FLAGS the flags needed to enable functions to bind locally +# when using pic/PIC passes in the testsuite. + +proc add_options_for_bind_pic_locally { flags } { + if {[check_no_compiler_messages using_pic2 assembly { + #if __PIC__ != 2 + #error FOO + #endif + }]} { + return "$flags -fPIE" + } + if {[check_no_compiler_messages using_pic1 assembly { + #if __PIC__ != 1 + #error FOO + #endif + }]} { + return "$flags -fpie" + } + + return $flags +} + # Return 1 if the target provides a full C99 runtime. proc check_effective_target_c99_runtime { } { @@ -3093,6 +3129,14 @@ proc check_effective_target_correct_iso_cpp_string_wchar_protos { } { }] } +# Return 1 if the compiler has been configure with link-time optimization +# (LTO) support. + +proc check_effective_target_lto { } { + global ENABLE_LTO + return [info exists ENABLE_LTO] +} + # Return 1 if the MPC library is integrated with GCC, 0 otherwise. proc check_effective_target_mpc { } { @@ -3119,6 +3163,29 @@ proc check_effective_target_mpc_pow { } { }] } +# Return 1 if the MPC library with "arc" functions is integrated with GCC, 0 otherwise. + +proc check_effective_target_mpc_arc { } { + return [check_no_compiler_messages mpc_arc executable { + extern void link_error(void); + int main () + { + if (__builtin_cacos(1) != 0) + link_error(); + if (__builtin_casin(0) != 0) + link_error(); + if (__builtin_catan(0) != 0) + link_error(); + if (__builtin_cacosh(1) != 0) + link_error(); + if (__builtin_casinh(0) != 0) + link_error(); + if (__builtin_catanh(0) != 0) + link_error(); + } + }] +} + # Return 1 if the language for the compiler under test is C. proc check_effective_target_c { } { |