diff options
author | Costas Argyris <costas.argyris@gmail.com> | 2023-02-28 17:10:18 +0000 |
---|---|---|
committer | Jonathan Yong <10walls@gmail.com> | 2023-03-09 15:00:33 +0000 |
commit | d11e088210a551235d3937f867ee1c8b19d02290 (patch) | |
tree | b584729165b32ba4c2ecedc006446fa42c29048c /gcc/config.host | |
parent | a6457974a1f443ab58d2334c02260299616c78b8 (diff) | |
download | gcc-d11e088210a551235d3937f867ee1c8b19d02290.zip gcc-d11e088210a551235d3937f867ee1c8b19d02290.tar.gz gcc-d11e088210a551235d3937f867ee1c8b19d02290.tar.bz2 |
Enable UTF-8 code page on Windows 64-bit host [PR108865]
Compile a resource object that contains the utf8 manifest.
Then link that object into the driver and compiler proper.
For compiler proper the link has to be forced because the
resource object file gets into a static library (libbackend.a)
and gets eventually dropped because it has no symbols of
its own and nothing is referencing it inside the library.
Therefore, an artificial symbol is planted to force the link.
gcc/ChangeLog:
PR driver/108865
* config.host: add object for x86_64-*-mingw*.
* config/i386/sym-mingw32.cc: dummy file to attach
symbol.
* config/i386/utf8-mingw32.rc: windres resource file.
* config/i386/winnt-utf8.manifest: XML manifest to
enable UTF-8.
* config/i386/x-mingw32: reference to x-mingw32-utf8.
* config/i386/x-mingw32-utf8: Makefile fragment to
embed UTF-8 manifest.
Signed-off-by: Jonathan Yong <10walls@gmail.com>
Diffstat (limited to 'gcc/config.host')
-rw-r--r-- | gcc/config.host | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/config.host b/gcc/config.host index a522c39..4abb32a 100644 --- a/gcc/config.host +++ b/gcc/config.host @@ -241,10 +241,11 @@ case ${host} in x86_64-*-mingw*) use_long_long_for_widest_fast_int=yes host_xm_file=i386/xm-mingw32.h - host_xmake_file="${host_xmake_file} i386/x-mingw32" + host_xmake_file="${host_xmake_file} i386/x-mingw32 i386/x-mingw32-utf8" host_exeext=.exe out_host_hook_obj=host-mingw32.o - host_extra_gcc_objs="${host_extra_gcc_objs} driver-mingw32.o" + host_extra_objs="${host_extra_objs} utf8-mingw32.o" + host_extra_gcc_objs="${host_extra_gcc_objs} driver-mingw32.o utf8rc-mingw32.o" host_lto_plugin_soname=liblto_plugin.dll ;; aarch64*-*-darwin*) |