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


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: ARM-only [Patch] Allow 4 byte enum size (-fno-short-enums) | Remove hard coded short enum flag from the build scripts?


On Aug 28 16:31, Dennis Pahl wrote:
> Hi,
> 
> in my project I need the enum size to be 4 bytes. Therefore in order to get
> no linker compatibility warnings, I also require newlib to use 4 bytes for
> its enums.
> 
> 4 byte enums can be achieved by specifying the following compiler flag
> "-fno-short-enums". This flag works fine for the source code of my project.
> Newlib, however, has a problem with this flag due to some hard coded
> compiler invocations which include the opposite flag "-fshort-enums".
> 
> A look in the mailing list archive revealed, that there already has been a
> discussion about this problem
> (https://sourceware.org/ml/newlib/2013/msg00183.html). The final advice from
> Michael Bruck, who started the discussion, was to remove these hard coded
> flags entirely from the build script files. Is there a reason why this did
> not happen?
> 
> With the removed hard coded flags the enum size can be configured by
> specifying
> CFLAGS_FOR_TARGET= '-fno-short-enums' or '-fshort-enums'
> CXXFLAGS_FOR_TARGET='-fno-short-enums' or '-fshort-enums'
> 
> By following Michael Bruck's advice I was able to build newlib with the
> wanted enum size.

The patch is ok with me, what do other user's of ARM think?


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat

Attachment: signature.asc
Description: PGP signature


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