public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* Re: [ECOS] Mismatch between 'C' and 'C++' structures
       [not found] <200006202028.NAA03734@cygnus.com>
@ 2000-06-20 14:04 ` Jonathan Larmour
  0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Larmour @ 2000-06-20 14:04 UTC (permalink / raw)
  To: Bill Marcotte; +Cc: ecos-discuss

Bill Marcotte wrote:
> 
> I am currently working on an i960 port of ECOS.  When I build ECOS with
> Asserts enabled, I get the following message when I run the code:
> 
>    Size of C struct (cyg_mempool_var) !=
>                Size of C++ struct (Cyg_Mempool_Variable)
> 
>    sizeof(cyg_mempool_var) = 0x30
>    sizeof(Cyg_Mempool_Variable) = 0x40
> 
> Does anyone know how to resolve this?

Well the obvious question is whether you modified any of the generic kernel
code in this area.

Failing that, it would appear that the i960 g++ must pad C++ classes in
some way different to i960 gcc pads structs. Perhaps there is some compiler
switch that can be used to prevent this.

And just to check, you are compiling the kernel with -fno-rtti aren't you?

Jifl
-- 
Red Hat, 35 Cambridge Place, Cambridge, UK. CB2 1NS  Tel: +44 (1223) 728762
"Plan to be spontaneous tomorrow."  ||  These opinions are all my own fault

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ECOS] Mismatch between 'C' and 'C++' structures
@ 2000-06-22 12:34 Bill Marcotte
  0 siblings, 0 replies; 3+ messages in thread
From: Bill Marcotte @ 2000-06-22 12:34 UTC (permalink / raw)
  To: jlarmour, bill; +Cc: ecos-discuss

> > I am currently working on an i960 port of ECOS.  When I build ECOS
>  with
> > Asserts enabled, I get the following message when I run the code:
> > 
> >    Size of C struct (cyg_mempool_var) !=
> >                Size of C++ struct (Cyg_Mempool_Variable)
> > 
> >    sizeof(cyg_mempool_var) = 0x30
> >    sizeof(Cyg_Mempool_Variable) = 0x40
> > 
> > Does anyone know how to resolve this?
> 
> Well the obvious question is whether you modified any of the generic
>  kernel
> code in this area.
> 
> Failing that, it would appear that the i960 g++ must pad C++ classes in
> some way different to i960 gcc pads structs. Perhaps there is some
>  compiler
> switch that can be used to prevent this.
> 
> And just to check, you are compiling the kernel with -fno-rtti aren't
>  you?
> 

I was able to resolve this problem by compiling with the mic-compat switch.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ECOS] Mismatch between 'C' and 'C++' structures
@ 2000-06-20 13:27 Bill Marcotte
  0 siblings, 0 replies; 3+ messages in thread
From: Bill Marcotte @ 2000-06-20 13:27 UTC (permalink / raw)
  To: ecos-discuss

I am currently working on an i960 port of ECOS.  When I build ECOS with
Asserts enabled, I get the following message when I run the code:

   Size of C struct (cyg_mempool_var) != 
               Size of C++ struct (Cyg_Mempool_Variable)

   sizeof(cyg_mempool_var) = 0x30
   sizeof(Cyg_Mempool_Variable) = 0x40

Does anyone know how to resolve this?


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2000-06-22 12:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <200006202028.NAA03734@cygnus.com>
2000-06-20 14:04 ` [ECOS] Mismatch between 'C' and 'C++' structures Jonathan Larmour
2000-06-22 12:34 Bill Marcotte
  -- strict thread matches above, loose matches on Subject: below --
2000-06-20 13:27 Bill Marcotte

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