This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: [PATCH 1/6] generated character data for libc/ctype
On Tue, Mar 13, 2018 at 11:21 AM, Can Finner <can.finner@gmail.com> wrote:
> On Tue, Mar 13, 2018 at 10:40 AM, Corinna Vinschen <vinschen@redhat.com> wrote:
>> On Mar 13 10:33, Can Finner wrote:
>>> On Mon, Mar 12, 2018 at 10:42 AM, Corinna Vinschen <vinschen@redhat.com> wrote:
>>> > On Mar 8 00:18, Thomas Wolff wrote:
>>> >> Makefile add-ons for both patch series (libc/string and libc/ctype) will be
>>> >> sent separately.
>>> >
>>> >> From 4cd871bea1c6cf677d57587a7e844bb9cb3b19be Mon Sep 17 00:00:00 2001
>>> >> From: Thomas Wolff <towo@towo.net>
>>> >> Date: Sun, 25 Feb 2018 16:29:33 +0100
>>> >> Subject: [PATCH 1/6] generated case conversion data, Unicode 10.0
>>> >> [...]
>>> >
>>> > Patchset pushed. I just squashed the makefile patch into the previous
>>> > patch to avoid a repository state not building.
>>> Hi,
>>> This patch breaks arm-none-eabi cross toolchain build with below error message:
>>>
>>> /data/.../obj/gcc1/gcc/xgcc -B/data/.../obj/gcc1/gcc/
>>> -B/data/.../obj/newlib/arm-none-eabi/thumb/newlib/ -isystem
>>> /data/.../obj/newlib/arm-none-eabi/thumb/newlib/targ-include -isystem
>>> /data/.../newlib-cygwin/newlib/libc/include
>>> -B/data/.../obj/newlib/arm-none-eabi/thumb/libgloss/arm
>>> -L/data/.../obj/newlib/arm-none-eabi/thumb/libgloss/libnosys
>>> -L/data/.../newlib-cygwin/libgloss/arm -mthumb
>>> -DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\"
>>> -DPACKAGE_VERSION=\"3.0.0\" -DPACKAGE_STRING=\"newlib\ 3.0.0\"
>>> -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I.
>>> -I/data/.../newlib-cygwin/newlib/libc/ctype -D__NO_SYSCALLS__
>>> -D_COMPILING_NEWLIB -fno-builtin -g -ffunction-sections
>>> -fdata-sections -O2 -mthumb -c -o lib_a-categories.o `test -f
>>> 'categories.c' || echo
>>> '/data/.../newlib-cygwin/newlib/libc/ctype/'`categories.c
>>> /data/.../newlib-cygwin/newlib/libc/ctype/categories.c:5:17: error:
>>> width of 'cat' exceeds its type
>>> enum category cat: 11;
>>> ^~~
>>
>> I don't understand this error. Why is an enum < 11 bits?!?
> To be honest, I don't either. Will collect more information about this.
So it looks like arm ABI requires -fshort-enums for bare-metal
toolchain, which will pack enum type into small int-type.
In this case, the enum category as below has fewer than 256 entries in
call cases?
enum category {
#include "categories.cat"
};
If so, can we change it into below? If not, is there any macro can be
used to differentiate situations?
struct _category {
enum category cat: 8;
unsigned int first: 24;
unsigned short delta;
} __attribute__((packed));
Another choice would be adding a last entry with value larger than 255
in the enum.
Any suggestions?
Thanks,
bin
>
> Thanks,
> bin
>>
>>
>> Corinna
>>
>> --
>> Corinna Vinschen
>> Cygwin Maintainer
>> Red Hat
>
>
>
> --
> Regards.
--
Regards.