From: Janis Johnson Date: Tue, 20 Dec 2005 22:09:24 +0000 (+0000) Subject: backport: gcc-dg.exp (dg-require-weak, [...]): Move from here ... X-Git-Tag: releases/gcc-3.4.6~218 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f96eff95892ba222f300d2e229afb2437d9c0aeb;p=thirdparty%2Fgcc.git backport: gcc-dg.exp (dg-require-weak, [...]): Move from here ... Backport: 2005-02-11 Janis Johnson * lib/gcc-dg.exp (dg-require-weak, dg-require-visibility, dg-require-alias, dg-require-gc-sections, dg-require-profiling, dg-require-dll, dg-require-named-sections): Move from here ... * lib/target-supports-dg.exp: ... to here. From-SVN: r108871 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0b4b80ccca6b..2c197ff0cb02 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,12 @@ 2005-12-20 Janis Johnson + Backport: + 2005-02-11 Janis Johnson + * lib/gcc-dg.exp (dg-require-weak, dg-require-visibility, + dg-require-alias, dg-require-gc-sections, dg-require-profiling, + dg-require-dll, dg-require-named-sections): Move from here ... + * lib/target-supports-dg.exp: ... to here. + Backport: 2005-12-06 Janis Johnson * gcc.test-framework/dg-dot-run-sif-exp-P.c: New test. diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp index 429155c9fe16..91627cb09f2c 100644 --- a/gcc/testsuite/lib/gcc-dg.exp +++ b/gcc/testsuite/lib/gcc-dg.exp @@ -261,105 +261,6 @@ proc gcc-dg-debug-runtest { target_compile trivial opt_opts testcases } { } } -# If this target does not support weak symbols, skip this test. - -proc dg-require-weak { args } { - upvar dg-do-what dg-do-what - upvar name name - - set weak_available [ check_weak_available ] - if { $weak_available == -1 } { - unresolved "$name" - } - if { $weak_available != 1 } { - set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"] - return - } -} - -# If this target does not support the "visibility" attribute, skip this -# test. - -proc dg-require-visibility { args } { - upvar dg-do-what dg-do-what - upvar name name - - set visibility_available [ check_visibility_available ] - if { $visibility_available == -1 } { - unresolved "$name" - } - if { $visibility_available != 1 } { - set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"] - return - } -} - -# If this target does not support the "alias" attribute, skip this -# test. - -proc dg-require-alias { args } { - upvar dg-do-what dg-do-what - upvar name name - - set alias_available [ check_alias_available ] - if { $alias_available == -1 } { - unresolved "$name" - } - if { $alias_available < 2 } { - set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"] - return - } -} - -# If this target's linker does not support the --gc-sections flag, -# skip this test. - -proc dg-require-gc-sections { args } { - if { ![ check_gc_sections_available ] } { - upvar dg-do-what dg-do-what - set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"] - return - } -} - -# If this target does not support profiling, skip this test. - -proc dg-require-profiling { args } { - if { ![ check_profiling_available ${args} ] } { - upvar dg-do-what dg-do-what - set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"] - return - } -} - -# If this target does not support DLL attributes skip this test. - -proc dg-require-dll { args } { - global target_triplet - # As a special case, the mcore-*-elf supports dllimport/dllexport. - if { [string match "mcore-*-elf" $target_triplet] } { - return - } - # PE/COFF targets support dllimport/dllexport. - if { [gcc_target_object_format] == "pe" } { - return - } - - upvar dg-do-what dg-do-what - set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"] -} - -# If this target does not support named sections skip this test. - -proc dg-require-named-sections { args } { - upvar name name - - if { ![ check_named_sections_available ] } { - upvar dg-do-what dg-do-what - set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"] - } -} - # Prune any messages matching ARGS[1] (a regexp) from test output. proc dg-prune-output { args } { global additional_prunes diff --git a/gcc/testsuite/lib/target-supports-dg.exp b/gcc/testsuite/lib/target-supports-dg.exp index 7a11377cbfe8..01ca0a8cdd22 100644 --- a/gcc/testsuite/lib/target-supports-dg.exp +++ b/gcc/testsuite/lib/target-supports-dg.exp @@ -14,6 +14,105 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# If this target does not support weak symbols, skip this test. + +proc dg-require-weak { args } { + upvar dg-do-what dg-do-what + upvar name name + + set weak_available [ check_weak_available ] + if { $weak_available == -1 } { + unresolved "$name" + } + if { $weak_available != 1 } { + set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"] + return + } +} + +# If this target does not support the "visibility" attribute, skip this +# test. + +proc dg-require-visibility { args } { + upvar dg-do-what dg-do-what + upvar name name + + set visibility_available [ check_visibility_available ] + if { $visibility_available == -1 } { + unresolved "$name" + } + if { $visibility_available != 1 } { + set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"] + return + } +} + +# If this target does not support the "alias" attribute, skip this +# test. + +proc dg-require-alias { args } { + upvar dg-do-what dg-do-what + upvar name name + + set alias_available [ check_alias_available ] + if { $alias_available == -1 } { + unresolved "$name" + } + if { $alias_available < 2 } { + set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"] + return + } +} + +# If this target's linker does not support the --gc-sections flag, +# skip this test. + +proc dg-require-gc-sections { args } { + if { ![ check_gc_sections_available ] } { + upvar dg-do-what dg-do-what + set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"] + return + } +} + +# If this target does not support profiling, skip this test. + +proc dg-require-profiling { args } { + if { ![ check_profiling_available ${args} ] } { + upvar dg-do-what dg-do-what + set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"] + return + } +} + +# If this target does not support DLL attributes skip this test. + +proc dg-require-dll { args } { + global target_triplet + # As a special case, the mcore-*-elf supports dllimport/dllexport. + if { [string match "mcore-*-elf" $target_triplet] } { + return + } + # PE/COFF targets support dllimport/dllexport. + if { [gcc_target_object_format] == "pe" } { + return + } + + upvar dg-do-what dg-do-what + set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"] +} + +# If this target does not support named sections skip this test. + +proc dg-require-named-sections { args } { + upvar name name + + if { ![ check_named_sections_available ] } { + upvar dg-do-what dg-do-what + set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"] + } +} + # If the target does not match the required effective target, skip this test. proc dg-require-effective-target { args } {