Commit e87045f3 by Andrew Pinski Committed by Andrew Pinski

re PR libfortran/20766 ([darwin] - run time error when calling fortran subroutine from c)

2005-04-07  Andrew Pinski  <pinskia@physics.uc.edu>

        PR libfortran/20766
        * configure.ac (extra_ldflags_libgfortran): Set for *-darwin* to
        "-Wl,-single_module".
        * configure: Regenerate.
        * Makefile.am (libgfortran_la_LDFLAGS): Add extra_ldflags_libgfortran.
        * Makefile.in: Regenerate.

From-SVN: r97804
parent e87047c6
2005-04-07 Andrew Pinski <pinskia@physics.uc.edu>
PR libfortran/20766
* configure.ac (extra_ldflags_libgfortran): Set for *-darwin* to
"-Wl,-single_module".
* configure: Regenerate.
* Makefile.am (libgfortran_la_LDFLAGS): Add extra_ldflags_libgfortran.
* Makefile.in: Regenerate.
2005-04-05 Francois-Xavier Coudert <coudert@clipper.ens.fr> 2005-04-05 Francois-Xavier Coudert <coudert@clipper.ens.fr>
PR libfortran/20755 PR libfortran/20755
......
...@@ -10,7 +10,7 @@ gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER) ...@@ -10,7 +10,7 @@ gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
toolexeclib_LTLIBRARIES = libgfortran.la libgfortranbegin.la toolexeclib_LTLIBRARIES = libgfortran.la libgfortranbegin.la
libgfortran_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` -lm libgfortran_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` -lm $(extra_ldflags_libgfortran)
## This should really go in the compiler lib dir, not the system lib dir. ## This should really go in the compiler lib dir, not the system lib dir.
libgfortranbegin_la_SOURCES = fmain.c libgfortranbegin_la_SOURCES = fmain.c
......
...@@ -266,6 +266,7 @@ datadir = @datadir@ ...@@ -266,6 +266,7 @@ datadir = @datadir@
enable_shared = @enable_shared@ enable_shared = @enable_shared@
enable_static = @enable_static@ enable_static = @enable_static@
exec_prefix = @exec_prefix@ exec_prefix = @exec_prefix@
extra_ldflags_libgfortran = @extra_ldflags_libgfortran@
host = @host@ host = @host@
host_alias = @host_alias@ host_alias = @host_alias@
host_cpu = @host_cpu@ host_cpu = @host_cpu@
...@@ -297,7 +298,7 @@ AM_CFLAGS = -std=gnu99 ...@@ -297,7 +298,7 @@ AM_CFLAGS = -std=gnu99
ACLOCAL_AMFLAGS = -I ../config ACLOCAL_AMFLAGS = -I ../config
gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER) gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
toolexeclib_LTLIBRARIES = libgfortran.la libgfortranbegin.la toolexeclib_LTLIBRARIES = libgfortran.la libgfortranbegin.la
libgfortran_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` -lm libgfortran_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` -lm $(extra_ldflags_libgfortran)
libgfortranbegin_la_SOURCES = fmain.c libgfortranbegin_la_SOURCES = fmain.c
libgfortranbegin_la_LDFLAGS = -static libgfortranbegin_la_LDFLAGS = -static
AM_CPPFLAGS = -iquote$(srcdir)/io AM_CPPFLAGS = -iquote$(srcdir)/io
......
...@@ -138,6 +138,15 @@ FC="$GFORTRAN" ...@@ -138,6 +138,15 @@ FC="$GFORTRAN"
AC_PROG_FC(gfortran) AC_PROG_FC(gfortran)
FCFLAGS="$FCFLAGS -Wall -fno-repack-arrays -fno-underscoring" FCFLAGS="$FCFLAGS -Wall -fno-repack-arrays -fno-underscoring"
# extra LD Flags which are required for targets
case "${host}" in
*-darwin*)
# Darwin needs -single_module when linking libgfortran
extra_ldflags_libgfortran=-Wl,-single_module
;;
esac
AC_SUBST(extra_ldflags_libgfortran)
AC_SYS_LARGEFILE AC_SYS_LARGEFILE
AC_FUNC_MMAP AC_FUNC_MMAP
AC_TYPE_OFF_T AC_TYPE_OFF_T
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment