This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
"Scalability" Issues with the libgcj Makefile
- From: Ranjit Mathew <rmathew at hotmail dot com>
- To: java at gcc dot gnu dot org
- Date: Mon, 26 Aug 2002 14:34:21 +0530
- Subject: "Scalability" Issues with the libgcj Makefile
- Newsgroups: gmane.comp.gcc.java.devel
Hi,
I'm (still) trying to build GCJ (GCC 3.2) with
MinGW/MSYS on Windows and some of the more troublesome
errors have been related to the "scalability" of the
libgcj Makefile, considering the fact that it has so
may object files (989 Java objects without the AWT classes!)
to deal with.
Allow me to explain.
In a previous post, I had mentioned that the MSYS make
was crashing ("stackdumping") on me. After a bit of
fiddling around, I found it to be a result of this bit
in the Makefile:
@: $(shell echo Creating list of files to link...) $(shell rm -f libgcj
.objectlist || :) $(shell touch libgcj.objectlist) $(foreach
object,$(libgcj_la
_OBJECTS) $(libgcj_la_LIBADD),$(shell echo $(object) >> libgcj.objectlist))
Replacing it with the equivalent (for the moment):
$(shell rm -f libgcj.objectlist)
$(shell touch libgcj.objectlist)
echo $(libgcj_la_OBJECTS) >>libgcj.objectlist
echo $(libgcj_la_LIBADD) >>libgcj.objectlist
"fixes" the problem (though it is not necessarily a neat solution).
From the GNU Make manual:
"The shell function performs the same function that backquotes (``')
perform in most shells: it does command expansion. This means that it
takes an argument that is a shell command and returns the output of the
command."
The MSYS make is therefore trying to expand the output of
all those $(shell ) invocations and adding them up to produce
the final output, even though the libgcj build process is
not at all interested in it. Unfortunately, it dies out in
the process (no pun intended).
Another issue (for me) was the actual creation of the libgcj
library, invoked by this bit in the Makefile:
$(libgcj_la_LINK) -objectlist libgcj.objectlist \
../boehm-gc/libgcjgc_convenience.la
../libffi/libffi_convenience.la ../
zlib/libzgcj_convenience.la \
-rpath $(toolexeclibdir) $(libgcj_la_LDFLAGS) $(LIBS)
Once again, this results in a call to 'ar' with a command
line that comprises not only the 989 classes I mentioned
earlier, but the additional object files from boehm-gc,
libffi, etc. as well. As a result, 'ar' also dies out
with a pitiful "Invalid Argument" error (I have tried it
out with fewer arguments, and therefore fewer object
files, and it does work).
Again, since 'ar' is additive, we can break the process
into more manageable chunks, "growing" the library till
it has everything we need.
Sincerely Yours,
Ranjit.