summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/special
diff options
context:
space:
mode:
authornickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4>1999-06-30 01:36:45 +0000
committernickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4>1999-06-30 01:36:45 +0000
commit0f1adac24272611fa331e7233b213a8b99a5d4d0 (patch)
treeab0975d9d6fa4e826951bdfceaaa079f66760a71 /gcc/testsuite/gcc.dg/special
parent2e6f33846de3847877051d47d4fe202545b152b5 (diff)
downloadgcc-0f1adac24272611fa331e7233b213a8b99a5d4d0.tar.gz
Move proc gcc_target_object_format from ecos.exp to file-format.exp
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@27842 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/special')
-rw-r--r--gcc/testsuite/gcc.dg/special/ecos.exp57
1 files changed, 4 insertions, 53 deletions
diff --git a/gcc/testsuite/gcc.dg/special/ecos.exp b/gcc/testsuite/gcc.dg/special/ecos.exp
index dc54df6eea1..f1a5f79904d 100644
--- a/gcc/testsuite/gcc.dg/special/ecos.exp
+++ b/gcc/testsuite/gcc.dg/special/ecos.exp
@@ -24,59 +24,10 @@
# Load support procs.
load_lib gcc-dg.exp
-###################################
-# proc gcc_target_object_format { }
-###################################
-
-proc gcc_target_object_format { } {
- global gcc_target_object_format_saved
-
- if [info exists gcc_target_object_format_saved] {
- verbose "gcc_target_object_format returning saved $gcc_target_object_format_saved" 2
- return $gcc_target_object_format_saved
- } else {
-
- set objdump_name [find_binutils_prog objdump]
- set open_file [open objfmtst.c w]
- puts $open_file "void foo(void) { }"
- close $open_file
-
- gcc_target_compile objfmtst.c objfmtst.o object ""
-
- set output [exec $objdump_name --file-headers objfmtst.o ]
-
- file delete objfmtst.o
-
- if ![ regexp "file format (.*)arch" $output dummy objformat ] {
- verbose "Could not parse objdump output" 2
- set gcc_target_object_format_saved unknown
- } else {
- switch -regexp $objformat {
- elf {
- verbose "gcc_target_object_format returning elf" 2
- set gcc_target_object_format_saved elf
- }
- ecoff {
- verbose "gcc_target_object_format returning ecoff" 2
- set gcc_target_object_format_saved ecoff
- }
- coff {
- verbose "gcc_target_object_format returning coff" 2
- set gcc_target_object_format_saved coff
- }
- a\.out {
- verbose "gcc_target_object_format returning a.out" 2
- set gcc_target_object_format_saved a.out
- }
- default {
- verbose "gcc_target_object_format returning unknown" 2
- set gcc_target_object_format_saved unknown
- }
- }
- }
- return $gcc_target_object_format_saved
- }
-}
+###############################
+# proc gcc_target_object_format {}
+###############################
+# has been moved to: gcc/testsuite/lib/file-format.exp
###############################
# proc check_weak_available { }