[PATCH] libgfortran: fix error: Link tests are not allowed after GCC_NO_EXECUTABLES

Richard Guenther rguenther@suse.de
Mon Sep 22 14:29:00 GMT 2008


On Mon, 22 Sep 2008, Richard Guenther wrote:

> On Mon, 22 Sep 2008, Tobias Burnus wrote:
> 
> > Richard Guenther wrote:
> > > By just copying over what libssp does.  Is this the correct approach?
> > > Ok for trunk/branch?
> > >   
> > I don't know whether it is the correct approach,  but it looks
> > reasonable. Thus:
> > 
> > OK and thanks for fixing it.
> 
> It get's me further, but AC_LIBTOOL_DLOPEN fails the same way if
> you configure a cross to spu with --disable-shared, so I'm in addition
> now trying
> 
> *************** AC_PROG_INSTALL
> *** 158,164 ****
> --- 164,172 ----
>   
>   # Configure libtool
>   #AC_MSG_NOTICE([====== Starting libtool configuration])
> + if x$enable_shared = xyes; then
>   AC_LIBTOOL_DLOPEN
> + fi
>   AM_PROG_LIBTOOL
>   AC_SUBST(enable_shared)
>   AC_SUBST(enable_static)

Then we run into

# Check for library functions.
AC_CHECK_FUNCS(getrusage times mkstemp strtof strtold snprintf ftruncate 
chsize)
AC_CHECK_FUNCS(chdir strerror getlogin gethostname kill link symlink 
perror)
AC_CHECK_FUNCS(sleep time ttyname signal alarm ctime clock access fork 
execl)
AC_CHECK_FUNCS(wait setmode execvp pipe dup2 close fdopen strcasestr 
getrlimit)
AC_CHECK_FUNCS(gettimeofday stat fstat lstat getpwuid vsnprintf dup 
getcwd)

which all try to do link tests ... :(  libssp again does sth like

if test x$gcc_no_link = xyes; then
  # Presume the ISO C functions are available; add target-specific
  # configuration here if required.
  AC_DEFINE(HAVE_STRNCPY)
  AC_DEFINE(HAVE_STRNCAT)
else
  AC_CHECK_FUNCS(mempcpy strncpy strncat)
fi

I guess libgfortran is not really ready for being cross-compiled :/

Richard.



More information about the Fortran mailing list