This is the mail archive of the
mailing list for the newlib project.
Re: Use of -fshort-enums for certain files
- From: Michael Bruck <bruck dot michael at gmail dot com>
- To: newlib at sourceware dot org
- Date: Wed, 3 Apr 2013 00:31:01 +0200
- Subject: Re: Use of -fshort-enums for certain files
- References: <CACsVSN+8kamLEUmxw7yCmOo7yE1c9Rg4OcR5M=uVO0XxY-PKRg at mail dot gmail dot com> <20130402113927 dot GB32544 at calimero dot vinschen dot de>
The flag is probably not needed. When it was introduced the file used
some large lookup tables that benefited from this:
Modifying the ABI on a file-by-file basis in a library seems to be
asking for trouble and the original rationale for using the flag is
gone. Risk with no reward, I recommend deleting the flags entirely.
On Tue, Apr 2, 2013 at 1:39 PM, Corinna Vinschen <firstname.lastname@example.org> wrote:
> On Mar 31 00:53, Michael Bruck wrote:
>> libc/stdio/Makefile.in uses "-fshort-enums" for several files.
>> This causes problems with ARM targets that have this option disabled
>> by default. On ARM the enum format is stored as flag in the elf file
>> and the linker notes the discrepancy. So even if this hard-coded flag
>> is purely internal in these library files and affects no external
>> interfaces it still causes errors when linked with other objects.
> Patches to make usage of this flag a configure option are welcome.
> Corinna Vinschen
> Cygwin Maintainer
> Red Hat