This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

PATCH: Don't use -o ./a.out in the gcc testsuite.


On Wed, Oct 17, 2001 at 06:01:38AM -0700, Tim Prince wrote:
> nor does it work on all supported OS.
> ----- Original Message -----
> From: "H . J . Lu" <hjl@lucon.org>
> To: <gcc@gcc.gnu.org>
> Sent: Tuesday, October 16, 2001 11:36 PM
> Subject: Why is -o ./a.out used in the gcc testsuite?
> 
> 
> > Some gcc, g++ and g77 tests use ".... -o ./a.out". It is not
> safe
> > for parallel make.
> >
> >

How about this patch? Tested on Linux/x86.


H.J.
2001-10-17  H.J. Lu <hjl@gnu.org>

	* g++.dg/special/ecos.exp: Append .exe instead of a.out as the
	link output.
	* gcc.dg/special/ecos.exp: Likewise.
	* lib/g++-dg.exp: Likewise.
	* lib/g77-dg.exp: Likewise.
	* lib/gcc-dg.exp : Likewise.
	* lib/mike-g++.exp: Likewise.
	* lib/mike-g77.exp: Likewise.
	* lib/mike-gcc.exp: Likewise.
	* lib/objc-dg.exp: Likewise.

--- gcc/testsuite/g++.dg/special/ecos.exp.a.out	Tue Aug 21 10:33:36 2001
+++ gcc/testsuite/g++.dg/special/ecos.exp	Wed Oct 17 08:51:46 2001
@@ -29,15 +29,15 @@ load_lib g++-dg.exp
 ###########
 
 dg-init
-set lines [g++_target_compile "$srcdir/$subdir/conpr-1.C" "$objdir/a.out" executable ""]
+set lines [g++_target_compile "$srcdir/$subdir/conpr-1.C" "$objdir/conpr-1.exe" executable ""]
 if [string match "*init_priority*" $lines] then {
     xfail "conpr-1.C"
-    file delete $objdir/a.out
+    file delete $objdir/conpr-1.exe
 } elseif ![string match "" $lines] then {
     fail "conpr-1.C"
 } else {
     dg-runtest "$srcdir/$subdir/conpr-1.C" "" "" 
-    file delete $objdir/a.out
+    file delete $objdir/conpr-1.exe
 }
 dg-finish
 
@@ -89,15 +89,15 @@ dg-finish
 ###########
 
 dg-init
-set lines [g++_target_compile "$srcdir/$subdir/initp1.C" "$objdir/a.out" executable ""]
+set lines [g++_target_compile "$srcdir/$subdir/initp1.C" "$objdir/initp1.exe" executable ""]
 if [string match "*init_priority*" $lines] then {
     xfail "initp1.C"
-    file delete $objdir/a.out
+    file delete $objdir/initp1.exe
 } elseif ![string match "" $lines] then {
     fail "initp1.C"
 } else {
     dg-runtest "$srcdir/$subdir/initp1.C" "" ""
-    file delete $objdir/a.out
+    file delete $objdir/initp1.exe
 }
 dg-finish
 
