libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: libtool--release--2.0 test results


From: Ralf Wildenhues
Subject: Re: libtool--release--2.0 test results
Date: Mon, 11 Oct 2004 15:19:51 +0200
User-agent: Mutt/1.4.1i

* Peter O'Gorman wrote on Mon, Oct 11, 2004 at 02:47:04PM CEST:
> Ralf Wildenhues wrote:
> 
> >Furthermore, f77demo-make fails for the non-static configurations with a
> >./.libs/libmix.so: undefined reference to `MAIN__'
> >while trying to link cprogram.  I'm not sure how to fix this, not being a
> >Fortran expert.
> 
> Since we only recently started building shared fortran libraries in the 
> test, it is meant to skip the f77demo-make test if it fails. That's not 
> working?

The testsuite does return SKIP.  But obviously the test is not working,
and I'd like to change that.  (Even if the failure is known :)

> Anyway whatever object/library contains MAIN__ should have been in FLIBS, 
> and we rely on autoconf to figure out FLIBS.

Thanks for this hint.  That's what I needed in order to look into it.

First: the Autoconf check thinks no dummy main is needed.
I still need to find out why it does this.

Second: cprogram.c does not make use of the dummy.
The patch below changes that.  Compiling cprogram by hand then succeeds
if I use
$ make CPPFLAGS=-DF77_DUMMY_MAIN=MAIN__

Is this patch applicable?  Is the idea the right one?

Regards,
Ralf


2004-10-11  Ralf Wildenhues <address@hidden>

        * tests/f77demo/cprogram.c: Define the F77_DUMMY_MAIN function
        if necessary.

Index: tests/f77demo/cprogram.c
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/f77demo/cprogram.c,v
retrieving revision 1.1
diff -u -r1.1 cprogram.c
--- tests/f77demo/cprogram.c    14 Oct 2003 21:46:13 -0000      1.1
+++ tests/f77demo/cprogram.c    11 Oct 2004 13:16:06 -0000
@@ -16,6 +16,13 @@
 
 #include "foo.h"
 
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+
 int
 main(int argc, char **argv)
 {





reply via email to

[Prev in Thread] Current Thread [Next in Thread]