summaryrefslogtreecommitdiff
path: root/libjava/mingwld.m4
diff options
context:
space:
mode:
authorupstream source tree <ports@midipix.org>2015-03-15 20:14:05 -0400
committerupstream source tree <ports@midipix.org>2015-03-15 20:14:05 -0400
commit554fd8c5195424bdbcabf5de30fdc183aba391bd (patch)
tree976dc5ab7fddf506dadce60ae936f43f58787092 /libjava/mingwld.m4
downloadcbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.bz2
cbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.xz
obtained gcc-4.6.4.tar.bz2 from upstream website;upstream
verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository.
Diffstat (limited to 'libjava/mingwld.m4')
-rw-r--r--libjava/mingwld.m422
1 files changed, 22 insertions, 0 deletions
diff --git a/libjava/mingwld.m4 b/libjava/mingwld.m4
new file mode 100644
index 000000000..940679886
--- /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])