From 920386e32898b375d819a4a1fd2b1a4718e81790 Mon Sep 17 00:00:00 2001
From: Cheng Shao <terrorjack@type.dance>
Date: Thu, 6 Jun 2024 16:17:26 +0000
Subject: [PATCH] testsuite: skip objc-hi/objcxx-hi when cross compiling

objc-hi/objcxx-hi should be skipped when cross compiling. The existing
opsys('darwin') predicate only asserts the host system is darwin but
tells us nothing about the target, hence the oversight.

(cherry picked from commit 595c0894f630f4fc377c6bf14a5fb88ca0f1398c)
(cherry picked from commit 5273d3d0e937d3e10eaaf953513a0932506fcd56)
---
 testsuite/tests/driver/objc/all.T | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/testsuite/tests/driver/objc/all.T b/testsuite/tests/driver/objc/all.T
index 1d5d134173e..7c1e18f97cb 100644
--- a/testsuite/tests/driver/objc/all.T
+++ b/testsuite/tests/driver/objc/all.T
@@ -8,12 +8,14 @@ skip_if_not_osx = if_not_platform(['i386-apple-darwin','x86_64-apple-darwin'], s
 
 test('objc-hi',
      [ skip_if_not_osx,
+       when(config.target_wrapper is not None, skip),
        objc_src,
        expect_fail_for(['ghci']) ],
      compile_and_run, ['-framework Foundation'])
 
 test('objcpp-hi',
      [ skip_if_not_osx,
+       when(config.target_wrapper is not None, skip),
        objcpp_src,
        expect_fail_for(['ghci']) ],
      compile_and_run, ['-framework Foundation -lc++'])
-- 
GitLab