[v2,01/13] Introduce aarch64-w64-mingw32 target

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

Checks

Context Check Description
snail/gcc-patch-check success Github commit url

Commit Message

Evgeny Karpov March 4, 2024, 5:30 p.m. UTC
  From 38efaf5ab1fa017622d10239fff2ca23d2d3fb82 Mon Sep 17 00:00:00 2001
From: Zac Walker <zacwalker@microsoft.com>
Date: Fri, 1 Mar 2024 01:40:53 +0100
Subject: [PATCH v2 01/13] Introduce aarch64-w64-mingw32 target

Add the initial aarch64-w64-mingw32 target for gcc.

fixincludes/ChangeLog:

	* mkfixinc.sh: Extend for *-mingw32* targets.

gcc/ChangeLog:

	* config.gcc: Add aarch64-w64-mingw32 target.
---
 fixincludes/mkfixinc.sh |  3 +--
 gcc/config.gcc          | 13 +++++++++++++
 2 files changed, 14 insertions(+), 2 deletions(-)
  

Patch

diff --git a/fixincludes/mkfixinc.sh b/fixincludes/mkfixinc.sh
index df90720b716..7112f4dcd64 100755
--- a/fixincludes/mkfixinc.sh
+++ b/fixincludes/mkfixinc.sh
@@ -12,8 +12,7 @@  target=fixinc.sh
 # Check for special fix rules for particular targets
 case $machine in
     i?86-*-cygwin* | \
-    i?86-*-mingw32* | \
-    x86_64-*-mingw32* | \
+    *-mingw32* | \
     powerpc-*-eabisim* | \
     powerpc-*-eabi*    | \
     powerpc-*-rtems*   | \
diff --git a/gcc/config.gcc b/gcc/config.gcc
index a1480b72c46..2756377e50b 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -1264,6 +1264,19 @@  aarch64*-*-linux*)
 	done
 	TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
 	;;
+aarch64-*-mingw*)
+	tmake_file="${tmake_file} aarch64/t-aarch64"
+	case ${enable_threads} in
+	  "" | yes | win32)
+	    thread_file='win32'
+	    ;;
+	  posix)
+	    thread_file='posix'
+	    ;;
+	esac
+	default_use_cxa_atexit=yes
+	user_headers_inc_next_post="${user_headers_inc_next_post} float.h"
+	;;
 aarch64*-wrs-vxworks*)
         tm_file="${tm_file} elfos.h aarch64/aarch64-elf.h"
         tm_file="${tm_file} vx-common.h vxworks.h aarch64/aarch64-vxworks.h"