--- gcc/testsuite/gcc.dg/special/ecos.exp.a.out	Wed Jan 17 18:30:03 2001
+++ gcc/testsuite/gcc.dg/special/ecos.exp	Wed Oct 17 09:55:56 2001
@@ -118,7 +118,7 @@ if { [ check_weak_available ] == 1 } {
         set lines [gcc_target_compile "$srcdir/$subdir/wkali-2b.c" "wkali-2b.o" object ""]
         if [string match "*only weak aliases*" $lines] then {
 	    xfail "wkali-2b.o"
-	    file delete $srcdir/$subdir/a.out
+	    file delete $srcdir/$subdir/wkali-2.exe
         } elseif ![string match "" $lines] then {
             fail "wkali-2b.o"
         } else {
--- gcc/testsuite/lib/g++-dg.exp.a.out	Sun Jul 15 18:31:06 2001
+++ gcc/testsuite/lib/g++-dg.exp	Wed Oct 17 09:04:08 2001
@@ -39,7 +39,7 @@ proc g++-dg-test { prog do_what extra_to
 	}
 	"link" {
 	    set compile_type "executable"
-	    set output_file "a.out"
+	    set output_file "[file rootname [file tail $prog]].exe"
 	    # The following line is needed for targets like the i960 where
 	    # the default output file is b.out.  Sigh.
 	}
@@ -48,7 +48,7 @@ proc g++-dg-test { prog do_what extra_to
 	    # FIXME: "./" is to cope with "." not being in $PATH.
 	    # Should this be handled elsewhere?
 	    # YES.
-	    set output_file "./a.out"
+	    set output_file "[file rootname [file tail $prog]].exe"
 	    # This is the only place where we care if an executable was
 	    # created or not.  If it was, dg.exp will try to run it.
 	    remote_file build delete $output_file;
--- gcc/testsuite/lib/g77-dg.exp.a.out	Wed Aug 15 13:28:43 2001
+++ gcc/testsuite/lib/g77-dg.exp	Wed Oct 17 09:04:22 2001
@@ -71,7 +71,7 @@ proc g77-dg-test { prog do_what extra_to
 	}
 	"link" {
 	    set compile_type "executable"
-	    set output_file "a.out"
+	    set output_file "[file rootname [file tail $prog]].exe"
 	    # The following line is needed for targets like the i960 where
 	    # the default output file is b.out.  Sigh.
 	}
@@ -80,7 +80,7 @@ proc g77-dg-test { prog do_what extra_to
 	    # FIXME: "./" is to cope with "." not being in $PATH.
 	    # Should this be handled elsewhere?
 	    # YES.
-	    set output_file "./a.out"
+	    set output_file "[file rootname [file tail $prog]].exe"
 	    # This is the only place where we care if an executable was
 	    # created or not.  If it was, dg.exp will try to run it.
 	    remote_file build delete $output_file;
--- gcc/testsuite/lib/gcc-dg.exp.a.out	Sun Jul 15 18:31:06 2001
+++ gcc/testsuite/lib/gcc-dg.exp	Wed Oct 17 09:04:33 2001
@@ -71,7 +71,7 @@ proc gcc-dg-test { prog do_what extra_to
 	}
 	"link" {
 	    set compile_type "executable"
-	    set output_file "a.out"
+	    set output_file "[file rootname [file tail $prog]].exe"
 	    # The following line is needed for targets like the i960 where
 	    # the default output file is b.out.  Sigh.
 	}
@@ -80,7 +80,7 @@ proc gcc-dg-test { prog do_what extra_to
 	    # FIXME: "./" is to cope with "." not being in $PATH.
 	    # Should this be handled elsewhere?
 	    # YES.
-	    set output_file "./a.out"
+	    set output_file "[file rootname [file tail $prog]].exe"
 	    # This is the only place where we care if an executable was
 	    # created or not.  If it was, dg.exp will try to run it.
 	    remote_file build delete $output_file;
--- gcc/testsuite/lib/mike-g++.exp.a.out	Wed Feb  7 18:29:38 2001
+++ gcc/testsuite/lib/mike-g++.exp	Wed Oct 17 09:05:31 2001
@@ -113,12 +113,12 @@ proc postbase  { src_code run groups arg
 	link
 	{
 	    set compile_type "executable";
-	    set output_file "$tmpdir/a.out";
+	    append output_file ".exe";
 	}
 	run
 	{
 	    set compile_type "executable";
-	    set output_file "$tmpdir/a.out";
+	    append output_file ".exe";
 	    set run yes;
 	}
 	default
--- gcc/testsuite/lib/mike-g77.exp.a.out	Wed Dec 16 14:24:25 1998
+++ gcc/testsuite/lib/mike-g77.exp	Wed Oct 17 09:05:45 2001
@@ -120,12 +120,12 @@ proc postbase  { src_code run groups arg
 	link
 	{
 	    set compile_type "executable";
-	    set output_file "$tmpdir/a.out";
+	    append output_file ".exe";
 	}
 	run
 	{
 	    set compile_type "executable";
-	    set output_file "$tmpdir/a.out";
+	    append output_file ".exe";
 	    set run yes;
 	}
 	default
--- gcc/testsuite/lib/mike-gcc.exp.a.out	Wed Feb  7 18:29:38 2001
+++ gcc/testsuite/lib/mike-gcc.exp	Wed Oct 17 09:06:01 2001
@@ -117,12 +117,12 @@ proc postbase  { src_code run groups arg
 	link
 	{
 	    set compile_type "executable";
-	    set output_file "$tmpdir/a.out";
+	    append output_file ".exe";
 	}
 	run
 	{
 	    set compile_type "executable";
-	    set output_file "$tmpdir/a.out";
+	    append output_file ".exe";
 	    set run yes;
 	}
 	default
--- gcc/testsuite/lib/objc-dg.exp.a.out	Mon Jun 18 09:48:34 2001
+++ gcc/testsuite/lib/objc-dg.exp	Wed Oct 17 09:06:34 2001
@@ -73,7 +73,7 @@ proc objc-dg-test { prog do_what extra_t
 	}
 	"link" {
 	    set compile_type "executable"
-	    set output_file "a.out"
+	    set output_file "[file rootname [file tail $prog]].exe"
 	    # The following line is needed for targets like the i960 where
 	    # the default output file is b.out.  Sigh.
 	}
@@ -82,7 +82,7 @@ proc objc-dg-test { prog do_what extra_t
 	    # FIXME: "./" is to cope with "." not being in $PATH.
 	    # Should this be handled elsewhere?
 	    # YES.
-	    set output_file "./a.out"
+	    set output_file "[file rootname [file tail $prog]].exe"
 	    # This is the only place where we care if an executable was
 	    # created or not.  If it was, dg.exp will try to run it.
 	    remote_file build delete $output_file;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]