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]
Other format: [Raw text]

Re: Running GCC tests on installed compiler


Gerald,

> > This script seems quite outdated: it tests g77 and not gfortran, even
> > with the latest 4.3.0 snapshot (20070112). ...
>
> Would you mind submitting this as a patch?  

--- gcc-4.3-20070120/contrib/test_installed     Fri Jul 11 08:05:01 2003
+++ gcc-4.3-20070119/contrib/test_installed     Sat Jan 13 17:53:01 2007
@@ -16,12 +16,12 @@
 # will be appended to the srcdir.
 
 # You may specify where the binaries to be tested should be picked up
-# from.  If you specify --prefix=/some/dir, gcc, g++ and g77 will be
+# from.  If you specify --prefix=/some/dir, gcc, g++ and gfortran will be
 # looked for at /some/dir/bin.  Each one may be overridden by
 # specifying --with-gcc=/pathname/to/gcc, --with-g++=/pathname/to/g++
-# and --with-g77=/pathname/to/g77.  If you specify --without-gcc,
-# --without-g++ or --without-g77, the test for the specified program
-# will be skipped.  By default, gcc, g++ and g77 will be searched in
+# and --with-gfortran=/pathname/to/gfortran.  If you specify --without-gcc,
+# --without-g++ or --without-gfortran, the test for the specified program
+# will be skipped.  By default, gcc, g++ and gfortran will be searched in
 # the PATH.
 
 # An additional argument may specify --tmpdir=/some/dir; by default,
@@ -50,16 +50,16 @@
   --prefix=*) prefix=`echo "$1" | sed 's/[^=]*=//'`; shift;;
   --with-gcc=*) GCC_UNDER_TEST=`echo "$1" | sed 's/[^=]*=//'`; shift;;
   --with-g++=*) GXX_UNDER_TEST=`echo "$1" | sed 's/[^=]*=//'`; shift;;
-  --with-g77=*) G77_UNDER_TEST=`echo "$1" | sed 's/[^=]*=//'`; shift;;
+  --with-gfortran=*) GFORTRAN_UNDER_TEST=`echo "$1" | sed 's/[^=]*=//'`; shift;;
   --without-gcc) GCC_UNDER_TEST=no; shift;;
   --without-g++) GXX_UNDER_TEST=no; shift;;
-  --without-g77) G77_UNDER_TEST=no; shift;;
+  --without-gfortran) GFORTRAN_UNDER_TEST=no; shift;;
   --without-objc) OBJC_UNDER_TEST=no; shift;;
 
   --tmpdir=*) tmpdir=`echo "$1" | sed 's/[^=]*=//'`; shift;;
 
   --help) cat <<\EOF
-Runs the testsuite for an installed version of gcc/g++/g77/objc
+Runs the testsuite for an installed version of gcc/g++/gfortran/objc
 Copyright (C) 1998  Free Software Foundation
 by Alexandre Oliva <oliva@dcc.unicamp.br>
 
@@ -71,13 +71,13 @@
 --srcdir=/some/dir            same as --with-testsuite=/some/dir/gcc/testsuite
			       [deduced from shell-script pathname]
 
---prefix=/some/dir            use gcc, g++ and g77 from /some/dir/bin [PATH]
+--prefix=/some/dir            use gcc, g++ and gfortran from /some/dir/bin [PATH]
 --with-gcc=/some/dir/bin/gcc  use specified gcc program [gcc]
 --with-g++=/some/dir/bin/g++  use specified g++ program [g++]
---with-g77=/some/dir/bin/g77  use specified g77 program [g77]
+--with-gfortran=/some/dir/bin/gfortran  use specified gfortran program [gfortran]
 --without-gcc                 do not run gcc testsuite
 --without-g++                 do not run g++ testsuite
---without-g77                 do not run g77 testsuite
+--without-gfortran            do not run gfortran testsuite
 --without-objc                do not run objc testsuite
 
 --tmpdir=/some/dir            create temporaries and leave failed programs
@@ -109,13 +109,13 @@
 set CXXFLAGS ""
 set GCC_UNDER_TEST "${GCC_UNDER_TEST-${prefix}${prefix+/bin/}gcc}"
 set GXX_UNDER_TEST "${GXX_UNDER_TEST-${prefix}${prefix+/bin/}g++}"
-set G77_UNDER_TEST "${G77_UNDER_TEST-${prefix}${prefix+/bin/}g77}"
+set GFORTRAN_UNDER_TEST "${GFORTRAN_UNDER_TEST-${prefix}${prefix+/bin/}gfortran}"
 set OBJC_UNDER_TEST "${OBJC_UNDER_TEST-${prefix}${prefix+/bin/}gcc}"
 EOF
 
 test x"${GCC_UNDER_TEST}" = x"no" || runtest --tool gcc ${1+"$@"}
 test x"${GXX_UNDER_TEST}" = x"no" || runtest --tool g++ ${1+"$@"}
-test x"${G77_UNDER_TEST}" = x"no" || runtest --tool g77 ${1+"$@"}
+test x"${GFORTRAN_UNDER_TEST}" = x"no" || runtest --tool gfortran ${1+"$@"}
 test x"${OBJC_UNDER_TEST}" = x"no" || runtest --tool objc ${1+"$@"}
 
 exit 0

If this is OK along with no copyright assignment, I can submit a PR.
The copyright should probably extended to 2007. I think also than one 
should notify Alexandre Oliva. 

> I do not know whether you have a copyright assignment on file, but
> perhaps it is simply enough that we can take it even without one.

I haven't any copyright assignment unless there is a global one with the
french CNRS (Centre National de la Recherche Scientifique), but if one is
required to replace g77 by gfortran we are really living in a sad world!

> > I looked again to the manual (http://gcc.gnu.org/install/test.html) and
> > did not find this script documented anywhere.  Am I missing something
> > or is this a place where the manual can be improved?
> 
> The latter, I believe.  Do you think you could provide a patch against
> gcc/doc/install.texi?  ;-) I'll be happy to work with you on this if
> contributing to GCC is an option for you.

This part is trickier.  First I'll have to learn the basics of texi, since
I have never used it.  Second I am afraid to be writing challenged.  Third
I don't have much time to overcome these shortcomings.  

As a first shot, I think the header of "test_installed" with the proper
format will be enough.  In my opinion the most important point is the
visibility of the entry point, just to get the information that the script
exists.  My guess is that people interested by postinstall testing will be
able to run the script from its comments and, if I am wrong, feedback will
help to put the entry in better shape.  This entry point could probably be
inserted as a seventh item in

http://gcc.gnu.org/install/

Dominique


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