From 8f609f414888fd0d20488460e8857ff5e095ab9f Mon Sep 17 00:00:00 2001 From: kcook Date: Mon, 22 Aug 2005 22:36:35 +0000 Subject: 2005-08-22 Kelley Cook * Makefile.am (ACLOCAL_AMFLAGS): Also include "..". * acinclude.m4: Delete. Extract CHECK_FOR_BROKEN_MINGW_LD to ... * mingwld.m4: ... this new file. * aclocal.m4, Makefile.in, gcj/Makefile.in: Regenerate. * include/Makefile.in, testsuite/Makfile.in: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@103361 138bc75d-0d04-0410-961f-82ee72b054a4 --- libjava/mingwld.m4 | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 libjava/mingwld.m4 (limited to 'libjava/mingwld.m4') diff --git a/libjava/mingwld.m4 b/libjava/mingwld.m4 new file mode 100644 index 00000000000..94067988601 --- /dev/null +++ b/libjava/mingwld.m4 @@ -0,0 +1,22 @@ +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]) -- cgit v1.2.3