From 5273d3d0e937d3e10eaaf953513a0932506fcd56 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)
---
 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 17342487ae9..cd1dce87f1b 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('objcxx-hi',
      [ skip_if_not_osx,
+       when(config.target_wrapper is not None, skip),
        objcxx_src,
        expect_fail_for(['ghci']) ],
      compile_and_run, ['-framework Foundation -lc++'])
-- 
GitLab