Re: gcj broken on darwin

Jack Howarth <[email protected]>
Newsgroups gmane.comp.gcc.java.devel,gmane.comp.gcc.devel
Message-ID <[email protected]>
Matthias,
   My mistake. I see the same issue with gcc-4.2.2 on darwin
which is indeed resolved with --main=testme. I am puzzled why
this isn't automatically handled (as it seems to be with
javac)?
              Jack

On Wed, Mar 19, 2008 at 02:56:40PM +0100, Matthias Klose wrote:
> Andrew Haley schrieb:
> > Jack Howarth wrote:
> >>    It appears that gcj in gcc 4.3.0 is broken on Darwin. If
> >> one builds gcc 4.3.0 executing...
> >>
> >> contrib/download_ecj
> >>
> >> before running configure, the build succeeds in creating an
> >> ecj1 but when gcj is used to compile an example like testme.java...
> >>
> >> public class testme {
> >>   public static void main(String args[]){
> >>     System.out.println("Hello");
> >>   }
> >> }
> >>
> >> the command fails with the error...
> >>
> >> gcj testme.java
> >> Undefined symbols:
> >>   "_main", referenced from:
> >>       start in crt1.10.5.o
> >> ld: symbol(s) not found
> >> collect2: ld returned 1 exit status
> >>
> >> Any idea how to work around this?
> > 
> > It might be worth building the 4.3 branch, not 4.3.0.
> > 
> > Andrew.
> 
> isn't this just a missing --main=testme option?
> 
>   Matthias
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.