]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
Our fortran tests were not very good. All the libraries created
authorPeter O'Gorman <peter@pogma.com>
Sun, 12 Sep 2004 13:36:17 +0000 (13:36 +0000)
committerPeter O'Gorman <peter@pogma.com>
Sun, 12 Sep 2004 13:36:17 +0000 (13:36 +0000)
were convenience libs, so we did not test the creation of shared
libraries on any platform. Also none of the libs used any actual
fortran library calls, adding a call to write(*,*) in each lib
causes the tests to fail on darwin (and presumably other platforms).
These new tests would likely cause many more fortran test failures,
so if there is an error during make it is reported as SKIP.

* tests/f77demo-make.test: Don't fail hard, skip on failure.
* tests/f77demo/foof2.f: New file.
* tests/f77demo/foof3.f: New file.
* tests/f77demo/fprogram.f: Call routine in new lib.
* tests/f77demo/foof.f: Call routine in another new lib.
* tests/f77demo/Makefile.am: Make a couple of new libraries, add
$(FLIBS) to cprogram LDADD.

ChangeLog
tests/f77demo-make.test
tests/f77demo/Makefile.am
tests/f77demo/foof.f
tests/f77demo/foof2.f [new file with mode: 0644]
tests/f77demo/foof3.f [new file with mode: 0644]
tests/f77demo/fprogram.f

index 756649013e176050a4db1072571f6846e37f5461..14db743b8a9635b98654a5245ad10910025f5b35 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2004-09-12  Peter O'Gorman  <peter@pogma.com>
+
+       Our fortran tests were not very good. All the libraries created
+       were convenience libs, so we did not test the creation of shared
+       libraries on any platform. Also none of the libs used any actual
+       fortran library calls, adding a call to write(*,*) in each lib
+       causes the tests to fail on darwin (and presumably other platforms).
+       These new tests would likely cause many more fortran test failures,
+       so if there is an error during make it is reported as SKIP.
+
+       * tests/f77demo-make.test: Don't fail hard, skip on failure.
+       * tests/f77demo/foof2.f: New file.
+       * tests/f77demo/foof3.f: New file.
+       * tests/f77demo/fprogram.f: Call routine in new lib.
+       * tests/f77demo/foof.f: Call routine in another new lib.
+       * tests/f77demo/Makefile.am: Make a couple of new libraries, add
+       $(FLIBS) to cprogram LDADD.
+
 2004-09-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        * m4/libtool.m4 (_LT_CMD_GLOBAL_SYMBOLS): The linker distinguishes
index 362e4f9cee5cc2da26a7cf56b0ae9414a9fc30ff..2078118bd79ad84b9a3b82e0825f1b986ef0b223 100755 (executable)
@@ -31,6 +31,8 @@ func_require "f77demo-conf" "f77demo/Makefile"
 
 func_rmprefixdir
 func_cd "f77demo"
-func_make
+# May fail make on some platforms, simply "skip" in that case
+#func_make
+eval $MAKE || func_skip "The improved fortran tests catch a known failure mode"
 
 exit 0
index 7b37b4bbcdad65a38b6cbd5ad496879b9d881a42..a00e7003dfe31f40b6c7630d42004b815f624801 100644 (file)
@@ -21,12 +21,19 @@ AUTOMAKE_OPTIONS = no-dependencies foreign
 ACLOCAL_AMFLAGS  = -I ../../m4
 AM_CPPFLAGS     = -I$(top_srcdir)/../..
 
-noinst_LTLIBRARIES = libfoo.la libmix.la
+lib_LTLIBRARIES = libfoo.la libmix.la libfoo2.la libfoo3.la
 
 libfoo_la_SOURCES = foof.f
 libfoo_la_LDFLAGS = -no-undefined
+libfoo_la_LIBADD = libfoo2.la
 
-libmix_la_SOURCES = foof.f fooc.c
+libfoo2_la_SOURCES = foof2.f
+libfoo2_la_LDFLAGS = -no-undefined
+
+libfoo3_la_SOURCES = foof3.f
+libfoo3_la_LDFLAGS = -no-undefined
+
+libmix_la_SOURCES = foof.f foof2.f fooc.c
 libmix_la_LDFLAGS = -no-undefined
 
 noinst_HEADERS = foo.h
@@ -34,10 +41,10 @@ noinst_HEADERS = foo.h
 bin_PROGRAMS = fprogram cprogram
 
 fprogram_SOURCES = fprogram.f
-fprogram_LDADD = libfoo.la
+fprogram_LDADD = libfoo.la libfoo3.la
 
 cprogram_SOURCES = cprogram.c
-cprogram_LDADD = libmix.la
+cprogram_LDADD = libmix.la $(FLIBS)
 
 $(OBJECTS): libtool
 libtool: $(LIBTOOL_DEPS)
index 6e631fbfff0c38baa30334c944658f8a3df481b3..f899c494f4c909470dace851155a0f31e0c4461b 100644 (file)
@@ -6,8 +6,7 @@ C of the License, or (at your option) any later version.
 C 
 
       subroutine fsub(arg,res)
-      implicit none
-      integer*4 arg,res
-      res=arg*2
+      write(*,*) 'fsub called'
+      call fsubf(arg,res)
       return
       end
diff --git a/tests/f77demo/foof2.f b/tests/f77demo/foof2.f
new file mode 100644 (file)
index 0000000..e1f1550
--- /dev/null
@@ -0,0 +1,14 @@
+C 
+C This program is free software; you can redistribute it and/or
+C modify it under the terms of the GNU General Public License
+C as published by the Free Software Foundation; either version 2
+C of the License, or (at your option) any later version.
+C 
+
+      subroutine fsubf(arg,res)
+      implicit none
+      integer*4 arg,res
+      write(*,*) 'fsubf called'
+      res=arg*2
+      return
+      end
diff --git a/tests/f77demo/foof3.f b/tests/f77demo/foof3.f
new file mode 100644 (file)
index 0000000..6d88204
--- /dev/null
@@ -0,0 +1,14 @@
+C 
+C This program is free software; you can redistribute it and/or
+C modify it under the terms of the GNU General Public License
+C as published by the Free Software Foundation; either version 2
+C of the License, or (at your option) any later version.
+C 
+
+      subroutine fsub3(arg,res)
+      implicit none
+      integer*4 arg,res
+      write(*,*) 'fsub3 called'
+      res=arg*4
+      return
+      end
index bf882f6e17d8727676740a0a162f2bd17b7f9d90..f4b4ccddde286ed0040450cdf8408bafd8dc0e5a 100644 (file)
@@ -21,7 +21,14 @@ C
          write(*,*) 'fsub is ok!'
       endif
 
+      call fsub3(arg,res)
+
+      write(*,*) 'fsub3 returned, saying that 4 *',arg,' =',res
+
+      if (res.eq.8) then
+         write(*,*) 'fsub3 is ok!'
+      endif
+
       stop
       end
 
-