[v3,00/12] Add aarch64-w64-mingw32 target

Message ID VI1PR83MB0431D9D41D59FC495D4E7CA0F8052@VI1PR83MB0431.EURPRD83.prod.outlook.com
Headers
Series Add aarch64-w64-mingw32 target |

Message

Evgeny Karpov April 11, 2024, 1:38 p.m. UTC
  Hello,

Thank you for reviewing v2!
v3 addresses all comments on v2.

v3 Changes:
- Exclude the aarch64_calling_abi declaration from the patch series.
- Refactor x18 adjustment for MS ABI.
- Remove unnecessary headers.
- Add an extra comment to explain empty definitions.
- Use gcc_unreachable for definitions that are needed for compilation, 
but not used by the aarch64-w64-mingw32 target.
- Retain old index entries.
- Rebase from 11th April 2024

Regards,
Evgeny


Zac Walker (12):
  Introduce aarch64-w64-mingw32 target
  aarch64: Mark x18 register as a fixed register for MS ABI
  aarch64: Add aarch64-w64-mingw32 COFF
  Reuse MinGW from i386 for AArch64
  Rename section and encoding functions from i386 which will be used in
    aarch64
  Exclude i386 functionality from aarch64 build
  aarch64: Add Cygwin and MinGW environments for AArch64
  aarch64: Add SEH to machine_function
  Rename "x86 Windows Options" to "Cygwin and MinGW Options"
  aarch64: Build and add objects for Cygwin and MinGW for AArch64
  aarch64: Add aarch64-w64-mingw32 target to libatomic
  Add aarch64-w64-mingw32 target to libgcc

 fixincludes/mkfixinc.sh                       |   3 +-
 gcc/config.gcc                                |  47 +++--
 gcc/config/aarch64/aarch64-abi-ms.h           |  34 ++++
 gcc/config/aarch64/aarch64-coff.h             |  91 +++++++++
 gcc/config/aarch64/aarch64-protos.h           |   5 +
 gcc/config/aarch64/aarch64.h                  |  13 +-
 gcc/config/aarch64/cygming.h                  | 172 ++++++++++++++++++
 gcc/config/i386/cygming.h                     |  18 +-
 gcc/config/i386/cygming.opt.urls              |  30 ---
 gcc/config/i386/i386-protos.h                 |  12 +-
 gcc/config/i386/mingw-w64.opt.urls            |   2 +-
 gcc/config/lynx.opt.urls                      |   2 +-
 gcc/config/{i386 => mingw}/cygming.opt        |   0
 gcc/config/mingw/cygming.opt.urls             |  30 +++
 gcc/config/{i386 => mingw}/cygwin-d.cc        |   0
 gcc/config/{i386 => mingw}/mingw-stdint.h     |   9 +-
 gcc/config/{i386 => mingw}/mingw.opt          |   0
 gcc/config/{i386 => mingw}/mingw.opt.urls     |   2 +-
 gcc/config/{i386 => mingw}/mingw32.h          |   4 +-
 gcc/config/{i386 => mingw}/msformat-c.cc      |   0
 gcc/config/{i386 => mingw}/t-cygming          |  23 ++-
 gcc/config/{i386 => mingw}/winnt-cxx.cc       |   0
 gcc/config/{i386 => mingw}/winnt-d.cc         |   0
 gcc/config/{i386 => mingw}/winnt-stubs.cc     |   0
 gcc/config/{i386 => mingw}/winnt.cc           |  30 +--
 gcc/doc/invoke.texi                           |  10 +
 gcc/varasm.cc                                 |   2 +-
 libatomic/configure.tgt                       |   2 +-
 libgcc/config.host                            |  23 ++-
 libgcc/config/aarch64/t-no-eh                 |   2 +
 libgcc/config/{i386 => mingw}/t-gthr-win32    |   0
 libgcc/config/{i386 => mingw}/t-mingw-pthread |   0
 32 files changed, 473 insertions(+), 93 deletions(-)
 create mode 100644 gcc/config/aarch64/aarch64-abi-ms.h
 create mode 100644 gcc/config/aarch64/aarch64-coff.h
 create mode 100644 gcc/config/aarch64/cygming.h
 delete mode 100644 gcc/config/i386/cygming.opt.urls
 rename gcc/config/{i386 => mingw}/cygming.opt (100%)
 create mode 100644 gcc/config/mingw/cygming.opt.urls
 rename gcc/config/{i386 => mingw}/cygwin-d.cc (100%)
 rename gcc/config/{i386 => mingw}/mingw-stdint.h (86%)
 rename gcc/config/{i386 => mingw}/mingw.opt (100%)
 rename gcc/config/{i386 => mingw}/mingw.opt.urls (86%)
 rename gcc/config/{i386 => mingw}/mingw32.h (99%)
 rename gcc/config/{i386 => mingw}/msformat-c.cc (100%)
 rename gcc/config/{i386 => mingw}/t-cygming (73%)
 rename gcc/config/{i386 => mingw}/winnt-cxx.cc (100%)
 rename gcc/config/{i386 => mingw}/winnt-d.cc (100%)
 rename gcc/config/{i386 => mingw}/winnt-stubs.cc (100%)
 rename gcc/config/{i386 => mingw}/winnt.cc (97%)
 create mode 100644 libgcc/config/aarch64/t-no-eh
 rename libgcc/config/{i386 => mingw}/t-gthr-win32 (100%)
 rename libgcc/config/{i386 => mingw}/t-mingw-pthread (100%)
  

