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]

[libgcj] Patch to make libgcj work with autoreconf again


After the classpath merge, autoreconf seems to have been broken for libjava.

One is because of a missing line in the classpath automake, the other is due to the fragility of a hack designed to avoid copying libtool.m4 that is no longer necessary.

This simple patch fixes the latter problem by breaking out CHECK_FOR_BROKEN_MINGW_LD into its own file, deletes acinclude.m4, and tells aclocal to look in the toplevel path for libtool.m4.

Before and after these patches, the generated configure is identical and the generated Makefile.ins are the effectively the same. Obviously the binaries are the same.

OK to install?
2005-08-19  Kelley Cook  <kcook@gcc.gnu.org>

	* 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.

diff -prdNu -x '*~' -x autom4te.cache /home/kcook34/gcc-orig/libjava/Makefile.am ./Makefile.am
--- /home/kcook34/gcc-orig/libjava/Makefile.am	2005-08-19 01:13:48.000000000 -0400
+++ ./Makefile.am	2005-08-19 15:00:21.800629300 -0400
@@ -2,7 +2,7 @@
 
 AUTOMAKE_OPTIONS = foreign subdir-objects
 
-ACLOCAL_AMFLAGS = -I . -I ../config
+ACLOCAL_AMFLAGS = -I . -I .. -I ../config
 
 # May be used by various substitution variables.
 gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
diff -prdNu -x '*~' -x autom4te.cache /home/kcook34/gcc-orig/libjava/mingwld.m4 ./mingwld.m4
--- /home/kcook34/gcc-orig/libjava/mingwld.m4	1969-12-31 19:00:00.000000000 -0500
+++ ./mingwld.m4	2005-08-19 14:59:26.542825500 -0400
@@ -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])

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