public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Kai Ruottu <kai.ruottu@wippies.com>
To: gcc-help@gcc.gnu.org
Subject: Re: freebsd gcc cross compiler creates binaries that crash when using c++ exceptions
Date: Mon, 16 Jan 2012 15:37:00 -0000	[thread overview]
Message-ID: <4F1401E1.4080908@wippies.com> (raw)
In-Reply-To: <B6A6EF22B0D16146BD127139E7667DDB1625D019E8@hermes.corp.yager.de>

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...

  parent reply	other threads:[~2012-01-16 10:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-12 19:22 Markus Henschel
2012-01-12 19:25 ` Andrew Haley
2012-01-12 20:06   ` Markus Henschel
2012-01-13 15:34     ` Andrew Haley
2012-01-16 10:47       ` Markus Henschel
2012-01-16 10:54         ` Andrew Haley
2012-01-16 10:59           ` Andrew Haley
2012-01-17 10:14             ` Markus Henschel
2012-01-16 15:37         ` Kai Ruottu [this message]
2012-01-18  7:34           ` Markus Henschel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F1401E1.4080908@wippies.com \
    --to=kai.ruottu@wippies.com \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).