This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: gcj problem with -static option
David Daney writes:
> Andrew Haley wrote:
> > David Daney writes:
> > > Andrew Haley wrote:
> > > > Diego Novillo writes:
> > > > > On 03/16/06 12:27, FERANDELLE Pascal wrote:
> > > > >
> > > > > > I rebuild everything with GCC 4.1.0 version on PC running RedHat EL 3.0.
> > > > > > My simple HelloWorld program is still "segfaulting" when compiled with the -static option.
> > > > > > But the trace under gdb has changed; I have now :
> > > > > >
> > > > > This may or may not be related but we had similar looking problems with
> > > > > OpenMP programs. They were segfaulting on startup when linked statically.
> > > > >
> > > > > It apparently is a problem with weak symbols in the threading library
> > > > > not being pulled in with -static.
> > > > >
> > > > > http://gcc.gnu.org/ml/gcc/2006-03/msg00248.html
> > > >
> > > > Ooh, nasty. Thanks for that.
> > >
> > > This is why we have the gcj wiki.
> >
> > Not really, no. A user shouldn't be expected to search the wiki,
> > which should be in addition to the docs, not a substiture for them.
>
> The docs now have a link to the exact wiki page I referred to.
Well, that should help.
> > If -static can never work with gcj on GNU/Linux we should remove it as
> > an option.
>
> While I agree in principle, I think that it probably works on some
> GNU/Linux targets (although I admit I have never tried it). So I
> don't think you would want to unconditionally remove it, you might
> end up having to figure out which targets it works on and
> selectively disable it.
If it might still work somewhere, that's a good reason to leave it in.
> Also if you did it for gcj, would you also want to do it when
> -fopenmp is specified for the languages that support that option?
Well, I am not responsible for the other langauges, so no.
I'd like to get the zoo of options available to gcj users reduced to
the set that we think may have some chance of working. Certainly,
being able to suggest "don't use -static, use -static-libgcj" is an
improvement over what we had before.
Pascal, let us know if this solves your problem.
Andrew.