diff options
Diffstat (limited to 'gcc/testsuite/lib')
-rw-r--r-- | gcc/testsuite/lib/target-supports.exp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index a13ba3e292a..2682f8f4b7d 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -2089,6 +2089,23 @@ proc check_effective_target_dummy_wcsftime {} { return [check_effective_target_uclibc] } +# Return 1 if constructors with initialization priority arguments are +# supposed on this target. + +proc check_effective_target_init_priority {} { + # On Solaris2, initialization priorities are only supported with + # GNU ld, but the compiler accepts them even when using Sun ld. + # For more information, see PR 6482. + if { [istarget *-solaris2*] } { + return 1 + } + + return [check_no_compiler_messages init_priority assembly " + void f() __attribute__((constructor (1000))); + void f() \{\} + "] +} + # Return 1 if the target matches the effective target 'arg', 0 otherwise. # This can be used with any check_* proc that takes no argument and # returns only 1 or 0. It could be used with check_* procs that take |