Anmin via newlib
2018-08-30 12:30:28 UTC
From: Jaap de Wolff <info at jasoon dot nl>
Date: Fri, 16 Feb 2018 19:46:28 +0100
...
From: Corinna Vinschen <vinschen at redhat dot com>Date: Fri, 16 Feb 2018 19:46:28 +0100
...
Date: Mon, 19 Feb 2018 13:14:04 +0100
...I'd like to ask: Do you *really* want to get rid of __global_locale,
or are you just unhappy in terms of its size? Note that I didn't
add any extra locale info to targets not defining __HAVE_LOCALE_INFO__....
I'm using newlib-3.0.0 on an arm-none-eabi target
to build a very simple project (my/project/objs/str.o) with referring to <ctype.h>.
The linker map file says the objects are loaded because...
...
/opt/tool-chain/lib/gcc/arm-none-eabi/7.3.0/../../../../arm-none-eabi/lib/thumb/v8-m.main/libc.a(lib_a-locale.o)
../my/project/objs/str.o (__locale_ctype_ptr)
/opt/tool-chain/lib/gcc/arm-none-eabi/7.3.0/../../../../arm-none-eabi/lib/thumb/v8-m.main/libc.a(lib_a-mbtowc_r.o)
/opt/tool-chain/lib/gcc/arm-none-eabi/7.3.0/../../../../arm-none-eabi/lib/thumb/v8-m.main/libc.a(lib_a-locale.o) (__ascii_mbtowc)
...
/opt/tool-chain/lib/gcc/arm-none-eabi/7.3.0/../../../../arm-none-eabi/lib/thumb/v8-m.main/libc.a(lib_a-wctomb_r.o)
/opt/tool-chain/lib/gcc/arm-none-eabi/7.3.0/../../../../arm-none-eabi/lib/thumb/v8-m.main/libc.a(lib_a-locale.o) (__ascii_wctomb)
/opt/tool-chain/lib/gcc/arm-none-eabi/7.3.0/../../../../arm-none-eabi/lib/thumb/v8-m.main/libc.a(lib_a-ctype_.o)
/opt/tool-chain/lib/gcc/arm-none-eabi/7.3.0/../../../../arm-none-eabi/lib/thumb/v8-m.main/libc.a(lib_a-locale.o) (_ctype_)
...
<
The very same project built to link with an old newlib have linked map file as
(supposedly an array of "ctype" property bitmaps)
...
/opt/tool-chain/lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/lib/fpu/libc.a(lib_a-ctype_.o)
../my/project/objs/str.o (__ctype_ptr__)
...
<
Is there any way, such as using "configure" options or defines while building newlib, or defining some macros when building project, to make my small and simple project (with "C" locale) not to link with those "locale" objects?
Thanks.
Best Regards,
Anmin Deng