[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problem with FS
- Date: Tue, 16 Jan 2007 09:19:25 -0600
- From: joel.sherrill at oarcorp.com (Joel Sherrill)
- Subject: Problem with FS
Leon Pollak wrote:
> Hello, all.
>
> The RTEMS source code has many constants declared as enumerations.
> Recently I had the following problem:
>
> I add to the application compilation call flag for the gcc: - fshort-enums.
> This flag makes all enums to be 8bits instead of 32bits as default. this leads
> to the configuration tables in init task creation with 1 byte, while
> libraries still thought about 4 bytes.
> I need this because gcc-3.x does not allow to declare enums with
> __attribute__((packed)), only version 4.
I think this is just another case of where all libraries and the
application have to
match their use of certain flags. Other examples include the mips -Gn
flag, the
x86 and m68k -mrtd flag, and various CPUs with ABI selection flags.
You would have to make sure newlib, RTEMS, libstdc++, etc are all compiled
with matching flags.
> And I (and rtems, even 4.7, yes?)
> still use 3.1.
>
>
The rtems 4.7 gcc is 4.1.1. :-)
> I think that this situation (which took me 2 days) may be rather common. May
> be something can be done to protect rtems code from such things? Or user?
>
> Any thoughts?
>
> Thanks.
>