This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: C++ exception problems in mingw cross compiler


On 19 September 2006 15:13, toralf@procaptura.com wrote:

>>> Unfortunately, I don't quite get a working setup with this, as the SJLJ
>>> exception code isn't correctly built. The problem appears to be that
>>> certain routines are compiled only if "__USING_SJLJ_EXCEPTIONS__" is
>>> set, which it isn't. And I can't figure out how it's supposed to get
>>> defined. "configure" does not define this macro - only (optionally)
>>> "CONFIG_SJLJ_EXCEPTIONS". (*Sigh*. Is it really necessary to make the
>>> build setup so complex?) 
>>> 
>>> Help?

>>   It should get defined if you used "--enable-sjlj-exceptions" on your
>> configure commandline IIUIC. 
>> 
> Apparently it's not quite as simple as that, but I've figured it all out
> now. It depends on what configure commandline you are talking about,

  The top level configure commandline.

> actually, as it turns out that parts of the build rely on macros that
> are automatically defined by the preprocessor based on the choice of
> exception type. This means that the compiler you are using for the
> build, as opposed to the compiler you are building, must be configured
> via "--enable-sjlj-exceptions". Maybe the build compiler is expected to
> be an "internal" one based on the same configure, but it isn't in my
> setup; I'm using a two-stage approach where a "minimal" compiler is
> built first, and used to compile a "full" compiler as well as the C lib
> (I'm not sure if this is necessary any more, but let's not discuss that
> right now), and it's the "minimal" compiler that's used to compile the
> important files. Fortunately, I can easily reconfigure this compiler,
> and now I have, and it works.

  Yes, the "bootstrap" (as it is often described in cross-gcc terminology) aka
"minimal" compiler and the final one should *definitely* both be configured
with all the same ABI-related options.  You don't want to build one big-endian
and the other little-endian either....

  Please be more careful with your terminology, though, or we're going to get
confused.  The terms "build", "host" and "target" all have well defined
meanings.  The "build" compiler is the compiler you're using on your machine
to build the cross-compiler.

  Both of the cross-compilers you've built run on the "host", which in this
case happens to be the same machine as the build machine, but it needn't be -
cf. "Canadian cross".

  If you refer to "the build compiler", people will think you are referring to
your native compiler, and that absolutely shouldn't have to have the same
configuration options as needed for the target!  But yes, you do need the same
configure options for the minimal and full compilers; only things like the
--with-headers/--with-libs/--with-newlib flags should have changed between
them, according to the precise details of your cross-build procedure.


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


--
For unsubscribe information see http://sourceware.org/lists.html#faq


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