public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [testsuite, fortran] Fix Fortran execution tests for non-default multilib
@ 2010-11-19 17:24 Rainer Orth
  2010-11-19 21:59 ` Tobias Burnus
  0 siblings, 1 reply; 2+ messages in thread
From: Rainer Orth @ 2010-11-19 17:24 UTC (permalink / raw)
  To: gcc-patches; +Cc: fortran

I think I've found and fixed all issues with Fortran multilib testing
introduced by the libquadmath patch:

* $compiler --print-multilib wasn't ever run for the gfortran.* tests.
  This was caused by the braces around $GFORTRAN_UNDER_TEST in
  gfortran.exp (gfortran_link_flags): they caused the literal string
  "$GFORTRAN_UNDER_TEST" to be passed to gcc-set-multilib-library-path,
  which couldn't be found by [which $compiler].

* GFORTRAN_UNDER_TEST needs to use -B<path to libgfortran dir>/ to let
  the driver find libgfortran.spec, not -L.  The trailing / is also
  necessary for this to work.

* Finally, in gcc-defs.exp (gcc-set-multilib-library-path), $options is
  no a list.  As is, $compiler was exec'ed with a single argument
  "-B<somedir> -B<someotherdir>" --print-multilib, which cannot work.
  One needs an eval to fix this.

With those fixes, a -m64/sparcv9 test with runtest worked on
sparc-sun-solaris2.10.  I'm now starting a fresh bootstrap on
i386-pc-solaris2.1 and will commit the patch once this has finishes
successfully.

This code can never have been tested or worked anywhere ;-(

	Rainer


2010-11-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	gcc/testsuite:
	* lib/gcc-defs.exp (gcc-set-multilib-library-path): Use eval to
	exec $compiler.
	* lib/gfortran.exp (gfortran_link_flags): Remove braces around
	$GFORTRAN_UNDER_TEST.
	(gfortran_init): Use -B to specify specpath, add trailing /.

diff -r 9fa5269f2518 gcc/testsuite/lib/gcc-defs.exp
--- a/gcc/testsuite/lib/gcc-defs.exp	Fri Nov 19 11:23:22 2010 +0100
+++ b/gcc/testsuite/lib/gcc-defs.exp	Fri Nov 19 17:49:35 2010 +0100
@@ -253,7 +253,7 @@
     set options [lrange $compiler 1 end]
     set compiler [lindex $compiler 0]
     if { [is_remote host] == 0 && [which $compiler] != 0 } {
-	foreach i "[exec $compiler $options --print-multi-lib]" {
+	foreach i "[eval exec $compiler $options --print-multi-lib]" {
 	    set mldir ""
 	    regexp -- "\[a-z0-9=_/\.-\]*;" $i mldir
 	    set mldir [string trimright $mldir "\;@"]
diff -r 9fa5269f2518 gcc/testsuite/lib/gfortran.exp
--- a/gcc/testsuite/lib/gfortran.exp	Fri Nov 19 11:23:22 2010 +0100
+++ b/gcc/testsuite/lib/gfortran.exp	Fri Nov 19 17:49:35 2010 +0100
@@ -118,7 +118,7 @@
           append flags "-L${gccpath}/libiberty "
       }
       append ld_library_path \
-	[gcc-set-multilib-library-path { $GFORTRAN_UNDER_TEST } ]
+	[gcc-set-multilib-library-path $GFORTRAN_UNDER_TEST ]
     }
 
     set_ld_library_path_env_vars
@@ -166,7 +166,7 @@
 		} else {
 		    set specpath [get_multilibs]
 		}
-		set GFORTRAN_UNDER_TEST [findfile $base_dir/../../gfortran "$base_dir/../../gfortran -B$base_dir/../../ -L$specpath/libgfortran" [findfile $base_dir/gfortran "$base_dir/gfortran -B$base_dir/" [transform gfortran]]]
+		set GFORTRAN_UNDER_TEST [findfile $base_dir/../../gfortran "$base_dir/../../gfortran -B$base_dir/../../ -B$specpath/libgfortran/" [findfile $base_dir/gfortran "$base_dir/gfortran -B$base_dir/" [transform gfortran]]]
 	    }
 	}
     }

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [testsuite, fortran] Fix Fortran execution tests for non-default multilib
  2010-11-19 17:24 [testsuite, fortran] Fix Fortran execution tests for non-default multilib Rainer Orth
@ 2010-11-19 21:59 ` Tobias Burnus
  0 siblings, 0 replies; 2+ messages in thread
From: Tobias Burnus @ 2010-11-19 21:59 UTC (permalink / raw)
  To: Rainer Orth; +Cc: gcc-patches, fortran

Rainer Orth wrote:
> I think I've found and fixed all issues with Fortran multilib testing
> introduced by the libquadmath patch:

Thanks for tracing this down and for the patch.
 From my side - what ever it counts - the patch is OK.

Tobias

> 2010-11-19  Rainer Orth<ro@CeBiTec.Uni-Bielefeld.DE>
>
> 	gcc/testsuite:
> 	* lib/gcc-defs.exp (gcc-set-multilib-library-path): Use eval to
> 	exec $compiler.
> 	* lib/gfortran.exp (gfortran_link_flags): Remove braces around
> 	$GFORTRAN_UNDER_TEST.
> 	(gfortran_init): Use -B to specify specpath, add trailing /.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-11-19 21:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-19 17:24 [testsuite, fortran] Fix Fortran execution tests for non-default multilib Rainer Orth
2010-11-19 21:59 ` Tobias Burnus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).