aarch64: Introduce aarch64-pc-cygwin target
Checks
| Context |
Check |
Description |
| linaro-tcwg-bot/tcwg_binutils_build--master-arm |
success
|
Build passed
|
| linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 |
success
|
Build passed
|
| linaro-tcwg-bot/tcwg_binutils_check--master-arm |
success
|
Test passed
|
| linaro-tcwg-bot/tcwg_binutils_check--master-aarch64 |
fail
|
Patch failed to apply
|
Commit Message
The patch adds support for aarch64-pc-cygwin target.
Co-authored-by: Radek Barton <radek.barton@microsoft.com>
---
bfd/config.bfd | 2 +-
binutils/configure | 2 +-
binutils/configure.ac | 2 +-
config.guess | 3 +++
gas/configure.tgt | 3 ++-
gdb/configure.host | 1 +
gdbserver/configure.srv | 9 +++++++++
ld/configure.tgt | 4 ++--
ld/emultempl/pe.em | 5 +++--
ld/emultempl/pep.em | 8 ++++++--
10 files changed, 29 insertions(+), 10 deletions(-)
Comments
Hi Evgeny,
I think the GDB parts need approval from GDB maintainers (thus cc'ing
gdb-patches).
Thanks
Christophe
Le jeu. 29 oct. 2026, 21:27, Evgeny Karpov <evgeny.karpov@arm.com> a écrit :
> The patch adds support for aarch64-pc-cygwin target.
>
> Co-authored-by: Radek Barton <radek.barton@microsoft.com>
> ---
> bfd/config.bfd | 2 +-
> binutils/configure | 2 +-
> binutils/configure.ac | 2 +-
> config.guess | 3 +++
> gas/configure.tgt | 3 ++-
> gdb/configure.host | 1 +
> gdbserver/configure.srv | 9 +++++++++
> ld/configure.tgt | 4 ++--
> ld/emultempl/pe.em | 5 +++--
> ld/emultempl/pep.em | 8 ++++++--
> 10 files changed, 29 insertions(+), 10 deletions(-)
>
> diff --git a/bfd/config.bfd b/bfd/config.bfd
> index 9900e5c7470..99e9bcd8316 100644
> --- a/bfd/config.bfd
> +++ b/bfd/config.bfd
> @@ -254,7 +254,7 @@ case "${targ}" in
> targ_selvecs="aarch64_elf64_be_vec aarch64_elf32_le_vec
> aarch64_elf32_be_vec arm_elf32_le_vec arm_elf32_be_vec aarch64_pei_le_vec
> aarch64_pe_le_vec"
> want64=true
> ;;
> - aarch64-*-pe* | aarch64-*-mingw* | aarch64-*-windows*)
> + aarch64-*-pe* | aarch64-*-mingw* | aarch64-*-windows* |
> aarch64-*-cygwin*)
> targ_defvec=aarch64_pe_le_vec
> targ_selvecs="aarch64_pe_le_vec aarch64_pei_le_vec
> aarch64_pe_bigobj_le_vec aarch64_elf64_le_vec aarch64_elf64_be_vec
> aarch64_elf32_le_vec aarch64_elf32_be_vec arm_elf32_le_vec arm_elf32_be_vec
> pdb_vec"
> want64=true
> diff --git a/binutils/configure b/binutils/configure
> index c8202c3f3f0..c455cb4c0d9 100755
> --- a/binutils/configure
> +++ b/binutils/configure
> @@ -16912,7 +16912,7 @@ do
> esac
>
> case $targ in
> - aarch64-*-pe* | aarch64-*-mingw*)
> + aarch64-*-pe* | aarch64-*-mingw* | aarch64-*-cygwin*)
> BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
> if test -z "$DLLTOOL_DEFAULT"; then
> DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_AARCH64"
> diff --git a/binutils/configure.ac b/binutils/configure.ac
> index ce6e85ac4a6..e9fda4f42bb 100644
> --- a/binutils/configure.ac
> +++ b/binutils/configure.ac
> @@ -374,7 +374,7 @@ changequote([,])dnl
> esac
>
> case $targ in
> - aarch64-*-pe* | aarch64-*-mingw*)
> + aarch64-*-pe* | aarch64-*-mingw* | aarch64-*-cygwin*)
> BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
> if test -z "$DLLTOOL_DEFAULT"; then
> DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_AARCH64"
> diff --git a/config.guess b/config.guess
> index a9d01fde461..08e5cb3fabe 100755
> --- a/config.guess
> +++ b/config.guess
> @@ -955,6 +955,9 @@ EOF
> i*:UWIN*:*)
> GUESS=$UNAME_MACHINE-pc-uwin
> ;;
> + aarch64:CYGWIN*:*:*)
> + GUESS=aarch64-pc-cygwin
> + ;;
> amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
> GUESS=x86_64-pc-cygwin
> ;;
> diff --git a/gas/configure.tgt b/gas/configure.tgt
> index ba3d1194ae9..47d5c09420c 100644
> --- a/gas/configure.tgt
> +++ b/gas/configure.tgt
> @@ -139,7 +139,8 @@ case ${generic_target} in
> aarch64*-*-nto*) fmt=elf;;
> aarch64*-*-openbsd*) fmt=elf;;
> aarch64*-*-phoenix*) fmt=elf;;
> - aarch64*-*-pe* | aarch64*-*-mingw*) fmt=coff em=pepaarch64 ;;
> + aarch64*-*-pe* | aarch64*-*-mingw* | aarch64*-*-cygwin*)
> + fmt=coff em=pepaarch64 ;;
> alpha-*-*vms*) fmt=evax ;;
> alpha-*-osf*) fmt=ecoff ;;
> alpha-*-linux*ecoff*) fmt=ecoff ;;
> diff --git a/gdb/configure.host b/gdb/configure.host
> index c93390b9171..ee9d340c59f 100644
> --- a/gdb/configure.host
> +++ b/gdb/configure.host
> @@ -85,6 +85,7 @@ aarch64*-*-freebsd*) gdb_host=fbsd ;;
> aarch64*-*-mingw*) gdb_host=mingw64a
> gdb_host_obs=mingw-hdep.o
> ;;
> +aarch64*-*-cygwin*) gdb_host=cygwin64 ;;
>
> alpha*-*-linux*) gdb_host=alpha-linux ;;
> alpha*-*-netbsdaout* | alpha*-*-knetbsdaout*-gnu)
> diff --git a/gdbserver/configure.srv b/gdbserver/configure.srv
> index 5dfdcd7d999..f1a107d95ca 100644
> --- a/gdbserver/configure.srv
> +++ b/gdbserver/configure.srv
> @@ -73,6 +73,15 @@ case "${gdbserver_host}" in
> srv_tgtobj="${srv_tgtobj} nat/netbsd-nat.o"
> srv_tgtobj="${srv_tgtobj} arch/aarch64-insn.o
> arch/aarch64.o"
> ;;
> + aarch64-*-cygwin*) srv_regobj=""
> + srv_tgtobj="aarch64-low.o nat/aarch64-dregs.o"
> + srv_tgtobj="${srv_tgtobj} nat/aarch64-xstate.o"
> + srv_tgtobj="${srv_tgtobj} aarch64-fp.o"
> + srv_tgtobj="${srv_tgtobj} win32-low.o"
> + srv_tgtobj="${srv_tgtobj} win32-aarch64-low.o"
> + srv_tgtobj="${srv_tgtobj} nat/windows-nat.o"
> + srv_tgtobj="${srv_tgtobj} arch/aarch64.o"
> + ;;
> arc*-*-linux*)
> srv_regobj=""
> srv_tgtobj="linux-arc-low.o arch/arc.o
> $srv_linux_obj"
> diff --git a/ld/configure.tgt b/ld/configure.tgt
> index 55eb6e94b84..2496bc14659 100644
> --- a/ld/configure.tgt
> +++ b/ld/configure.tgt
> @@ -125,7 +125,7 @@ aarch64-*-haiku*) targ_emul=aarch64haiku
> aarch64-*-nto*) targ_emul=aarch64nto
> targ_extra_emuls="aarch64elf aarch64elf32
> aarch64elf32b aarch64elfb armelf armelfb"
> ;;
> -aarch64-*-pe* | aarch64-*-mingw*)
> +aarch64-*-pe* | aarch64-*-mingw* | aarch64-*-cygwin*)
> targ_emul=aarch64pe
> targ_extra_emuls="arm64pe"
> targ_extra_ofiles="deffilep.o pep-dll.o pe-dll.o
> pdb.o"
> @@ -1055,7 +1055,7 @@ spu-*-elf*)
> NATIVE_LIB_DIRS='/lib'
> ;;
>
> -i[03-9x]86-*-cygwin* | x86_64-*-cygwin*)
> +i[03-9x]86-*-cygwin* | x86_64-*-cygwin* | aarch64-*-cygwin*)
> NATIVE_LIB_DIRS='/usr/lib /usr/lib/w32api'
> ;;
>
> diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em
> index 1d02a86be96..d65dc6b286e 100644
> --- a/ld/emultempl/pe.em
> +++ b/ld/emultempl/pe.em
> @@ -7,7 +7,7 @@ else
> fi
>
> case ${target} in
> - *-*-mingw*)
> + *-*-mingw* | aarch64-*-cygwin*)
> mingw_behavior=1
> ;;
> *)
> @@ -70,7 +70,8 @@ EOF
>
> case ${target} in
> x86_64-*-mingw* | x86_64-*-pe | x86_64-*-pep | x86_64-*-cygwin | \
> - i[3-7]86-*-mingw32* | i[3-7]86-*-cygwin* | i[3-7]86-*-winnt |
> i[3-7]86-*-pe)
> + i[3-7]86-*-mingw32* | i[3-7]86-*-cygwin* | i[3-7]86-*-winnt | \
> + i[3-7]86-*-pe | aarch64-*-cygwin*)
> fragment <<EOF
> #include "pdb.h"
> EOF
> diff --git a/ld/emultempl/pep.em b/ld/emultempl/pep.em
> index de462cf3f02..847f182320d 100644
> --- a/ld/emultempl/pep.em
> +++ b/ld/emultempl/pep.em
> @@ -7,6 +7,10 @@ else
> fi
>
> case ${target} in
> + aarch64-*-cygwin*)
> + move_default_addr_high=1
> + mingw_behavior=1
> + ;;
> *-*-cygwin*)
> move_default_addr_high=1
> mingw_behavior=0
> @@ -83,8 +87,8 @@ EOF
>
> case ${target} in
> x86_64-*-mingw* | x86_64-*-pe | x86_64-*-pep | x86_64-*-cygwin | \
> - i[3-7]86-*-mingw32* | i[3-7]86-*-cygwin* | i[3-7]86-*-winnt |
> i[3-7]86-*-pe | \
> - aarch64-*-mingw* | aarch64-*-pe* )
> + i[3-7]86-*-mingw32* | i[3-7]86-*-cygwin* | i[3-7]86-*-winnt | \
> + i[3-7]86-*-pe | aarch64-*-mingw* | aarch64-*-pe* | aarch64-*-cygwin*)
> fragment <<EOF
> #include "pdb.h"
> EOF
>
On 29.10.2026 21:26, Evgeny Karpov wrote:
> The patch adds support for aarch64-pc-cygwin target.
>
> Co-authored-by: Radek Barton <radek.barton@microsoft.com>
First of all, authorship-wise: How is this related to the earlier
submission by Dennis [1] ?
> --- a/gas/configure.tgt
> +++ b/gas/configure.tgt
> @@ -139,7 +139,8 @@ case ${generic_target} in
> aarch64*-*-nto*) fmt=elf;;
> aarch64*-*-openbsd*) fmt=elf;;
> aarch64*-*-phoenix*) fmt=elf;;
> - aarch64*-*-pe* | aarch64*-*-mingw*) fmt=coff em=pepaarch64 ;;
> + aarch64*-*-pe* | aarch64*-*-mingw* | aarch64*-*-cygwin*)
> + fmt=coff em=pepaarch64 ;;
> alpha-*-*vms*) fmt=evax ;;
> alpha-*-osf*) fmt=ecoff ;;
> alpha-*-linux*ecoff*) fmt=ecoff ;;
Nit: The fmt= still wants aligning with the others. There are a few other
examples where the line would be getting too long when everything would be
on one line.
> --- a/ld/emultempl/pe.em
> +++ b/ld/emultempl/pe.em
> @@ -7,7 +7,7 @@ else
> fi
>
> case ${target} in
> - *-*-mingw*)
> + *-*-mingw* | aarch64-*-cygwin*)
> mingw_behavior=1
> ;;
> *)
> @@ -70,7 +70,8 @@ EOF
>
> case ${target} in
> x86_64-*-mingw* | x86_64-*-pe | x86_64-*-pep | x86_64-*-cygwin | \
> - i[3-7]86-*-mingw32* | i[3-7]86-*-cygwin* | i[3-7]86-*-winnt | i[3-7]86-*-pe)
> + i[3-7]86-*-mingw32* | i[3-7]86-*-cygwin* | i[3-7]86-*-winnt | \
> + i[3-7]86-*-pe | aarch64-*-cygwin*)
> fragment <<EOF
> #include "pdb.h"
> EOF
No change to this file should be needed.
> --- a/ld/emultempl/pep.em
> +++ b/ld/emultempl/pep.em
> @@ -7,6 +7,10 @@ else
> fi
>
> case ${target} in
> + aarch64-*-cygwin*)
> + move_default_addr_high=1
> + mingw_behavior=1
> + ;;
> *-*-cygwin*)
> move_default_addr_high=1
> mingw_behavior=0
> @@ -83,8 +87,8 @@ EOF
>
> case ${target} in
> x86_64-*-mingw* | x86_64-*-pe | x86_64-*-pep | x86_64-*-cygwin | \
> - i[3-7]86-*-mingw32* | i[3-7]86-*-cygwin* | i[3-7]86-*-winnt | i[3-7]86-*-pe | \
> - aarch64-*-mingw* | aarch64-*-pe* )
> + i[3-7]86-*-mingw32* | i[3-7]86-*-cygwin* | i[3-7]86-*-winnt | \
> + i[3-7]86-*-pe | aarch64-*-mingw* | aarch64-*-pe* | aarch64-*-cygwin*)
> fragment <<EOF
> #include "pdb.h"
> EOF
If I hadn't removed that line anyway, I'd ask that you please keep the ix86
line untouched.
Jan
[1] https://sourceware.org/pipermail/binutils/2026-September/151272.html
I don´t think we have a maintainer for pc-cygwin/Windows on aarch64.
On 29/10/2026 20:32, Christophe Lyon wrote:
> Hi Evgeny,
>
> I think the GDB parts need approval from GDB maintainers (thus cc'ing
> gdb-patches).
>
> Thanks
> Christophe
>
>
>
> Le jeu. 29 oct. 2026, 21:27, Evgeny Karpov <evgeny.karpov@arm.com
> <mailto:evgeny.karpov@arm.com>> a écrit :
>
> The patch adds support for aarch64-pc-cygwin target.
>
> Co-authored-by: Radek Barton <radek.barton@microsoft.com
> <mailto:radek.barton@microsoft.com>>
> ---
> bfd/config.bfd | 2 +-
> binutils/configure | 2 +-
> binutils/configure.ac <http://configure.ac> | 2 +-
> config.guess | 3 +++
> gas/configure.tgt | 3 ++-
> gdb/configure.host | 1 +
> gdbserver/configure.srv | 9 +++++++++
> ld/configure.tgt | 4 ++--
> ld/emultempl/pe.em | 5 +++--
> ld/emultempl/pep.em | 8 ++++++--
> 10 files changed, 29 insertions(+), 10 deletions(-)
>
> diff --git a/bfd/config.bfd b/bfd/config.bfd
> index 9900e5c7470..99e9bcd8316 100644
> --- a/bfd/config.bfd
> +++ b/bfd/config.bfd
> @@ -254,7 +254,7 @@ case "${targ}" in
> targ_selvecs="aarch64_elf64_be_vec aarch64_elf32_le_vec
> aarch64_elf32_be_vec arm_elf32_le_vec arm_elf32_be_vec
> aarch64_pei_le_vec aarch64_pe_le_vec"
> want64=true
> ;;
> - aarch64-*-pe* | aarch64-*-mingw* | aarch64-*-windows*)
> + aarch64-*-pe* | aarch64-*-mingw* | aarch64-*-windows* | aarch64-
> *-cygwin*)
> targ_defvec=aarch64_pe_le_vec
> targ_selvecs="aarch64_pe_le_vec aarch64_pei_le_vec
> aarch64_pe_bigobj_le_vec aarch64_elf64_le_vec aarch64_elf64_be_vec
> aarch64_elf32_le_vec aarch64_elf32_be_vec arm_elf32_le_vec
> arm_elf32_be_vec pdb_vec"
> want64=true
> diff --git a/binutils/configure b/binutils/configure
> index c8202c3f3f0..c455cb4c0d9 100755
> --- a/binutils/configure
> +++ b/binutils/configure
> @@ -16912,7 +16912,7 @@ do
> esac
>
> case $targ in
> - aarch64-*-pe* | aarch64-*-mingw*)
> + aarch64-*-pe* | aarch64-*-mingw* | aarch64-*-cygwin*)
> BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
> if test -z "$DLLTOOL_DEFAULT"; then
> DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_AARCH64"
> diff --git a/binutils/configure.ac <http://configure.ac> b/binutils/
> configure.ac <http://configure.ac>
> index ce6e85ac4a6..e9fda4f42bb 100644
> --- a/binutils/configure.ac <http://configure.ac>
> +++ b/binutils/configure.ac <http://configure.ac>
> @@ -374,7 +374,7 @@ changequote([,])dnl
> esac
>
> case $targ in
> - aarch64-*-pe* | aarch64-*-mingw*)
> + aarch64-*-pe* | aarch64-*-mingw* | aarch64-*-cygwin*)
> BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
> if test -z "$DLLTOOL_DEFAULT"; then
> DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_AARCH64"
> diff --git a/config.guess b/config.guess
> index a9d01fde461..08e5cb3fabe 100755
> --- a/config.guess
> +++ b/config.guess
> @@ -955,6 +955,9 @@ EOF
> i*:UWIN*:*)
> GUESS=$UNAME_MACHINE-pc-uwin
> ;;
> + aarch64:CYGWIN*:*:*)
> + GUESS=aarch64-pc-cygwin
> + ;;
> amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
> GUESS=x86_64-pc-cygwin
> ;;
> diff --git a/gas/configure.tgt b/gas/configure.tgt
> index ba3d1194ae9..47d5c09420c 100644
> --- a/gas/configure.tgt
> +++ b/gas/configure.tgt
> @@ -139,7 +139,8 @@ case ${generic_target} in
> aarch64*-*-nto*) fmt=elf;;
> aarch64*-*-openbsd*) fmt=elf;;
> aarch64*-*-phoenix*) fmt=elf;;
> - aarch64*-*-pe* | aarch64*-*-mingw*) fmt=coff em=pepaarch64 ;;
> + aarch64*-*-pe* | aarch64*-*-mingw* | aarch64*-*-cygwin*)
> + fmt=coff em=pepaarch64 ;;
> alpha-*-*vms*) fmt=evax ;;
> alpha-*-osf*) fmt=ecoff ;;
> alpha-*-linux*ecoff*) fmt=ecoff ;;
> diff --git a/gdb/configure.host b/gdb/configure.host
> index c93390b9171..ee9d340c59f 100644
> --- a/gdb/configure.host
> +++ b/gdb/configure.host
> @@ -85,6 +85,7 @@ aarch64*-*-freebsd*) gdb_host=fbsd ;;
> aarch64*-*-mingw*) gdb_host=mingw64a
> gdb_host_obs=mingw-hdep.o
> ;;
> +aarch64*-*-cygwin*) gdb_host=cygwin64 ;;
>
> alpha*-*-linux*) gdb_host=alpha-linux ;;
> alpha*-*-netbsdaout* | alpha*-*-knetbsdaout*-gnu)
> diff --git a/gdbserver/configure.srv b/gdbserver/configure.srv
> index 5dfdcd7d999..f1a107d95ca 100644
> --- a/gdbserver/configure.srv
> +++ b/gdbserver/configure.srv
> @@ -73,6 +73,15 @@ case "${gdbserver_host}" in
> srv_tgtobj="${srv_tgtobj} nat/netbsd-nat.o"
> srv_tgtobj="${srv_tgtobj} arch/aarch64-
> insn.o arch/aarch64.o"
> ;;
> + aarch64-*-cygwin*) srv_regobj=""
> + srv_tgtobj="aarch64-low.o nat/aarch64-dregs.o"
> + srv_tgtobj="${srv_tgtobj} nat/aarch64-xstate.o"
> + srv_tgtobj="${srv_tgtobj} aarch64-fp.o"
> + srv_tgtobj="${srv_tgtobj} win32-low.o"
> + srv_tgtobj="${srv_tgtobj} win32-aarch64-low.o"
> + srv_tgtobj="${srv_tgtobj} nat/windows-nat.o"
> + srv_tgtobj="${srv_tgtobj} arch/aarch64.o"
> + ;;
> arc*-*-linux*)
> srv_regobj=""
> srv_tgtobj="linux-arc-low.o arch/arc.o
> $srv_linux_obj"
> diff --git a/ld/configure.tgt b/ld/configure.tgt
> index 55eb6e94b84..2496bc14659 100644
> --- a/ld/configure.tgt
> +++ b/ld/configure.tgt
> @@ -125,7 +125,7 @@ aarch64-*-haiku*) targ_emul=aarch64haiku
> aarch64-*-nto*) targ_emul=aarch64nto
> targ_extra_emuls="aarch64elf aarch64elf32
> aarch64elf32b aarch64elfb armelf armelfb"
> ;;
> -aarch64-*-pe* | aarch64-*-mingw*)
> +aarch64-*-pe* | aarch64-*-mingw* | aarch64-*-cygwin*)
> targ_emul=aarch64pe
> targ_extra_emuls="arm64pe"
> targ_extra_ofiles="deffilep.o pep-dll.o pe-
> dll.o pdb.o"
> @@ -1055,7 +1055,7 @@ spu-*-elf*)
> NATIVE_LIB_DIRS='/lib'
> ;;
>
> -i[03-9x]86-*-cygwin* | x86_64-*-cygwin*)
> +i[03-9x]86-*-cygwin* | x86_64-*-cygwin* | aarch64-*-cygwin*)
> NATIVE_LIB_DIRS='/usr/lib /usr/lib/w32api'
> ;;
>
> diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em
> index 1d02a86be96..d65dc6b286e 100644
> --- a/ld/emultempl/pe.em
> +++ b/ld/emultempl/pe.em
> @@ -7,7 +7,7 @@ else
> fi
>
> case ${target} in
> - *-*-mingw*)
> + *-*-mingw* | aarch64-*-cygwin*)
> mingw_behavior=1
> ;;
> *)
> @@ -70,7 +70,8 @@ EOF
>
> case ${target} in
> x86_64-*-mingw* | x86_64-*-pe | x86_64-*-pep | x86_64-*-cygwin | \
> - i[3-7]86-*-mingw32* | i[3-7]86-*-cygwin* | i[3-7]86-*-winnt |
> i[3-7]86-*-pe)
> + i[3-7]86-*-mingw32* | i[3-7]86-*-cygwin* | i[3-7]86-*-winnt | \
> + i[3-7]86-*-pe | aarch64-*-cygwin*)
> fragment <<EOF
> #include "pdb.h"
> EOF
> diff --git a/ld/emultempl/pep.em b/ld/emultempl/pep.em
> index de462cf3f02..847f182320d 100644
> --- a/ld/emultempl/pep.em
> +++ b/ld/emultempl/pep.em
> @@ -7,6 +7,10 @@ else
> fi
>
> case ${target} in
> + aarch64-*-cygwin*)
> + move_default_addr_high=1
> + mingw_behavior=1
> + ;;
> *-*-cygwin*)
> move_default_addr_high=1
> mingw_behavior=0
> @@ -83,8 +87,8 @@ EOF
>
> case ${target} in
> x86_64-*-mingw* | x86_64-*-pe | x86_64-*-pep | x86_64-*-cygwin | \
> - i[3-7]86-*-mingw32* | i[3-7]86-*-cygwin* | i[3-7]86-*-winnt |
> i[3-7]86-*-pe | \
> - aarch64-*-mingw* | aarch64-*-pe* )
> + i[3-7]86-*-mingw32* | i[3-7]86-*-cygwin* | i[3-7]86-*-winnt | \
> + i[3-7]86-*-pe | aarch64-*-mingw* | aarch64-*-pe* | aarch64-*-cygwin*)
> fragment <<EOF
> #include "pdb.h"
> EOF
>
On Fri, 30 Oct 2026, Jan Beulich wrote:
> > The patch adds support for aarch64-pc-cygwin target.
> >
> > Co-authored-by: Radek Barton <radek.barton@microsoft.com>
>
> First of all, authorship-wise: How is this related to the earlier
> submission by Dennis [1] ?
This patch is based on work that has been done by Radek Barton
<radek.barton@microsoft.com> and me. The initial patch was submitted as part of
a bundle to the mailing list.
https://sourceware.org/pipermail/binutils/2025-November/145298.html
This submission has a few changes on top of that, which were made by the same
authors.
> > aarch64*-*-phoenix*) fmt=elf;;
> > - aarch64*-*-pe* | aarch64*-*-mingw*) fmt=coff em=pepaarch64 ;;
> > + aarch64*-*-pe* | aarch64*-*-mingw* | aarch64*-*-cygwin*)
> > + fmt=coff em=pepaarch64 ;;
> > alpha-*-*vms*) fmt=evax ;;
> > alpha-*-osf*) fmt=ecoff ;;
> > alpha-*-linux*ecoff*) fmt=ecoff ;;
>
> Nit: The fmt= still wants aligning with the others. There are a few other
> examples where the line would be getting too long when everything would be
> on one line.
It will be changed.
> > x86_64-*-mingw* | x86_64-*-pe | x86_64-*-pep | x86_64-*-cygwin | \
> > - i[3-7]86-*-mingw32* | i[3-7]86-*-cygwin* | i[3-7]86-*-winnt | i[3-7]86-*-pe)
> > + i[3-7]86-*-mingw32* | i[3-7]86-*-cygwin* | i[3-7]86-*-winnt | \
> > + i[3-7]86-*-pe | aarch64-*-cygwin*)
> > fragment <<EOF
> > #include "pdb.h"
> > EOF
>
> No change to this file should be needed.
It makes sense after this patch.
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ed4bbf96832daa18d88e5398daee1e79818e5f64
> > - i[3-7]86-*-mingw32* | i[3-7]86-*-cygwin* | i[3-7]86-*-winnt | i[3-7]86-*-pe | \
> > - aarch64-*-mingw* | aarch64-*-pe* )
> > + i[3-7]86-*-mingw32* | i[3-7]86-*-cygwin* | i[3-7]86-*-winnt | \
> > + i[3-7]86-*-pe | aarch64-*-mingw* | aarch64-*-pe* | aarch64-*-cygwin*)
> > fragment <<EOF
> > #include "pdb.h"
> > EOF
>
> If I hadn't removed that line anyway, I'd ask that you please keep the ix86
> line untouched.
Ok, that line will remain unchanged in the next version.
Regards,
Evgeny
On 04.11.2026 14:39, Evgeny Karpov wrote:
> On Fri, 30 Oct 2026, Jan Beulich wrote:
>>> The patch adds support for aarch64-pc-cygwin target.
>>>
>>> Co-authored-by: Radek Barton <radek.barton@microsoft.com>
>>
>> First of all, authorship-wise: How is this related to the earlier
>> submission by Dennis [1] ?
>
> This patch is based on work that has been done by Radek Barton
> <radek.barton@microsoft.com> and me. The initial patch was submitted as part of
> a bundle to the mailing list.
> https://sourceware.org/pipermail/binutils/2025-November/145298.html
> This submission has a few changes on top of that, which were made by the same
> authors.
And Dennis'es name was lost in this submission then?
Jan
On Wed, 04 Nov 2026, Jan Beulich wrote:
> > This patch is based on work that has been done by Radek Barton
> > <radek.barton@microsoft.com> and me. The initial patch was submitted as part of
> > a bundle to the mailing list.
> > https://sourceware.org/pipermail/binutils/2025-November/145298.html
> > This submission has a few changes on top of that, which were made by the same
> > authors.
>
> And Dennis'es name was lost in this submission then?
It looks like Dennis's patch series is a separate stream of work that is based
on the initial patch from the bundle. That stream of work has not been used while
preparing this submission.
Regards,
Evgeny
@@ -254,7 +254,7 @@ case "${targ}" in
targ_selvecs="aarch64_elf64_be_vec aarch64_elf32_le_vec aarch64_elf32_be_vec arm_elf32_le_vec arm_elf32_be_vec aarch64_pei_le_vec aarch64_pe_le_vec"
want64=true
;;
- aarch64-*-pe* | aarch64-*-mingw* | aarch64-*-windows*)
+ aarch64-*-pe* | aarch64-*-mingw* | aarch64-*-windows* | aarch64-*-cygwin*)
targ_defvec=aarch64_pe_le_vec
targ_selvecs="aarch64_pe_le_vec aarch64_pei_le_vec aarch64_pe_bigobj_le_vec aarch64_elf64_le_vec aarch64_elf64_be_vec aarch64_elf32_le_vec aarch64_elf32_be_vec arm_elf32_le_vec arm_elf32_be_vec pdb_vec"
want64=true
@@ -16912,7 +16912,7 @@ do
esac
case $targ in
- aarch64-*-pe* | aarch64-*-mingw*)
+ aarch64-*-pe* | aarch64-*-mingw* | aarch64-*-cygwin*)
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
if test -z "$DLLTOOL_DEFAULT"; then
DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_AARCH64"
@@ -374,7 +374,7 @@ changequote([,])dnl
esac
case $targ in
- aarch64-*-pe* | aarch64-*-mingw*)
+ aarch64-*-pe* | aarch64-*-mingw* | aarch64-*-cygwin*)
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
if test -z "$DLLTOOL_DEFAULT"; then
DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_AARCH64"
@@ -955,6 +955,9 @@ EOF
i*:UWIN*:*)
GUESS=$UNAME_MACHINE-pc-uwin
;;
+ aarch64:CYGWIN*:*:*)
+ GUESS=aarch64-pc-cygwin
+ ;;
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
GUESS=x86_64-pc-cygwin
;;
@@ -139,7 +139,8 @@ case ${generic_target} in
aarch64*-*-nto*) fmt=elf;;
aarch64*-*-openbsd*) fmt=elf;;
aarch64*-*-phoenix*) fmt=elf;;
- aarch64*-*-pe* | aarch64*-*-mingw*) fmt=coff em=pepaarch64 ;;
+ aarch64*-*-pe* | aarch64*-*-mingw* | aarch64*-*-cygwin*)
+ fmt=coff em=pepaarch64 ;;
alpha-*-*vms*) fmt=evax ;;
alpha-*-osf*) fmt=ecoff ;;
alpha-*-linux*ecoff*) fmt=ecoff ;;
@@ -85,6 +85,7 @@ aarch64*-*-freebsd*) gdb_host=fbsd ;;
aarch64*-*-mingw*) gdb_host=mingw64a
gdb_host_obs=mingw-hdep.o
;;
+aarch64*-*-cygwin*) gdb_host=cygwin64 ;;
alpha*-*-linux*) gdb_host=alpha-linux ;;
alpha*-*-netbsdaout* | alpha*-*-knetbsdaout*-gnu)
@@ -73,6 +73,15 @@ case "${gdbserver_host}" in
srv_tgtobj="${srv_tgtobj} nat/netbsd-nat.o"
srv_tgtobj="${srv_tgtobj} arch/aarch64-insn.o arch/aarch64.o"
;;
+ aarch64-*-cygwin*) srv_regobj=""
+ srv_tgtobj="aarch64-low.o nat/aarch64-dregs.o"
+ srv_tgtobj="${srv_tgtobj} nat/aarch64-xstate.o"
+ srv_tgtobj="${srv_tgtobj} aarch64-fp.o"
+ srv_tgtobj="${srv_tgtobj} win32-low.o"
+ srv_tgtobj="${srv_tgtobj} win32-aarch64-low.o"
+ srv_tgtobj="${srv_tgtobj} nat/windows-nat.o"
+ srv_tgtobj="${srv_tgtobj} arch/aarch64.o"
+ ;;
arc*-*-linux*)
srv_regobj=""
srv_tgtobj="linux-arc-low.o arch/arc.o $srv_linux_obj"
@@ -125,7 +125,7 @@ aarch64-*-haiku*) targ_emul=aarch64haiku
aarch64-*-nto*) targ_emul=aarch64nto
targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb"
;;
-aarch64-*-pe* | aarch64-*-mingw*)
+aarch64-*-pe* | aarch64-*-mingw* | aarch64-*-cygwin*)
targ_emul=aarch64pe
targ_extra_emuls="arm64pe"
targ_extra_ofiles="deffilep.o pep-dll.o pe-dll.o pdb.o"
@@ -1055,7 +1055,7 @@ spu-*-elf*)
NATIVE_LIB_DIRS='/lib'
;;
-i[03-9x]86-*-cygwin* | x86_64-*-cygwin*)
+i[03-9x]86-*-cygwin* | x86_64-*-cygwin* | aarch64-*-cygwin*)
NATIVE_LIB_DIRS='/usr/lib /usr/lib/w32api'
;;
@@ -7,7 +7,7 @@ else
fi
case ${target} in
- *-*-mingw*)
+ *-*-mingw* | aarch64-*-cygwin*)
mingw_behavior=1
;;
*)
@@ -70,7 +70,8 @@ EOF
case ${target} in
x86_64-*-mingw* | x86_64-*-pe | x86_64-*-pep | x86_64-*-cygwin | \
- i[3-7]86-*-mingw32* | i[3-7]86-*-cygwin* | i[3-7]86-*-winnt | i[3-7]86-*-pe)
+ i[3-7]86-*-mingw32* | i[3-7]86-*-cygwin* | i[3-7]86-*-winnt | \
+ i[3-7]86-*-pe | aarch64-*-cygwin*)
fragment <<EOF
#include "pdb.h"
EOF
@@ -7,6 +7,10 @@ else
fi
case ${target} in
+ aarch64-*-cygwin*)
+ move_default_addr_high=1
+ mingw_behavior=1
+ ;;
*-*-cygwin*)
move_default_addr_high=1
mingw_behavior=0
@@ -83,8 +87,8 @@ EOF
case ${target} in
x86_64-*-mingw* | x86_64-*-pe | x86_64-*-pep | x86_64-*-cygwin | \
- i[3-7]86-*-mingw32* | i[3-7]86-*-cygwin* | i[3-7]86-*-winnt | i[3-7]86-*-pe | \
- aarch64-*-mingw* | aarch64-*-pe* )
+ i[3-7]86-*-mingw32* | i[3-7]86-*-cygwin* | i[3-7]86-*-winnt | \
+ i[3-7]86-*-pe | aarch64-*-mingw* | aarch64-*-pe* | aarch64-*-cygwin*)
fragment <<EOF
#include "pdb.h"
EOF