Re: freebsd gcc cross compiler creates binaries that crash when using c++ exceptions

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

 



16.1.2012 11:30, Markus Henschel kirjoitti:

So I started to build my toolchain on the target system as a native
compiler with exactly the same configure switches. This also produced
working versions of libgcc and libstdc++.

What I did so far was attaching gdb and seeing that it crashes in libgcc
> in __cxa_end_catch. I guess I'll have to build libgcc with debug symbols
> then.

There has always been and most probably still is a difference between
library configures in a native and a cross build. The library configures
may do some run tests with simple apps. The native target system of
course can run the test programs the new GCC has compiled and linked
against the target startups and the standard C library. But the cross
host as default cannot run anything made for the target system, so the
configure scripts must know or guess (right) the features the target
system has!

So generally the libgcc and libstdc++ configures should know the
features all the "supported" systems have and produce identical
results in both native and cross complile cases. Never any "run
on target" tests done in order to find out how the target system
will behave! I don't think this already being the case with not
so common targets like FreeBSD but probably Linux is so well-known
and in embedded Linux target cases the shared libgcc and libstdc++
will more often be produced via crosscompiling than natively. NetBSD
and OpenBSD may also be embedded targets but FreeBSD, Solaris2 (and
other Unices) only system targets for which the native compile is
the most common...


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux