aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorBen Elliston <bje@au.ibm.com>2005-03-22 00:15:32 +0000
committerBen Elliston <bje@gcc.gnu.org>2005-03-22 11:15:32 +1100
commite44615776acf0044b29215200e3d7e180c5fc4ff (patch)
tree8ed3370cc2c5fc64fe2156e7951c454a0d4da529 /gcc
parentaed63147cb5c4099a4fc3586784be919a84cda04 (diff)
downloadgcc-e44615776acf0044b29215200e3d7e180c5fc4ff.zip
gcc-e44615776acf0044b29215200e3d7e180c5fc4ff.tar.gz
gcc-e44615776acf0044b29215200e3d7e180c5fc4ff.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/gcc.misc-tests/options.exp10
2 files changed, 14 insertions, 2 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index dd6774b..4c5939e 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+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.
diff --git a/gcc/testsuite/gcc.misc-tests/options.exp b/gcc/testsuite/gcc.misc-tests/options.exp
index 9a0f9e4..1405513 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)"