This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Richard Guenther wrote:
>>   # Configure libtool
>>   #AC_MSG_NOTICE([====== Starting libtool configuration])
>> + if x$enable_shared = xyes; then
>>   AC_LIBTOOL_DLOPEN
>> + fi
>>     
Unless I missed something, the AC_LIBTOOL_DLOPEN can be completely
removed as nothing in gfortran seems to use dlopen.

> 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 think one can disable all of the AC_CHECK_FUNCS to get a reasonably
working compiler. One will get test suite failures for fd_truncate (test
suite class "{ fd_truncate }"), no useful time will be reported and
long-double reading will not work, and some vendor extensions like
"chdir" will not work, but this still leaves a reasonably well working
Fortran compiler.

Well, if "AC_CHECK_LIB" also does not work for GCC_NO_EXECUTABLES
compiling, one slowly reaches the point where a
GCC_NO_EXECUTABLES-compiled libgfortran is of only little use as this
disables essentially all of the libm functions, which are of cause
essential for Fortran programs.

Tobias


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]