This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java 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: FYI: CHECK_FOR_BROKEN_MINGW_LD fix


I'm checking this in on the trunk.  I'll be putting a similar patch on
the 3.3 branch as well.

Autoconf macros have to be in acinclude.m4 or they will be lost when
aclocal.m4 is regenerated.

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>
	* aclocal.m4, configure, include/config.h.in: Rebuilt.
	* acinclude.m4 (CHECK_FOR_BROKEN_MINGW_LD): Resurrected; was in
	aclocal.m4 and lost in some merge.

Index: acinclude.m4
===================================================================
RCS file: /cvs/gcc/gcc/libjava/acinclude.m4,v
retrieving revision 1.22
diff -u -r1.22 acinclude.m4
--- acinclude.m4 16 Dec 2002 18:22:50 -0000 1.22
+++ acinclude.m4 31 Jan 2003 17:55:34 -0000
@@ -249,3 +249,27 @@
         [Define if your <locale.h> file defines LC_MESSAGES.])
     fi
   fi])
+
+AC_DEFUN([CHECK_FOR_BROKEN_MINGW_LD],
+[
+AC_MSG_CHECKING(whether 'ld' is at least 2.13)
+LD_PROG=`$CC --print-prog-name=ld`
+LD_VERSION=`$LD_PROG --version`
+LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 1 | cut -d ' ' -f 4`
+LD_VERSION_MINOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 2`
+if expr "$LD_VERSION_MAJOR" \> 2 > /dev/null; then
+  LD_OK="ok"
+else
+  if expr "$LD_VERSION_MAJOR" = 2 && expr "$LD_VERSION_MINOR" \>= 13 > /dev/null; then
+    LD_OK="ok"
+  fi
+fi
+if test "x$LD_OK" != x; then
+  AC_MSG_RESULT([yes; major=$LD_VERSION_MAJOR, minor=$LD_VERSION_MINOR])
+else
+  AC_MSG_RESULT([no; major=$LD_VERSION_MAJOR, minor=$LD_VERSION_MINOR])
+  AC_MSG_WARN([ld <2.13 detected; enabling JV_LINKER_CANNOT_8BYTE_ALIGN_STATICS hack...])
+  AC_DEFINE(JV_LINKER_CANNOT_8BYTE_ALIGN_STATICS, 1,
+            [Indicate that linker is not able to 8-byte align static data])
+fi[]dnl
+])# CHECK_FOR_BROKEN_MINGW_LD


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