This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[libjava PATCH] Fix Tru64 bootstrap failure in libjava
- From: Roger Sayle <roger at eyesopen dot com>
- To: gcc-patches at gcc dot gnu dot org, <java-patches at gcc dot gnu dot org>
- Cc: Alexandre Oliva <aoliva at redhat dot com>
- Date: Fri, 4 Mar 2005 16:56:39 -0700 (MST)
- Subject: [libjava PATCH] Fix Tru64 bootstrap failure in libjava
Many thanks for Alex for providing the vital clue on IRC on how to fix
the current bootstrap failure on alphaev67-dec-osf5.1. The problem is
that on Tru64 we fail to link libgcj_convenenience.la with the following
error.
make[1]: execvp: /usr/local/bin/bash: Arg list too long
make[1]: *** [libgcj0_convenience.la] Error 127
make[1]: Leaving directory
`/home/roger/GCC/clean/alphaev67-dec-osf5.1/libjava'
make: *** [all-recursive] Error 1
The cause is that the list of object files is too long to be passed on
the command line on the HP/Compaq's Tru64. Thanks again to Alexandre
for pointing out that the safe-guards against command line overflow
that are used when building libgcj.la aren't/weren't duplicated in the
rule for libgcj0_convenience.la when that sublibrary was introduced.
The patch below simply copies the appropriate logic for creating a file
of object filenames from the libgcj.la rule.
The following patch has been tested with a full bootstrap, including
java, on both i686-pc-linux-gnu and alphaev67-dec-osf5.1, where it
continues to build without problems on the former, and fixes the build
failure on the latter.
Ok for mainline?
2005-03-04 Roger Sayle <roger@eyesopen.com>
Alexandre Oliva <aoliva@redhat.com>
* Makefile.am (libgcj0_convenience.la): New rule to create a file
of the object files to link to avoid exceeding the command line
length limits on some platforms.
* Makefile.in: Regenerate.
Index: Makefile.am
===================================================================
RCS file: /cvs/gcc/gcc/libjava/Makefile.am,v
retrieving revision 1.455
diff -c -3 -p -r1.455 Makefile.am
*** Makefile.am 23 Feb 2005 08:33:21 -0000 1.455
--- Makefile.am 4 Mar 2005 01:55:38 -0000
*************** libgcj0_convenience_la_SOURCES = prims.c
*** 226,231 ****
--- 226,234 ----
$(POSIX_PLATFORM_SRC) $(WIN32_PLATFORM_SRC) $(ECOS_PLATFORM_SRC) \
$(DARWIN_CRT_SRC) \
$(POSIX_THREAD_SRC) $(WIN32_THREAD_SRC) $(NO_THREAD_SRC)
+ libgcj0_convenience_la_LDFLAGS =
+ libgcj0_convenience_la_LIBADD =
+ libgcj0_convenience_la_LINK = $(LIBLINK)
noinst_LTLIBRARIES = libgcj0_convenience.la
libgcj_la_SOURCES =
*************** libgcj.la: $(libgcj_la_OBJECTS) $(libgcj
*** 611,616 ****
--- 614,629 ----
$(libgcj_la_LIBADD) \
-rpath $(toolexeclibdir) $(libgcj_la_LDFLAGS) $(LIBS)
+ ## Pass the list of object files to libtool in a temporary file to
+ ## avoid tripping platform command line length limits.
+ libgcj0_convenience.la: $(libgcj0_convenience_la_OBJECTS) $(libgcj0_convenience_la_DEPENDENCIES)
+ @echo Creating list of files to link...
+ @: $(call write_entries_to_file,$(libgcj0_convenience_la_OBJECTS),libgcj0_convenience.objectlist)
+ $(libgcj0_convenience_la_LINK) \
+ -objectlist libgcj0_convenience.objectlist \
+ $(libgcj0_convenience_la_LIBADD) \
+ -rpath $(toolexeclibdir) $(libgcj0_convenience_la_LDFLAGS) $(LIBS)
+
lib-gnu-awt-xlib.la: $(lib_gnu_awt_xlib_la_OBJECTS) $(lib_gnu_awt_xlib_la_DEPENDENCIES)
@echo Creating list of files to link...
@: $(call write_entries_to_file,$(lib_gnu_awt_xlib_la_OBJECTS) $(lib_gnu_awt_xlib_la_LIBADD),lib_gnu_awt_xlib.objectlist)
Roger
--
Roger Sayle, E-mail: roger@eyesopen.com
OpenEye Scientific Software, WWW: http://www.eyesopen.com/
Suite 1107, 3600 Cerrillos Road, Tel: (+1) 505-473-7385
Santa Fe, New Mexico, 87507. Fax: (+1) 505-473-0833