OSDN Git Service

* gdb.trace/tfind.exp: Pass '-O1' flag via the 'optimize' option,
authorjimb <jimb>
Mon, 23 Dec 2002 00:02:00 +0000 (00:02 +0000)
committerjimb <jimb>
Mon, 23 Dec 2002 00:02:00 +0000 (00:02 +0000)
rather than as part of the output file name.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.trace/tfind.exp

index 1ca3208..23c9b10 100644 (file)
@@ -1,5 +1,8 @@
 2002-12-22  Jim Blandy  <jimb@redhat.com>
 
+       * gdb.trace/tfind.exp: Pass '-O1' flag via the 'optimize' option,
+       rather than as part of the output file name.
+
        * gdb.base/attach.exp: There's no need to copy the test program to
        /tmp; that was only ever necessary on HP/UX, and this test is
        entirely disabled there anyway.
index f678975..9507351 100644 (file)
@@ -53,8 +53,13 @@ if [istarget "m68k-*-elf"] then {
     set testfile "actions"
     set srcfile ${testfile}.c
     set binfile $objdir/$subdir/$testfile
-    if { [gdb_compile "$srcdir/$subdir/$srcfile" "$binfile -O1" \
-           executable {debug additional_flags=-w}] != "" } {
+
+    # Why does this test require '-O1' level optimization?  (In
+    # general, the optimization level should be left under the control
+    # of the test framework (target_list and so on), so if we don't
+    # have to override it in individual tests like this, we shouldn't.)
+    if { [gdb_compile "$srcdir/$subdir/$srcfile" "$binfile" \
+           executable {debug additional_flags=-w optimize=-O1}] != "" } {
        gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
     }
     gdb_load $binfile