From af5ebf98bac8371ef95aec72904d5a62e8f55d7f Mon Sep 17 00:00:00 2001
From: Iain Sandoe <iain@sandoe.co.uk>
Date: Mon, 31 Aug 2020 12:40:51 +0100
Subject: [PATCH] testsuite, Darwin, Arm64 : We don't support PCH yet, disable
 the tests.

There is no point in running these, since the current implmentation requires
non-PIE executables, which are not permitted on Arm64 Darwin.

(cherry picked from commit f5a4dd0abae2839dacedffb0a9e3baf07f595487)
Signed-off-by: Kirill A. Korinsky <kirill@korins.ky>
---
 gcc/testsuite/g++.dg/pch/pch.exp  | 5 +++++
 gcc/testsuite/gcc.dg/pch/pch.exp  | 5 +++++
 gcc/testsuite/objc.dg/pch/pch.exp | 5 +++++
 3 files changed, 15 insertions(+)

diff --git gcc/testsuite/g++.dg/pch/pch.exp gcc/testsuite/g++.dg/pch/pch.exp
index f5afdc20f84..68c5b0487cc 100644
--- gcc/testsuite/g++.dg/pch/pch.exp
+++ gcc/testsuite/g++.dg/pch/pch.exp
@@ -14,6 +14,11 @@
 # along with GCC; see the file COPYING3.  If not see
 # <http://www.gnu.org/licenses/>.
 
+# Arm64 Darwin doesn't support PCH
+if { [istarget aarch64-*-darwin*] } then {
+  return
+}
+
 # GCC testsuite for precompiled header interaction,
 # that uses the `dg.exp' driver.
 
diff --git gcc/testsuite/gcc.dg/pch/pch.exp gcc/testsuite/gcc.dg/pch/pch.exp
index c3882b95809..e681ace2fff 100644
--- gcc/testsuite/gcc.dg/pch/pch.exp
+++ gcc/testsuite/gcc.dg/pch/pch.exp
@@ -14,6 +14,11 @@
 # along with GCC; see the file COPYING3.  If not see
 # <http://www.gnu.org/licenses/>.
 
+# Arm64 Darwin doesn't support PCH
+if { [istarget aarch64-*-darwin*] } then {
+  return
+}
+
 # GCC testsuite for precompiled header interaction,
 # that uses the `dg.exp' driver.
 
diff --git gcc/testsuite/objc.dg/pch/pch.exp gcc/testsuite/objc.dg/pch/pch.exp
index 2da3d96d4fe..4e225f0bc43 100644
--- gcc/testsuite/objc.dg/pch/pch.exp
+++ gcc/testsuite/objc.dg/pch/pch.exp
@@ -14,6 +14,11 @@
 # along with GCC; see the file COPYING3.  If not see
 # <http://www.gnu.org/licenses/>.
 
+# Arm64 Darwin doesn't support PCH
+if { [istarget aarch64-*-darwin*] } then {
+  return
+}
+
 # GCC testsuite for precompiled header interaction,
 # that uses the `dg.exp' driver.
 
-- 
2.42.1

