8sa1-gcc/gcc/testsuite/lib/file-format.exp
Joseph Myers cc712abf04 acinclude.m4: Fix spelling error of "separate" as "seperate".
config:
	* acinclude.m4: Fix spelling error of "separate" as "seperate".

gcc:
	* ChangeLog.2, c-decl.c, config/i386/i386.md, doc/gcc.texi, gcc.c,
	genmultilib, toplev.c: Fix spelling errors of "separate" as
	"seperate", and corresponding spelling errors of related words.

gcc/ada:
	* 5oosinte.adb: Fix spelling error of "separate" as "seperate".

gcc/testsuite:
	* gcc.c-torture/unsorted/unsorted.exp, lib/file-format.exp: Fix
	spelling errors of "separate" as "seperate".

libffi:
	* src/x86/ffi.c: Fix spelling error of "separate" as "seperate".

libjava:
	* defineclass.cc, java/awt/image/ColorModel.java,
	java/awt/image/SampleModel.java, java/lang/Package.java,
	java/security/cert/X509Extension.java: Fix spelling errors of
	"separate" as "seperate", and corresponding spelling errors of
	related words.

libstdc++-v3:
	* docs/html/22_locale/locale.html, docs/html/faq/index.html: Fix
	spelling errors of "separate" as "seperate", and corresponding
	spelling errors of related words.
	* docs/html/faq/index.txt: Regenerate.

From-SVN: r46063
2001-10-07 19:02:46 +01:00

76 lines
2.8 KiB
Plaintext

# Copyright (C) 1999 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Please email any bugs, comments, and/or additions to this file to:
# gcc-bugs@gcc.gnu.org
# This file defines a proc for determining the file format in use by the
# target. This is useful for tests that are only supported by certain file
# formats. This procedure is defined in a separate file so that it can be
# included by other expect library files.
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
} 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 ""
catch {
set output [exec $objdump_name --file-headers objfmtst.o ]
} output
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 {
set gcc_target_object_format_saved elf
}
ecoff {
set gcc_target_object_format_saved ecoff
}
coff {
set gcc_target_object_format_saved coff
}
a\.out {
set gcc_target_object_format_saved a.out
}
pe {
set gcc_target_object_format_saved pe
}
default {
verbose "Unknown file format: $objformat" 3
set gcc_target_object_format_saved unknown
}
}
verbose "gcc_target_object_format returning $gcc_target_object_format_saved" 2
}
}
return $gcc_target_object_format_saved
}