Possible to reduce or disable locales?
Jonathan Wakely
jwakely.gcc@gmail.com
Fri Jun 19 06:57:24 GMT 2020
On Fri, 19 Jun 2020 at 02:06, Stephen Casner <casner@acm.org> wrote:
>
> I am working on implementing ELF format for the PDP11 in gcc and
> binutils so that C++ code can be compiled. You may dismiss this as
> folly, but there is a sizable retro computing community interested in
> the PDP11. Clearly there will be a limit on how much code can be
> squeezed into the 16-bit address space, so some language and library
> features just won't be usable.
>
> I have this working to the extent that I was able to compile and run a
> small test program demonstrating virtual function calls. To do this
> required a couple of hacks, one of which was to disable the error in
> gas when the relocation offset exceeded the address size. That occurs
> for the following files:
>
> 1000c ./libstdc++-v3/src/c++11/cxx11-wlocale-inst.o
> 10058 ./msoft-float/libstdc++-v3/src/c++11/cxx11-wlocale-inst.o
> 10f1a ./libstdc++-v3/src/c++11/cxx11-locale-inst.o
> 10f66 ./msoft-float/libstdc++-v3/src/c++11/cxx11-locale-inst.o
> 15140 ./libstdc++-v3/src/c++11/locale-inst.o
> 151aa ./libstdc++-v3/src/c++11/wlocale-inst.o
> 152ac ./msoft-float/libstdc++-v3/src/c++11/locale-inst.o
> 15300 ./msoft-float/libstdc++-v3/src/c++11/wlocale-inst.o
You can reduce those with --disable-wchar_t
--disable-libstdcxx-dual-abi but not get rid of locale-handling code
completely.
> Is there a way to adjust the configuration to disable locales or maybe
> to restrict to just the C locale?
The actual locale data lives in the C library anyway. Libstdc++
doesn't have any locales defined in it, not even the C locale. What it
has is code for dealing with the locale as defined by the C library.
More information about the Libstdc++
mailing list