From: Ben Elliston Date: Tue, 22 Mar 2005 00:15:32 +0000 (+0000) Subject: options.exp (check_for_options): Create a real C program... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e44615776acf0044b29215200e3d7e180c5fc4ff;p=gcc.git options.exp (check_for_options): Create a real C program... * 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. From-SVN: r96844 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index dd6774b490c..4c5939e82ea 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2005-03-22 Ben Elliston + + * 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 * gcc.target/i386/sse-2.c: New. diff --git a/gcc/testsuite/gcc.misc-tests/options.exp b/gcc/testsuite/gcc.misc-tests/options.exp index 9a0f9e4ae91..1405513c460 100644 --- a/gcc/testsuite/gcc.misc-tests/options.exp +++ b/gcc/testsuite/gcc.misc-tests/options.exp @@ -20,15 +20,21 @@ # 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)"