This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [build] Move MD_UNWIND_SUPPORT to toplevel libgcc
- From: Kai Tietz <ktietz70 at googlemail dot com>
- To: Paolo Bonzini <bonzini at gnu dot org>
- Cc: Kai Tietz <ktietz at redhat dot com>, Rainer Orth <ro at cebitec dot uni-bielefeld dot de>, "Joseph S. Myers" <joseph at codesourcery dot com>, Ralf Wildenhues <Ralf dot Wildenhues at gmx dot de>, Douglas Rupp <rupp at gnat dot com>, Tristan Gingold <gingold at adacore dot com>, John David Anglin <dave dot anglin at nrc-cnrc dot gc dot ca>, Steve Ellcey <sje at cup dot hp dot com>, Dave Korn <dave dot korn dot cygwin at gmail dot com>, Mike Stump <mikestump at comcast dot net>, gcc-patches at gcc dot gnu dot org
- Date: Tue, 31 May 2011 11:30:21 +0200
- Subject: Re: [build] Move MD_UNWIND_SUPPORT to toplevel libgcc
- References: <1021155042.308911.1306778047584.JavaMail.root@zmail06.collab.prod.int.phx2.redhat.com> <4DE4AEA2.6010507@gnu.org>
2011/5/31 Paolo Bonzini <bonzini@gnu.org>:
> On 05/30/2011 07:54 PM, Kai Tietz wrote:
>>
>> > -/* For 64-bit Windows we can't use DW2 unwind info. Also for multilib
>> > - ? builds we can't use it, too. ?*/
>> > -#if !TARGET_64BIT_DEFAULT&& ?!defined (TARGET_BI_ARCH)
>> > -#define MD_UNWIND_SUPPORT "config/i386/w32-unwind.h"
>> > -#endif
>> > -
>> > ? /* This matches SHLIB_SONAME and SHLIB_SOVERSION in t-cygming. */
>> > ? /* This matches SHLIB_SONAME and SHLIB_SOVERSION in t-cygwin. */
>> > ? #if DWARF2_UNWIND_INFO
>>
>> mingw part is not ok, as it breaks 32-bit defaulted multilib version
>> compiler.
>
> Can you explain what is going on here? ?Could it be fixed by wrapping
> w32-unwind.h in a #ifdef __x86_64__?
To wrap it into __x86_64__ won't help. The issue is that in
combination of 32-bit and 64-bit we need to default here to SjLj, as
64-bit doesn't support dw2 unwinding stuff and uses here internally
instead SEH. So if target is 32-bit default, but a multilib version is
used, we can't use w32-unwind.h.
The line of interest is "#if !TARGET_64BIT_DEFAULT && !defined
(TARGET_BI_ARCH)", which says: if target is 64-bit then don't use
w32-unwind.h. if we are building for multilib then don't use
w32-unwind.h.
Well, wrapping header with __x64_64__ might helper partial. . But this
might be worth a try. Nevertheless I assume that then at least
produced DLL names for libgcc could get confused for their extensions.
Rainer: It would be helpful, if you could try this.
> Rainer, the same solution that is found for Windows should be used for
> darwin, too.
>
> Paolo