[Top][All Lists]
[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 19:15:39 +0200 |
User-agent: |
Mutt/1.4.1i |
* Albert Chin wrote on Mon, Oct 11, 2004 at 07:01:24PM CEST:
> On Mon, Oct 11, 2004 at 06:35:59PM +0200, Ralf Wildenhues wrote:
> > * Ralf Wildenhues wrote on Mon, Oct 11, 2004 at 03:19:51PM CEST:
> > > * 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.
> > *snip*
> > > > Anyway whatever object/library contains MAIN__ should have been in
> > > > FLIBS,
> > > > and we rely on autoconf to figure out FLIBS.
> >
> > To add to this: I confirmed that it is the libtool-created shared
> > libraries that require a function `MAIN__', not the libraries the
> > compiler adds to the link line. ifort adds a compiler-provided
> > object `for_main.o' to the link line creating the shared libary.
> >
> > By creating the shared libraries with the linker flag `-nofor_main',
> > it is possible to eliminate the need for `MAIN__' (without the patch
> > I posted earlier). This currently does not work with libtool, as it
> > deletes that argument from the link line.
>
> So, it is on the libtool command-line but libtool removes it from the
> linker commands?
Yes. Note that `-nofor_main' is only necessary while linking the shared
library, not while linking the executable (which is done by icc anyway,
not ifort).
> How about adding it to this section in
> config/ltmain.m4sh? Might as well group them.
Sounds good.
So now, with the patch below, plus LDFLAGS=-nofor_main, all Fortran
tests pass. Is it sensible to require the user to set the LDFLAGS
setting?
Regards,
Ralf
Index: config/ltmain.m4sh
===================================================================
RCS file: /cvsroot/libtool/libtool/config/ltmain.m4sh,v
retrieving revision 1.1.2.6
diff -u -r1.1.2.6 ltmain.m4sh
--- config/ltmain.m4sh 11 Oct 2004 04:15:12 -0000 1.1.2.6
+++ config/ltmain.m4sh 11 Oct 2004 17:11:30 -0000
@@ -2750,7 +2750,8 @@
# +DA*, +DD* enable 64-bit mode on the HP compiler
# -q* pass through compiler args for the IBM compiler
# -m* pass through architecture-specific compiler args for GCC
- -64|-mips[[0-9]]|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*)
+ # -nofor_main Allow linking of C program to Intel ifort-created dso
+ -64|-mips[[0-9]]|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-nofor_main)
arg=`$ECHO "X$arg" | $Xsed -e "$sed_quote_subst"`
func_quote_for_eval "$arg"
arg="$func_quote_for_eval_result"
- Re: libtool--release--2.0 test results, (continued)
Re: libtool--release--2.0 test results, Ralf Wildenhues, 2004/10/11
- Re: libtool--release--2.0 test results, Peter O'Gorman, 2004/10/11
- Re: libtool--release--2.0 test results, Ralf Wildenhues, 2004/10/11
- Re: libtool--release--2.0 test results, Ralf Wildenhues, 2004/10/11
- Re: libtool--release--2.0 test results, Albert Chin, 2004/10/11
- Re: libtool--release--2.0 test results,
Ralf Wildenhues <=
- Re: libtool--release--2.0 test results, Albert Chin, 2004/10/11
- Re: libtool--release--2.0 test results, Peter O'Gorman, 2004/10/11
- Re: libtool--release--2.0 test results, Ralf Wildenhues, 2004/10/12