[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: image too big...
> From: "Ujwal S. Sathyam" <email@example.com>
> Date: 29 Jun 2001 11:36:12 -0700
> > Link libm statically for that particular app so it isn't
> > included in whole as a generic dynamic library. Perhaps adding
> > "-Wl,-Bstatic,-lm,-Bdynamic" to LDFLAGS or something similar;
> > maybe just in the makefile for that application, will work for
> > you.
> Nope, that did not work. I am OK without the math support. It just would
> have been nice to have it.
It should work; I don't why it doesn't if this is plain C.
Please help me repeat your problem so I can help you, by sending
the exact commands you issued as a transcript. This works for
extern double in;
res = sqrt (in);
double in = 7.0;
gcc-cris -mlinux -o s sq.c -Wl,-Bstatic,-lm,-Bdynamic
If it's C++, things are a bit trickier, as -lm is also issued
"outside" -Wl,-Bstatic,-lm,-Bdynamic and libm.so then gets
precedence when looking up libs. Fix by linking the
corresponding sq.cc (sq.o) using gcc-cris instead of g++-cris,
gcc-cris -mlinux -o s2 sq.cc -Wl,-Bstatic,-lm,-Bdynamic -lstdc++