+2005-03-22 Ben Elliston <bje@au.ibm.com>
+
+ * gcc.misc-tests/options.exp (check_for_options): Create a real C
+ program, compile it into a real executable and then delete the .c
+ and .x files afterwards, to avoid problems on testglue targets.
+
2005-03-21 Stuart Hastings <stuart@apple.com>
* gcc.target/i386/sse-2.c: New.
# respectively.
proc check_for_options {language gcc_options compiler_pattern as_pattern ld_pattern} {
+ set filename test-[pid]
+ set fd [open $filename.c w]
+ puts $fd "int main (void) \{ return 0; \}"
+ close $fd
+ remote_download host $filename.c
+
set test "compiler driver $gcc_options option(s)"
set gcc_options "\{additional_flags=$gcc_options -v\}"
- set src "-x$language /dev/null"
switch "$language" {
"c" { set compiler cc1 }
default { error "unknown language" }
}
- set gcc_output [gcc_target_compile $src /dev/null executable $gcc_options]
+ set gcc_output [gcc_target_compile $filename.c $filename.x executable $gcc_options]
+ remote_file build delete $filename.c $filename.x $filename.gcno
if {![regexp -- "/$compiler -quiet.*$compiler_pattern" $gcc_output]} {
fail "$test (compiler options)"