This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Does gcj pass -dy and -dn to linker?


On Tue, 30 Oct 2001, Bryce McKinlay wrote:

> Bill Bland wrote:
> 
> >I want to link some libraries statically and others dynamically.  The way
> >to do this is to use the -dy and -dn flags, which affect any -l... that
> >follow them so you can do:
> >
> >ld -dy -ldynamiclib -dn -lstaticlib -dy -lalsodynamiclib
> >
> >What I need to know is: does gcj pass these flags correctly to the linker?
> >
> 
> I have not heard of those flags before. My GCC man page says that the 
> -d* are for various kinds of debugging dumps. I think what you want is 
> "-Wl,-Bstatic" and "-Wl,-Bdynamic"? Hint: Use "gcj -v" to see exactly 
> what commands gcj is passing to the linker.

"info ld" says that -dy and -Bdynamic, and -dn and -Bstatic are aliases.
Your versions work though - thanks! (I think it was the "-Wl," that made
the difference).

> What makes you think its fltk that is crashing? gcj < 3.0.2 has a nasty 
> bug which can cause it to abort instead of giving you a stack trace, 
> maybe for a ClassNotFoundException?

It wasn't fltk causing the problem after all (btw, my gcj == 3.0.2).
I was doing a Class.forName, which as you pointed out would cause problems
when libgcj was linked statically.  I now have all libraries apart from
libgcj linked statically and it works great.
Thanks again for your help.

Best wishes,
		Bill.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]