[dejagnu/f16] gfortran support added Resolves: #635651

Honza Horak hhorak at fedoraproject.org
Mon May 14 16:48:40 UTC 2012


commit 3f5fdc4f375a5c5aa672d5a6a50e905a71214a87
Author: Honza HorĂ¡k <hhorak at redhat.com>
Date:   Mon May 14 18:29:20 2012 +0200

    gfortran support added
    Resolves: #635651

 dejagnu-1.5-gfortran.patch |  167 ++++++++++++++++++++++++++++++++++++++++++++
 dejagnu.spec               |    8 ++-
 2 files changed, 174 insertions(+), 1 deletions(-)
---
diff --git a/dejagnu-1.5-gfortran.patch b/dejagnu-1.5-gfortran.patch
new file mode 100644
index 0000000..163df40
--- /dev/null
+++ b/dejagnu-1.5-gfortran.patch
@@ -0,0 +1,167 @@
+diff --git a/ChangeLog b/ChangeLog
+index 2b5d566..3866395 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,3 +1,11 @@
++2011-06-30  Tom Tromey  <tromey at redhat.com>
++
++	* doc/ref.xml: Document find_gfortran.
++	* doc/dejagnu.texi: Regenerate.
++	* lib/target.exp (default_target_compile): Handle f90.
++	(default_target_compile): Likewise.
++	* lib/libgloss.exp (find_gfortran): New proc.
++
+ 2011-06-30  Ben Elliston  <bje at gnu.org>
+ 
+ 	* Makefile.am (all-local): New rule.
+diff --git a/doc/dejagnu.texi b/doc/dejagnu.texi
+index 904cb99..3d616c5 100644
+--- a/doc/dejagnu.texi
++++ b/doc/dejagnu.texi
+@@ -6548,6 +6548,7 @@ executable image for an embedded systems.
+ * Find_gcj Procedure: find_gcj procedure.
+ * Find_g++ Procedure: find_g++ procedure.
+ * Find_g77 Procedure: find_g77 procedure.
++* Find_gfortran Procedure: find_gfortran procedure.
+ * Process_multilib_options Procedure: process_multilib_options procedure.
+ * Add_multilib_option Procedure: add_multilib_option procedure.
+ * Find_gas Procedure: find_gas procedure.
+@@ -6752,7 +6753,7 @@ executable image for an embedded systems.
+ @t{@b{find_g++}(@i{});}
+ @end quotation
+ 
+- at node find_g77 procedure, process_multilib_options procedure, find_g++ procedure, Libgloss
++ at node find_g77 procedure, find_gfortran procedure, find_g++ procedure, Libgloss
+ @subsubsection Find_g77 Procedure
+ 
+ 
+@@ -6761,7 +6762,16 @@ executable image for an embedded systems.
+ @t{@b{find_g77}(@i{});}
+ @end quotation
+ 
+- at node process_multilib_options procedure, add_multilib_option procedure, find_g77 procedure, Libgloss
++ at node find_gfortran procedure, process_multilib_options procedure, find_g77 procedure, Libgloss
++ at subsubsection Find_gfortran Procedure
++
++
++ at quotation
++
++ at t{@b{find_gfortran}(@i{});}
++ at end quotation
++
++ at node process_multilib_options procedure, add_multilib_option procedure, find_gfortran procedure, Libgloss
+ @subsubsection Process_multilib_options Procedure
+ 
+ 
+diff --git a/doc/ref.xml b/doc/ref.xml
+index 570fbc0..b54d2ff 100644
+--- a/doc/ref.xml
++++ b/doc/ref.xml
+@@ -4146,6 +4146,19 @@
+         </funcsynopsis>
+ 	</sect4>
+ 
++	<sect4 id="findgfortran" xreflabel="find_gfortran procedure">
++	  <title>Find_gfortran Procedure</title>
++
++	  <para></para>
++
++	<funcsynopsis role="tcl">
++          <funcprototype>
++            <funcdef><function>find_gfortran</function></funcdef>
++	    <paramdef><parameter></parameter></paramdef>
++           </funcprototype>
++        </funcsynopsis>
++	</sect4>
++
+ 	<sect4 id="processmultiliboptions" xreflabel="process_multilib_options
+ 	procedure">
+ 	  <title>Process_multilib_options Procedure</title>
+diff --git a/lib/libgloss.exp b/lib/libgloss.exp
+index e651eb6..77150cb 100644
+--- a/lib/libgloss.exp
++++ b/lib/libgloss.exp
+@@ -1,5 +1,5 @@
+ # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+-# 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
++# 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+ #
+ # This file is part of DejaGnu.
+ #
+@@ -702,6 +702,25 @@ proc find_g77 {} {
+     return $CC
+ }
+ 
++proc find_gfortran {} {
++    global tool_root_dir
++
++    if {![is_remote host]} {
++	set file [lookfor_file $tool_root_dir gfortran]
++	if { $file == "" } {
++	    set file [lookfor_file $tool_root_dir gcc/gfortran]
++	}
++	if { $file != "" } {
++	    set CC "$file -B[file dirname $file]/"
++	} else {
++	    set CC [transform gfortran]
++	}
++    } else {
++	set CC [transform gfortran]
++    }
++    return $CC
++}
++
+ proc find_gnatmake {} {
+     global tool_root_dir
+ 
+diff --git a/lib/target.exp b/lib/target.exp
+index c9fde2c..ec9fff2 100644
+--- a/lib/target.exp
++++ b/lib/target.exp
+@@ -1,5 +1,5 @@
+ # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+-# 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
++# 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+ #
+ # This file is part of DejaGnu.
+ #
+@@ -367,6 +367,18 @@ proc default_target_compile {source destfile type options} {
+ 	    }
+ 	}
+ 
++	if { $i == "f90" } {
++	    set compiler_type "f90"
++	    if {[board_info $dest exists f90flags]} {
++		append add_flags " [target_info f90flags]"
++	    }
++	    if {[board_info $dest exists f90compiler]} {
++		set compiler [target_info f90compiler]
++	    } else {
++		set compiler [find_gfortran]
++	    }
++	}
++
+ 	if {[regexp "^dest=" $i]} {
+ 	    regsub "^dest=" $i "" tmp
+ 	    if {[board_info $tmp exists name]} {
+@@ -420,6 +432,7 @@ proc default_target_compile {source destfile type options} {
+     global CC_FOR_TARGET
+     global CXX_FOR_TARGET
+     global F77_FOR_TARGET
++    global F90_FOR_TARGET
+     global GNATMAKE_FOR_TARGET
+ 
+     if {[info exists GNATMAKE_FOR_TARGET]} {
+@@ -446,6 +459,12 @@ proc default_target_compile {source destfile type options} {
+ 	}
+     }
+ 
++    if {[info exists F90_FOR_TARGET]} {
++	if { $compiler_type == "f90" } {
++	    set compiler $F90_FOR_TARGET
++	}
++    }
++
+     if { $compiler == "" } {
+ 	set compiler [board_info $dest compiler]
+ 	if { $compiler == "" } {
diff --git a/dejagnu.spec b/dejagnu.spec
index 3d48b5e..f4d8fef 100644
--- a/dejagnu.spec
+++ b/dejagnu.spec
@@ -1,7 +1,7 @@
 Summary: A front end for testing other programs
 Name: dejagnu
 Version: 1.5
-Release: 1%{?dist}
+Release: 2%{?dist}
 Epoch: 1
 License: GPLv3+
 Source: ftp://ftp.gnu.org/gnu/dejagnu/dejagnu-%{version}.tar.gz
@@ -14,6 +14,7 @@ BuildArch: noarch
 BuildRequires: expect screen texinfo
 Patch1: dejagnu-1.5-smp-1.patch
 Patch2: dejagnu-1.5-runtest.patch
+Patch3: dejagnu-1.5-gfortran.patch
 
 %description
 DejaGnu is an Expect/Tcl based framework for testing other programs.
@@ -27,6 +28,7 @@ into software development).
 %setup -q
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 %build
 %configure -v
@@ -77,6 +79,10 @@ rm -rf $RPM_BUILD_ROOT
 %{_infodir}/dejagnu*
 
 %changelog
+* Mon May 14 2012 Honza Horak <hhorak at redhat.com> 1:1.5-2
+- gfortran support added
+  Resolves: #635651
+
 * Tue Mar 22 2011 Honza Horak <hhorak at redhat.com> 1:1.5-1
 - Update to 1.5, license changed to GPLv3+
 


More information about the scm-commits mailing list