[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: G++ 3.2


The reason for the linking problem was a libc.so in the target directory
tree which is a script and mentioned explicitly libc.s0.6 from the
former 2.96 cris-dist tree. Here is the content of that file:

>more ./target/cris-axis-linux-gnu/lib/libc.so

/* GNU ld script
   Use the shared library, but some functions are only in
   the static library, so try that secondarily.  */
GROUP ( /usr/local/cris/lib/gcc-lib/cris/2.96/linux/libc.so.6
/usr/local/cris/lib/gcc-lib/cris/2.96/linux/libc_nonshared.a )

That's probably because the whole target tree was build with 2.96 and it
needs (probably) to be build with 3.2.1.

I think I'll stay with 2.96 until there is a devboard_lx development
tree compatible with 3.2.1. I found a workaround for the
incompatibilities between 3.2 and 2.96 in my sources. It was a matter of
defining replacements for numeric_limits<typename>::...

Is it planned to release a new devboard_lx tree for 3.2.1?

Thanks for taking my problem in consideration. 

Kind regards.

Johan Neven.

On Mon, 2003-12-01 at 17:31, Hans-Peter Nilsson wrote:
> > From: Johan Neven <johan.neven@xxxxxxx.be>
> > Date: Mon, 01 Dec 2003 16:47:20 +0100
> > I have tried to compile the sources (giving errors with 2.96) for my
> > devboard_lx with the new 3.2.1. The compilation was OK but the linker is
> > still looking for libs in the old 2.96 directory. 
> I forgot to mention that you need to recompile all C++ objects.
> Other than that, I believe I need your help to get logs and a
> detailed description to reproduce the problem you see, because
> from that description alone I don't understand it.  It's not
> possible that the linker is "still looking for libs in the old
> 2.96 directory" when linking C++ using cris-dist-1.54.  Are you
> perhaps keeping cris-dist-1.25 installed somewhere, and somehow
> trying to use it for linking only?
> > But after I did this try-out, I saw the messages saying it's not
> > devboard_lx compatible.
> Correct.  Sorry.
> > It would be nice to have it also for devboard_lx
> > but is this physically possible with the much bigger libstdc++.so and
> > probably other things?
> It is; you're not forced to include libstdc++.so and libm.so;
> you can link some libraries (libstdc++) statically and others
> (libc) dynamically, which is useful if you only have one or two
> C++ applications.
> If all else worked, I'd suggest you link with "gcc-cris -mlinux"
> (instead of g++-cris -mlinux) and with
> "-Wl,-Bstatic,-lstdc++,-lm,-Bdynamic" which would link *only*
> the standard C++ library and math (if necessary) libraries
> statically.  For example, the program:
> #include <iostream>
> int main ()
> {
>   std::cout << "Hello, world!\n" << std::endl;
> }
> can be compiled and linked with
> "gcc-cris -mlinux -o hello hello.cc -Wl,-Bstatic,-lstdc++,-Bdynamic"
> to not need libstdc++.so.
> brgds, H-P
Johan Neven <johan.neven@xxxxxxx.be>