aboutsummaryrefslogtreecommitdiffstats
path: root/meta-gnome/recipes-gnome/gjs/gjs/0001-Support-cross-builds-a-bit-better.patch
blob: 55af681af0f124143791d42fa06ec745f89ce075 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
From 550e98013b0e003c1a6771d8e811375913adf16b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
Date: Wed, 27 Oct 2021 20:18:47 +0200
Subject: [PATCH] Support cross builds a bit better
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* Do not build/run mozjs-linked program
* Do not try to run test applications

Upstream-Status: Submitted[https://gitlab.gnome.org/GNOME/gjs/-/merge_requests/690]

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
---
 meson.build | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index dfcc2c3..192b1b5 100644
--- a/meson.build
+++ b/meson.build
@@ -234,6 +234,7 @@ release builds of SpiderMonkey. Try configuring SpiderMonkey with
 --disable-debug.''')
 endif
 
+if not meson.is_cross_build()
 # Check if a minimal SpiderMonkey program compiles, links, and runs. If not,
 # it's most likely the case that SpiderMonkey was configured incorrectly, for
 # example by building mozglue as a shared library.
@@ -254,6 +255,7 @@ could not be compiled, linked, or run. Most likely you should build it with a
 different configuration. Check the recommended configuration:
 https://github.com/spidermonkey-embedders/spidermonkey-embedding-examples/blob/esr78/docs/Building%20SpiderMonkey.md''')
 endif
+endif # not meson.is_cross_build()
 
 have_printf_alternative_int = cc.compiles('''
 #include <stdio.h>
@@ -662,7 +664,7 @@ endif
 
 # Note: The test program in test/ needs to be ported
 #       to Windows before we can build it on Windows.
-if host_machine.system() != 'windows'
+if host_machine.system() != 'windows' and not meson.is_cross_build()
     subdir('test')
 endif
 
-- 
2.31.1