shebs       02/09/06 17:39:45

  Modified:    gcc      toplev.c
               gcc/testsuite/g++.dg/debug debug.exp
               gcc/testsuite/gcc.dg/debug debug.exp
               gcc/testsuite/lib g++-dg.exp g++.exp gcc-dg.exp gcc.exp
                        mike-g++.exp objc-dg.exp old-dejagnu.exp
  Log:
  Add -fslow-exit flag and pass it in DG-style tests.  Slow but reliable!
  Also use -multiply_defined suppress to get rid of linker complaints.
  
  Revision  Changes    Path
  1.153     +15 -0     gcc3/gcc/toplev.c
  
  Index: toplev.c
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/toplev.c,v
  retrieving revision 1.152
  retrieving revision 1.153
  diff -u -r1.152 -r1.153
  --- toplev.c  2002/09/02 03:45:51     1.152
  +++ toplev.c  2002/09/07 00:39:43     1.153
  @@ -444,6 +444,12 @@
   
   int mem_report = 0;
   
  +/* APPLE LOCAL begin testsuite OS flush bug workaround */
  +/* Non-zero means to sleep briefly before exiting.  */
  +
  +int flag_slow_exit = 0;
  +/* APPLE LOCAL end testsuite OS flush bug workaround */
  +
   /* Non-zero means to collect statistics which might be expensive
      and to print them when we are done.  */
   int flag_detailed_statistics = 0;
  @@ -1288,6 +1294,10 @@
      N_("Report time taken by each compiler pass at end of run") },
     {"mem-report", &mem_report, 1,
      N_("Report on permanent memory allocation at end of run") },
  +  /* APPLE LOCAL begin testsuite OS flush bug workaround */
  +  { "slow-exit", &flag_slow_exit, 1,
  +   N_("Sleep before exiting") },
  +  /* APPLE LOCAL end testsuite OS flush bug workaround */
     { "trapv", &flag_trapv, 1,
      N_("Trap for signed overflow in addition / subtraction / multiplication") },
     { "new-ra", &flag_new_regalloc, 1,
  @@ -5900,6 +5910,11 @@
     /* Exit early if we can (e.g. -help).  */
     if (!exit_after_options)
       do_compile ();
  +
  +  /* APPLE LOCAL begin testsuite OS flush bug workaround */
  +  if (flag_slow_exit)
  +    sleep (1);
  +  /* APPLE LOCAL end testsuite OS flush bug workaround */
   
     /* APPLE LOCAL work around Radar 2844245.  */
     fflush(stdout); fflush(stderr);
  
  
  
  1.2       +2 -1      gcc3/gcc/testsuite/g++.dg/debug/debug.exp
  
  Index: debug.exp
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/testsuite/g++.dg/debug/debug.exp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- debug.exp 2002/03/14 03:51:50     1.1
  +++ debug.exp 2002/09/07 00:39:43     1.2
  @@ -26,9 +26,10 @@
   if ![info exists DEBUG_TORTURE_OPTIONS] {
       set DEBUG_TORTURE_OPTIONS ""
       foreach type {-gdwarf-2 -gstabs -gstabs+ -gxcoff -gxcoff+ -gcoff} {
  +     # APPLE LOCAL testsuite OS flush bug workaround
        set comp_output [g++_target_compile \
                "$srcdir/$subdir/trivial.C" "trivial.S" assembly \
  -             "additional_flags=$type"]
  +             "additional_flags=$type additional_flags=-fslow-exit"]
        if { ! [string match "*: unknown or unsupported -g option*" \
                $comp_output] } {
            foreach level {1 "" 3} {
  
  
  
  1.2       +2 -1      gcc3/gcc/testsuite/gcc.dg/debug/debug.exp
  
  Index: debug.exp
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/testsuite/gcc.dg/debug/debug.exp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- debug.exp 2002/03/14 03:58:22     1.1
  +++ debug.exp 2002/09/07 00:39:44     1.2
  @@ -26,9 +26,10 @@
   if ![info exists DEBUG_TORTURE_OPTIONS] {
       set DEBUG_TORTURE_OPTIONS ""
       foreach type {-gdwarf-2 -gstabs -gstabs+ -gxcoff -gxcoff+ -gcoff} {
  +     # APPLE LOCAL testsuite OS flush bug workaround
        set comp_output [gcc_target_compile \
                "$srcdir/$subdir/trivial.c" "trivial.S" assembly \
  -             "additional_flags=$type"]
  +             "additional_flags=$type additional_flags=-fslow-exit"]
        if { ! [string match "*: unknown or unsupported -g option*" \
                $comp_output] } {
            foreach level {1 "" 3} {
  
  
  
  1.4       +3 -0      gcc3/gcc/testsuite/lib/g++-dg.exp
  
  Index: g++-dg.exp
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/testsuite/lib/g++-dg.exp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- g++-dg.exp        2002/03/14 07:33:05     1.3
  +++ g++-dg.exp        2002/09/07 00:39:44     1.4
  @@ -63,6 +63,9 @@
        lappend options "additional_flags=$extra_tool_flags"
       }
   
  +    # APPLE LOCAL testsuite OS flush bug workaround
  +    lappend options "additional_flags=-fslow-exit"
  +
       set comp_output [g++_target_compile "$prog" "$output_file" "$compile_type" 
$options];
   
       return [list $comp_output $output_file]
  
  
  
  1.6       +2 -0      gcc3/gcc/testsuite/lib/g++.exp
  
  Index: g++.exp
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/testsuite/lib/g++.exp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- g++.exp   2002/08/13 05:59:09     1.5
  +++ g++.exp   2002/09/07 00:39:44     1.6
  @@ -291,6 +291,8 @@
       }
   
       lappend options "additional_flags=[libio_include_flags]"
  +    # APPLE LOCAL testsuite multiply defined
  +    lappend options "ldflags=-Wl,-multiply_defined,suppress"
       lappend options "compiler=$GXX_UNDER_TEST";
   
       set options [concat $gpp_compile_options $options]
  
  
  
  1.4       +3 -0      gcc3/gcc/testsuite/lib/gcc-dg.exp
  
  Index: gcc-dg.exp
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/testsuite/lib/gcc-dg.exp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- gcc-dg.exp        2002/03/14 07:33:05     1.3
  +++ gcc-dg.exp        2002/09/07 00:39:44     1.4
  @@ -95,6 +95,9 @@
        lappend options "additional_flags=$extra_tool_flags"
       }
   
  +    # APPLE LOCAL testsuite OS flush bug workaround
  +    lappend options "additional_flags=-fslow-exit"
  +
       set comp_output [gcc_target_compile "$prog" "$output_file" "$compile_type" 
$options];
   
       return [list $comp_output $output_file]
  
  
  
  1.15      +2 -0      gcc3/gcc/testsuite/lib/gcc.exp
  
  Index: gcc.exp
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/testsuite/lib/gcc.exp,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- gcc.exp   2002/09/02 13:28:38     1.14
  +++ gcc.exp   2002/09/07 00:39:44     1.15
  @@ -154,6 +154,8 @@
       if [target_info exists gcc,timeout] {
        lappend options "timeout=[target_info gcc,timeout]"
       }
  +    # APPLE LOCAL testsuite multiply defined
  +    lappend options "ldflags=-Wl,-multiply_defined,suppress"
       lappend options "compiler=$GCC_UNDER_TEST"
       return [target_compile $source $dest $type $options]
   }
  
  
  
  1.4       +3 -0      gcc3/gcc/testsuite/lib/mike-g++.exp
  
  Index: mike-g++.exp
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/testsuite/lib/mike-g++.exp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- mike-g++.exp      2002/03/14 07:33:06     1.3
  +++ mike-g++.exp      2002/09/07 00:39:44     1.4
  @@ -141,6 +141,9 @@
        lappend options "libs=-lstdcxx -lgxx"
       }
   
  +    # APPLE LOCAL testsuite OS flush bug workaround
  +    lappend options "additional_flags=-fslow-exit"
  +
       set comp_output [g++_target_compile $src_file $output_file $compile_type 
$options]
   
       set pass no
  
  
  
  1.4       +3 -0      gcc3/gcc/testsuite/lib/objc-dg.exp
  
  Index: objc-dg.exp
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/testsuite/lib/objc-dg.exp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- objc-dg.exp       2002/03/14 07:33:06     1.3
  +++ objc-dg.exp       2002/09/07 00:39:44     1.4
  @@ -97,6 +97,9 @@
        lappend options "additional_flags=$extra_tool_flags"
       }
   
  +    # APPLE LOCAL testsuite OS flush bug workaround
  +    lappend options "additional_flags=-fslow-exit"
  +
       set comp_output [objc_target_compile "$prog" "$output_file" "$compile_type" 
$options];
   
       return [list $comp_output $output_file]
  
  
  
  1.5       +3 -0      gcc3/gcc/testsuite/lib/old-dejagnu.exp
  
  Index: old-dejagnu.exp
  ===================================================================
  RCS file: /cvs/Darwin/gcc3/gcc/testsuite/lib/old-dejagnu.exp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- old-dejagnu.exp   2002/04/04 07:14:56     1.4
  +++ old-dejagnu.exp   2002/09/07 00:39:44     1.5
  @@ -432,6 +432,9 @@
        }
       }
   
  +    # APPLE LOCAL testsuite OS flush bug workaround
  +    lappend cflags "additional_flags=-fslow-exit"
  +
       # Since we don't check return status of the compiler, make sure
       # we can't run a.out when the compilation fails.
       remote_file build delete $output
  
  
  


Reply via email to