Comments

Christophe Lyon May 7, 2024, 4:05 p.m. UTC | #1
Hi,

I've just pushed this patch series, congratulations!

Thanks,

Christophe


On Thu, 11 Apr 2024 at 15:40, Evgeny Karpov <Evgeny.Karpov@microsoft.com> wrote:
>
> Hello,
>
> Thank you for reviewing v2!
> v3 addresses all comments on v2.
>
> v3 Changes:
> - Exclude the aarch64_calling_abi declaration from the patch series.
> - Refactor x18 adjustment for MS ABI.
> - Remove unnecessary headers.
> - Add an extra comment to explain empty definitions.
> - Use gcc_unreachable for definitions that are needed for compilation,
> but not used by the aarch64-w64-mingw32 target.
> - Retain old index entries.
> - Rebase from 11th April 2024
>
> Regards,
> Evgeny
>
>
> Zac Walker (12):
>   Introduce aarch64-w64-mingw32 target
>   aarch64: Mark x18 register as a fixed register for MS ABI
>   aarch64: Add aarch64-w64-mingw32 COFF
>   Reuse MinGW from i386 for AArch64
>   Rename section and encoding functions from i386 which will be used in
>     aarch64
>   Exclude i386 functionality from aarch64 build
>   aarch64: Add Cygwin and MinGW environments for AArch64
>   aarch64: Add SEH to machine_function
>   Rename "x86 Windows Options" to "Cygwin and MinGW Options"
>   aarch64: Build and add objects for Cygwin and MinGW for AArch64
>   aarch64: Add aarch64-w64-mingw32 target to libatomic
>   Add aarch64-w64-mingw32 target to libgcc
>
>  fixincludes/mkfixinc.sh                       |   3 +-
>  gcc/config.gcc                                |  47 +++--
>  gcc/config/aarch64/aarch64-abi-ms.h           |  34 ++++
>  gcc/config/aarch64/aarch64-coff.h             |  91 +++++++++
>  gcc/config/aarch64/aarch64-protos.h           |   5 +
>  gcc/config/aarch64/aarch64.h                  |  13 +-
>  gcc/config/aarch64/cygming.h                  | 172 ++++++++++++++++++
>  gcc/config/i386/cygming.h                     |  18 +-
>  gcc/config/i386/cygming.opt.urls              |  30 ---
>  gcc/config/i386/i386-protos.h                 |  12 +-
>  gcc/config/i386/mingw-w64.opt.urls            |   2 +-
>  gcc/config/lynx.opt.urls                      |   2 +-
>  gcc/config/{i386 => mingw}/cygming.opt        |   0
>  gcc/config/mingw/cygming.opt.urls             |  30 +++
>  gcc/config/{i386 => mingw}/cygwin-d.cc        |   0
>  gcc/config/{i386 => mingw}/mingw-stdint.h     |   9 +-
>  gcc/config/{i386 => mingw}/mingw.opt          |   0
>  gcc/config/{i386 => mingw}/mingw.opt.urls     |   2 +-
>  gcc/config/{i386 => mingw}/mingw32.h          |   4 +-
>  gcc/config/{i386 => mingw}/msformat-c.cc      |   0
>  gcc/config/{i386 => mingw}/t-cygming          |  23 ++-
>  gcc/config/{i386 => mingw}/winnt-cxx.cc       |   0
>  gcc/config/{i386 => mingw}/winnt-d.cc         |   0
>  gcc/config/{i386 => mingw}/winnt-stubs.cc     |   0
>  gcc/config/{i386 => mingw}/winnt.cc           |  30 +--
>  gcc/doc/invoke.texi                           |  10 +
>  gcc/varasm.cc                                 |   2 +-
>  libatomic/configure.tgt                       |   2 +-
>  libgcc/config.host                            |  23 ++-
>  libgcc/config/aarch64/t-no-eh                 |   2 +
>  libgcc/config/{i386 => mingw}/t-gthr-win32    |   0
>  libgcc/config/{i386 => mingw}/t-mingw-pthread |   0
>  32 files changed, 473 insertions(+), 93 deletions(-)
>  create mode 100644 gcc/config/aarch64/aarch64-abi-ms.h
>  create mode 100644 gcc/config/aarch64/aarch64-coff.h
>  create mode 100644 gcc/config/aarch64/cygming.h
>  delete mode 100644 gcc/config/i386/cygming.opt.urls
>  rename gcc/config/{i386 => mingw}/cygming.opt (100%)
>  create mode 100644 gcc/config/mingw/cygming.opt.urls
>  rename gcc/config/{i386 => mingw}/cygwin-d.cc (100%)
>  rename gcc/config/{i386 => mingw}/mingw-stdint.h (86%)
>  rename gcc/config/{i386 => mingw}/mingw.opt (100%)
>  rename gcc/config/{i386 => mingw}/mingw.opt.urls (86%)
>  rename gcc/config/{i386 => mingw}/mingw32.h (99%)
>  rename gcc/config/{i386 => mingw}/msformat-c.cc (100%)
>  rename gcc/config/{i386 => mingw}/t-cygming (73%)
>  rename gcc/config/{i386 => mingw}/winnt-cxx.cc (100%)
>  rename gcc/config/{i386 => mingw}/winnt-d.cc (100%)
>  rename gcc/config/{i386 => mingw}/winnt-stubs.cc (100%)
>  rename gcc/config/{i386 => mingw}/winnt.cc (97%)
>  create mode 100644 libgcc/config/aarch64/t-no-eh
>  rename libgcc/config/{i386 => mingw}/t-gthr-win32 (100%)
>  rename libgcc/config/{i386 => mingw}/t-mingw-pthread (100%)
>
> --
> 2.25.1
>
  
