From: Peter O'Gorman Date: Sun, 12 Sep 2004 13:36:17 +0000 (+0000) Subject: Our fortran tests were not very good. All the libraries created X-Git-Tag: release-1-9d~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f0cb3767cf800f7fc10f603f13640b01606614e1;p=thirdparty%2Flibtool.git 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. --- diff --git a/ChangeLog b/ChangeLog index 756649013..14db743b8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2004-09-12 Peter O'Gorman + + 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 * m4/libtool.m4 (_LT_CMD_GLOBAL_SYMBOLS): The linker distinguishes diff --git a/tests/f77demo-make.test b/tests/f77demo-make.test index 362e4f9ce..2078118bd 100755 --- a/tests/f77demo-make.test +++ b/tests/f77demo-make.test @@ -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 diff --git a/tests/f77demo/Makefile.am b/tests/f77demo/Makefile.am index 7b37b4bbc..a00e7003d 100644 --- a/tests/f77demo/Makefile.am +++ b/tests/f77demo/Makefile.am @@ -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) diff --git a/tests/f77demo/foof.f b/tests/f77demo/foof.f index 6e631fbff..f899c494f 100644 --- a/tests/f77demo/foof.f +++ b/tests/f77demo/foof.f @@ -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 index 000000000..e1f155065 --- /dev/null +++ b/tests/f77demo/foof2.f @@ -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 index 000000000..6d88204da --- /dev/null +++ b/tests/f77demo/foof3.f @@ -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 diff --git a/tests/f77demo/fprogram.f b/tests/f77demo/fprogram.f index bf882f6e1..f4b4ccddd 100644 --- a/tests/f77demo/fprogram.f +++ b/tests/f77demo/fprogram.f @@ -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 -