[v1,13/13] Add aarch64-w64-mingw32 target to libgcc

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

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gcc_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_gcc_check--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_gcc_check--master-arm success Testing passed

Commit Message

Evgeny Karpov Feb. 21, 2024, 6:40 p.m. UTC
  From fa02812c6fb39fd409a27cd09664530f2fabd9e3 Mon Sep 17 00:00:00 2001
From: Zac Walker <zacwalker@microsoft.com>
Date: Mon, 12 Feb 2024 15:22:47 +0100
Subject: [PATCH v1 13/13] Add aarch64-w64-mingw32 target to libgcc

Reuse MinGW definitions from i386 for libgcc. Move reused files to
libgcc/config/mingw folder.

libgcc/ChangeLog:

	* config.host: Add aarch64-w64-mingw32 target. Adjust targets
	after moving MinGW files.
	* config/i386/t-gthr-win32: Moved to...
	* config/mingw/t-gthr-win32: ...here.
	* config/i386/t-mingw-pthread: Moved to...
	* config/mingw/t-mingw-pthread: ...here.
	* config/aarch64/t-no-eh: New file. EH is not yet implemented for
	the target, and the default definition should be disabled.
---
 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
 4 files changed, 21 insertions(+), 4 deletions(-)
 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

Richard Earnshaw (lists) Feb. 22, 2024, 1:36 p.m. UTC | #1
On 21/02/2024 18:40, Evgeny Karpov wrote:
> 
+aarch64-*-mingw*)

This doesn't match the glob pattern you added to config.gcc in an earlier patch, but see my comment on that.  The two should really be consistent with each other or you might get build failures late on.

R.
  
Evgeny Karpov Feb. 25, 2024, 7:14 p.m. UTC | #2
The target will be adjusted to aarch64-*-mingw* in config.gcc. This
change will ensure consistency with the target in libgcc.

Regards,
Evgeny


-----Original Message-----
Thursday, February 22, 2024 2:36 PM
Richard Earnshaw (lists) wrote:

>
+aarch64-*-mingw*)

This doesn't match the glob pattern you added to config.gcc in an earlier patch, but see my comment on that.  The two should really be consistent with each other or you might get build failures late on.

R.
  

Patch

diff --git a/libgcc/config.host b/libgcc/config.host
index 59a42d3a01f..3396a84893f 100644
--- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -456,6 +456,21 @@  aarch64*-*-vxworks7*)
 	tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm"
 	tmake_file="${tmake_file} t-dfprules"
 	;;
+aarch64-*-mingw*)
+	case ${target_thread_file} in
+	  win32)
+	    tmake_thr_file="mingw/t-gthr-win32"
+	    ;;
+	  posix)
+	    tmake_thr_file="mingw/t-mingw-pthread"
+	    ;;
+	esac
+	tmake_file="${tmake_file} ${cpu_type}/t-no-eh ${tmake_thr_file}"
+	tmake_file="${tmake_file} t-dfprules"
+	tmake_file="${tmake_file} ${cpu_type}/t-aarch64"
+	tmake_file="${tmake_file} ${cpu_type}/t-lse"
+	tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm"
+	;;
 alpha*-*-linux*)
 	tmake_file="${tmake_file} alpha/t-alpha alpha/t-ieee t-crtfm alpha/t-linux"
 	extra_parts="$extra_parts crtfastmath.o"
@@ -874,10 +889,10 @@  i[34567]86-*-mingw*)
 	fi
 	case ${target_thread_file} in
 	  win32)
-	    tmake_thr_file="i386/t-gthr-win32"
+	    tmake_thr_file="mingw/t-gthr-win32"
 	    ;;
 	  posix)
-	    tmake_thr_file="i386/t-mingw-pthread"
+	    tmake_thr_file="mingw/t-mingw-pthread"
 	    ;;
 	  mcf)
 	    tmake_thr_file="i386/t-mingw-mcfgthread"
@@ -901,10 +916,10 @@  i[34567]86-*-mingw*)
 x86_64-*-mingw*)
 	case ${target_thread_file} in
 	  win32)
-	    tmake_thr_file="i386/t-gthr-win32"
+	    tmake_thr_file="mingw/t-gthr-win32"
 	    ;;
 	  posix)
-	    tmake_thr_file="i386/t-mingw-pthread"
+	    tmake_thr_file="mingw/t-mingw-pthread"
 	    ;;
 	  mcf)
 	    tmake_thr_file="i386/t-mingw-mcfgthread"
diff --git a/libgcc/config/aarch64/t-no-eh b/libgcc/config/aarch64/t-no-eh
new file mode 100644
index 00000000000..1802339a583
--- /dev/null
+++ b/libgcc/config/aarch64/t-no-eh
@@ -0,0 +1,2 @@ 
+# Not using EH
+LIB2ADDEH =
diff --git a/libgcc/config/i386/t-gthr-win32 b/libgcc/config/mingw/t-gthr-win32
similarity index 100%
rename from libgcc/config/i386/t-gthr-win32
rename to libgcc/config/mingw/t-gthr-win32
diff --git a/libgcc/config/i386/t-mingw-pthread b/libgcc/config/mingw/t-mingw-pthread
similarity index 100%
rename from libgcc/config/i386/t-mingw-pthread
rename to libgcc/config/mingw/t-mingw-pthread