Ping [PATCH v2] Re: Link tests after GCC_NO_EXECUTABLES

Paolo Bonzini bonzini@gnu.org
Sun Dec 30 14:19:00 GMT 2007


Rask Ingemann Lambertsen wrote:
> http://gcc.gnu.org/ml/gcc-patches/2007-12/msg00632.html

Can you try using --cache-file= instead of "preloading" the cache file? 
  Like this:

# Pass --with-target-config if set.
if test "x${with_target_config}" != "x" ; then
   target_configargs="--cache-file=${with_target_config} 
${target_configargs}"
fi

> +if test x$gcc_no_link = xyes; then
> +  # If we cannot link, we cannot build shared libraries, so do not use
> +  # symbol versioning.
> +  gfortran_use_symver=no
> +else
> +  AC_TRY_LINK([int foo;],[],[gfortran_use_symver=yes],[gfortran_use_symver=no])
> +fi

Please change gfortran_use_symver to something like 
gfortran_cv_use_symver and use AC_CACHE_CHECK so that it can be 
overridden in the target cache file.

> +# The AC_LIB_LTDL macro is broken: ${ac_cv_lib_dl_dlopen} isn't checked.
> +# Temporarily permit link tests even if not working.
> +save_gcc_no_link="$gcc_no_link"; gcc_no_link=no
>  AC_LIB_LTDL
> +gcc_no_link="$save_gcc_no_link"

Please change AC_LTDL_DLLIB in libjava/libltdl/acinclude.m4 instead. 
You should use AC_SEARCH_LIBS like this:

ltdl_save_LIBS=$LIBS
AC_SEARCH_LIBS([dlopen], [dl])
LIBS=$ltdl_save_LIBS
case "$ac_cv_search_gethostbyname" in
   -ldl)
     LIBADD_DL="-ldl" libltdl_cv_lib_dl_dlopen="yes"\
     AC_DEFINE([HAVE_LIBDL], [1],
               [Define if you have the libdl library or equivalent.]
     ;;
   "none required")
     libltdl_cv_func_dlopen="yes"
     AC_DEFINE([HAVE_LIBDL], [1],
               [Define if you have the libdl library or equivalent.]
     ;;
   *) ...
esac

Thanks!

Paolo



More information about the Fortran mailing list