This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
RE: gcj problem compiling 850 files
- From: "Erik Poupaert" <erik dot poupaert at chello dot be>
- To: "magnus persson" <mtmmtm at yahoo dot com>
- Cc: <java at gcc dot gnu dot org>
- Date: Fri, 24 Jan 2003 14:50:24 +0100
- Subject: RE: gcj problem compiling 850 files
-----Original Message-----
From: java-owner@gcc.gnu.org [mailto:java-owner@gcc.gnu.org]On Behalf Of
Jeff Sturm
Sent: Friday 24 January 2003 14:35
To: magnus persson
Cc: java@gcc.gnu.org
Subject: Re: gcj problem compiling 850 files
On Fri, 24 Jan 2003, magnus persson wrote:
> C:\cygwin\usr\share\java\libgcj-3.2.jar:.
> com/mindark/*.class com/mindark/script/*.class
> -LC:\cygwin\lib\w32api
>>>> As others have said, this is a limitation of Cygwin, not gcj. You
might
>>>> also try the `@file' argument syntax, for which the named file contains
a
>>>> whitespace-delimited list of java sources to compile.
The problem is related to the fact that the lpCommandLine argument in the
win32 CreateProcess() is limited to 32Kb. Therefore, you can never have a
commandline invokation that exceeds 32 Kb.
Your namespaces probably consist of several sub-namespaces, if you have 850
.class files:
com/mindark/*.class <--- split
com/mindark/script/*.class <--- split
My advice is to use the ar utility to group the .o files for each
sub-namespace into their own .a files:
ar -cr archive/mynamespace.a myobject1.o myobject2.o myobject2.o ...
Make sure to limit the number of .o files to a few hundred. With Ant, you
can do the following:
<target name="archive">
<apply failonerror="true" executable="ar" parallel="true">
<fileset dir="obj/com/mindark/firstnamespace"
includes="**/*.o"/>
<arg line="-cr arc/firstnamespace.a"/>
</apply>
</target>
You will end up with a manageable number of .a files. Next, you can link all
.a files into the target required.