Zac Walker May 7, 2024, 4:31 p.m. UTC | #2
Cool - congratulations everyone!!
Thanks for getting it completed. Fantastic effort from you all.

Zac

-----Original Message-----
From: Christophe Lyon <christophe.lyon@linaro.org> 
Sent: Tuesday, May 7, 2024 6:06 PM
To: Evgeny Karpov <Evgeny.Karpov@microsoft.com>
Cc: gcc-patches@gcc.gnu.org; richard.sandiford@arm.com; Richard Earnshaw (lists) <Richard.Earnshaw@arm.com>; Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org>; Radek Barton <radek.barton@microsoft.com>; Zac Walker <zacwalker@microsoft.com>
Subject: [EXTERNAL] Re: [PATCH v3 00/12] Add aarch64-w64-mingw32 target

Hi,

I've just pushed this patch series, congratulations!

Thanks,

Christophe


On Thu, 11 Apr 2024 at 15:40, Evgeny Karpov <Evgeny.Karpov@microsoft.com> wrote:
>
> Hello,
>
> Thank you for reviewing v2!
> v3 addresses all comments on v2.
>
> v3 Changes:
> - Exclude the aarch64_calling_abi declaration from the patch series.
> - Refactor x18 adjustment for MS ABI.
> - Remove unnecessary headers.
> - Add an extra comment to explain empty definitions.
> - Use gcc_unreachable for definitions that are needed for compilation, 
> but not used by the aarch64-w64-mingw32 target.
> - Retain old index entries.
> - Rebase from 11th April 2024
>
> Regards,
> Evgeny
>
>
> Zac Walker (12):
>   Introduce aarch64-w64-mingw32 target
>   aarch64: Mark x18 register as a fixed register for MS ABI
>   aarch64: Add aarch64-w64-mingw32 COFF
>   Reuse MinGW from i386 for AArch64
>   Rename section and encoding functions from i386 which will be used in
>     aarch64
>   Exclude i386 functionality from aarch64 build
>   aarch64: Add Cygwin and MinGW environments for AArch64
>   aarch64: Add SEH to machine_function
>   Rename "x86 Windows Options" to "Cygwin and MinGW Options"
>   aarch64: Build and add objects for Cygwin and MinGW for AArch64
>   aarch64: Add aarch64-w64-mingw32 target to libatomic
>   Add aarch64-w64-mingw32 target to libgcc
>
>  fixincludes/mkfixinc.sh                       |   3 +-
>  gcc/config.gcc                                |  47 +++--
>  gcc/config/aarch64/aarch64-abi-ms.h           |  34 ++++
>  gcc/config/aarch64/aarch64-coff.h             |  91 +++++++++
>  gcc/config/aarch64/aarch64-protos.h           |   5 +
>  gcc/config/aarch64/aarch64.h                  |  13 +-
>  gcc/config/aarch64/cygming.h                  | 172 ++++++++++++++++++
>  gcc/config/i386/cygming.h                     |  18 +-
>  gcc/config/i386/cygming.opt.urls              |  30 ---
>  gcc/config/i386/i386-protos.h                 |  12 +-
>  gcc/config/i386/mingw-w64.opt.urls            |   2 +-
>  gcc/config/lynx.opt.urls                      |   2 +-
>  gcc/config/{i386 => mingw}/cygming.opt        |   0
>  gcc/config/mingw/cygming.opt.urls             |  30 +++
>  gcc/config/{i386 => mingw}/cygwin-d.cc        |   0
>  gcc/config/{i386 => mingw}/mingw-stdint.h     |   9 +-
>  gcc/config/{i386 => mingw}/mingw.opt          |   0
>  gcc/config/{i386 => mingw}/mingw.opt.urls     |   2 +-
>  gcc/config/{i386 => mingw}/mingw32.h          |   4 +-
>  gcc/config/{i386 => mingw}/msformat-c.cc      |   0
>  gcc/config/{i386 => mingw}/t-cygming          |  23 ++-
>  gcc/config/{i386 => mingw}/winnt-cxx.cc       |   0
>  gcc/config/{i386 => mingw}/winnt-d.cc         |   0
>  gcc/config/{i386 => mingw}/winnt-stubs.cc     |   0
>  gcc/config/{i386 => mingw}/winnt.cc           |  30 +--
>  gcc/doc/invoke.texi                           |  10 +
>  gcc/varasm.cc                                 |   2 +-
>  libatomic/configure.tgt                       |   2 +-
>  libgcc/config.host                            |  23 ++-
>  libgcc/config/aarch64/t-no-eh                 |   2 +
>  libgcc/config/{i386 => mingw}/t-gthr-win32    |   0
>  libgcc/config/{i386 => mingw}/t-mingw-pthread |   0
>  32 files changed, 473 insertions(+), 93 deletions(-)  create mode 
> 100644 gcc/config/aarch64/aarch64-abi-ms.h
>  create mode 100644 gcc/config/aarch64/aarch64-coff.h  create mode 
> 100644 gcc/config/aarch64/cygming.h  delete mode 100644 
> gcc/config/i386/cygming.opt.urls  rename gcc/config/{i386 => 
> mingw}/cygming.opt (100%)  create mode 100644 
> gcc/config/mingw/cygming.opt.urls  rename gcc/config/{i386 => 
> mingw}/cygwin-d.cc (100%)  rename gcc/config/{i386 => 
> mingw}/mingw-stdint.h (86%)  rename gcc/config/{i386 => 
> mingw}/mingw.opt (100%)  rename gcc/config/{i386 => 
> mingw}/mingw.opt.urls (86%)  rename gcc/config/{i386 => 
> mingw}/mingw32.h (99%)  rename gcc/config/{i386 => 
> mingw}/msformat-c.cc (100%)  rename gcc/config/{i386 => 
> mingw}/t-cygming (73%)  rename gcc/config/{i386 => mingw}/winnt-cxx.cc 
> (100%)  rename gcc/config/{i386 => mingw}/winnt-d.cc (100%)  rename 
> gcc/config/{i386 => mingw}/winnt-stubs.cc (100%)  rename 
> gcc/config/{i386 => mingw}/winnt.cc (97%)  create mode 100644 
> libgcc/config/aarch64/t-no-eh  rename libgcc/config/{i386 => 
> mingw}/t-gthr-win32 (100%)  rename libgcc/config/{i386 => 
> mingw}/t-mingw-pthread (100%)
>
> --
> 2.25.1
>