This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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]

[PATCH] libgfortran LDFLAGS missing libm


	The libgfortran shared library invokes math library functions and
depends on the math library, but is not linked against libm.  This patch
adds "-lm" to the link line, matching libstdc++.  libgfortran.so appears
to work now because gfortran implicitly adds -lm to the link line and the
dynamic linker resolves the symbols through the main program, which is not
robust.

David


	* Makefile.am (libgfortran_la_LDFLAGS): Add -lm.
	* Makefile.in: Rebuilt.

Index: Makefile.am
===================================================================
RCS file: /cvs/gcc/gcc/libgfortran/Makefile.am,v
retrieving revision 1.13
diff -c -p -r1.13 Makefile.am
*** Makefile.am	6 Aug 2004 21:47:01 -0000	1.13
--- Makefile.am	23 Aug 2004 18:10:56 -0000
*************** AM_CFLAGS = -std=gnu99
*** 6,12 ****
  
  toolexeclib_LTLIBRARIES = libgfortran.la libgfortranbegin.la
  
! libgfortran_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version`
  
  ## This should really go in the compiler lib dir, not the system lib dir.
  libgfortranbegin_la_SOURCES = fmain.c
--- 6,12 ----
  
  toolexeclib_LTLIBRARIES = libgfortran.la libgfortranbegin.la
  
! libgfortran_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` -lm
  
  ## This should really go in the compiler lib dir, not the system lib dir.
  libgfortranbegin_la_SOURCES = fmain.c


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