MinGW (http://www.mingw.org/) now has an official 4.4.0 release - and thus
finally a 4.x release. If one looks at the release,
http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=241304
one finds a tar ball (gcc-4.4.0-mingw32-src-2.tar.gz) with patches.

For Fortran, I found the following; we should consider applying them - after
understanding whether the changes make sense.

There are two changes:
a) -no-undefined
b) LIBOBJDIR=

 * * *


a) -no-undefined option

For MinGW the "-no-undefined" is set, cf.
http://www.gnu.org/software/libtool/manual/html_node/libtool-script-contents.html#index-allow_005fundefined_005fflag-358
and more readable:
  http://lists.gnupg.org/pipermail/gcrypt-devel/2006-June/000966.html

Doing a grep shows that it is already set for libgomp/Makefile.in and
libssp/Makefile.in.
MinGW sets is additionally for libgfortran, libffi, libjava, libobjc,
libstdc++v3/{,lib*/}.


b) LIBOBJDIR=

See:
http://www.gnu.org/software/autoconf/manual/html_node/AC_005fLIBOBJ-vs-LIBOBJS.html.
I think this part of the patch is a side effect of using autoconf 1.10+ instead
of autoconf 1.9.6, which is suggested for GCC development.

Note: An analogous patch was accepted for libgomp by a build-machinery
maintainer,
http://gcc.gnu.org/ml/gcc-patches/2008-08/msg01509.html

---------------------------------------------------------------------------
Index: libgfortran/Makefile.am
===================================================================
--- libgfortran/Makefile.am     (revision 145042)
+++ libgfortran/Makefile.am     (working copy)
@@ -17,7 +17,9 @@ LTLDFLAGS = $(shell $(SHELL) $(top_srcdi

 toolexeclib_LTLIBRARIES = libgfortran.la
 libgfortran_la_LINK = $(LINK)
-libgfortran_la_LDFLAGS = -version-info `grep -v '^\#'
$(srcdir)/libtool-version` $(LTLDFLAGS) -lm $(extra_ldflags_libgfortran)
$(version_arg)
+libgfortran_la_LDFLAGS = -version-info `grep -v '^\#'
$(srcdir)/libtool-version` \
+                        $(LTLDFLAGS) -lm $(extra_ldflags_libgfortran) \
+                        $(version_arg) -no-undefined

 myexeclib_LTLIBRARIES = libgfortranbegin.la
 myexeclibdir = $(libdir)/gcc/$(target_alias)/$(gcc_version)$(MULTISUBDIR)
Index: libgfortran/Makefile.in
===================================================================
--- libgfortran/Makefile.in     (revision 146010)
+++ libgfortran/Makefile.in     (working copy)
@@ -37,6 +37,7 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
+LIBOBJDIR =

 # dummy sources for libtool
 @onestep_t...@am__append_1 = libgfortran_c.c libgfortran_f.f90
@@ -953,7 +954,10 @@ gcc_version := $(shell cat $(top_srcdir)
 LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
 toolexeclib_LTLIBRARIES = libgfortran.la
 libgfortran_la_LINK = $(LINK)
-libgfortran_la_LDFLAGS = -version-info `grep -v '^\#'
$(srcdir)/libtool-version` $(LTLDFLAGS) -lm $(extra_ldflags_libgfortran)
$(version_arg)
+libgfortran_la_LDFLAGS = -version-info `grep -v '^\#'
$(srcdir)/libtool-version` \
+                        $(LTLDFLAGS) -lm $(extra_ldflags_libgfortran) \
+                        $(version_arg) -no-undefined
+
 myexeclib_LTLIBRARIES = libgfortranbegin.la
 myexeclibdir = $(libdir)/gcc/$(target_alias)/$(gcc_version)$(MULTISUBDIR)
 libgfortranbegin_la_SOURCES = fmain.c


-- 
           Summary: MinGW Fortran patches for libgfortran/Makefile.{in,am}
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40549

Reply via email to