From 06051524f7af32c1143b89233e1863c4b38af022 Mon Sep 17 00:00:00 2001
From: Rasmus Villemoes <rv@rasmusvillemoes.dk>
Date: Tue, 7 Dec 2021 12:09:38 +0000
Subject: [PATCH] Replace t-ppccomm by t-vxworks in libgcc/config/rs6000

This removes ibm-ldouble.c and a few eabi crt files from the build
closure, which were producing objects we don't use.

2021-12-07  Rasmus Villemoes  <rv@rasmusvillemoes.dk>

libgcc/
	* config/rs6000/t-vxworks: New file.
	* config.host (powerpc*-*-vxworks*): Use it instead of
	t-ppccomm.
---
 libgcc/config.host             | 4 ++--
 libgcc/config/rs6000/t-vxworks | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)
 create mode 100644 libgcc/config/rs6000/t-vxworks

diff --git a/libgcc/config.host b/libgcc/config.host
index 95a0b2ab4b1..bd44f1bbf42 100644
--- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -1238,7 +1238,7 @@ powerpc*-*-linux*)
 	md_unwind_header=rs6000/linux-unwind.h
 	;;
 powerpc*-wrs-vxworks7*)
-        tmake_file="$tmake_file rs6000/t-ppccomm rs6000/t-savresfgpr rs6000/t-crtstuff rs6000/t-linux t-dfprules rs6000/t-ppc64-fp t-slibgcc-libgcc"
+        tmake_file="$tmake_file rs6000/t-vxworks rs6000/t-savresfgpr rs6000/t-crtstuff rs6000/t-linux t-dfprules rs6000/t-ppc64-fp t-slibgcc-libgcc"
         case $ppc_fp_type in
         64)
                 ;;
@@ -1255,7 +1255,7 @@ powerpc*-wrs-vxworks7*)
         esac
         ;;
 powerpc-wrs-vxworks*)
-	tmake_file="$tmake_file rs6000/t-ppccomm rs6000/t-savresfgpr t-fdpbit"
+	tmake_file="$tmake_file rs6000/t-vxworks rs6000/t-savresfgpr t-fdpbit"
 	;;
 powerpc-*-lynxos*)
 	tmake_file="$tmake_file rs6000/t-lynx t-fdpbit"
diff --git a/libgcc/config/rs6000/t-vxworks b/libgcc/config/rs6000/t-vxworks
new file mode 100644
index 00000000000..8c7a56fb446
--- /dev/null
+++ b/libgcc/config/rs6000/t-vxworks
@@ -0,0 +1 @@
+LIB2ADD += $(srcdir)/config/rs6000/tramp.S
-- 
2.25.1

