39 lines
1.4 KiB
Diff
39 lines
1.4 KiB
Diff
From 6d21930baa4379023414706ce1750e0d729b99f0 Mon Sep 17 00:00:00 2001
|
|
From: Rudi Heitbaum <rudi@heitbaum.com>
|
|
Date: Mon, 12 Jun 2023 12:15:35 +0000
|
|
Subject: [PATCH] Wrapper around test applications for cross compiler
|
|
environment in meson.build
|
|
|
|
This enhances commit 7be56c57f93e3436b1fbd9ecc320de5c03a3e4b8 to allow build
|
|
fuse to be built using a cross compiler
|
|
|
|
Fixes:
|
|
../meson.build:180:12: ERROR: Can not run test applications in this cross environment.
|
|
---
|
|
https://github.com/libfuse/libfuse/pull/804
|
|
|
|
meson.build | 10 ++++++----
|
|
1 file changed, 6 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/meson.build b/meson.build
|
|
index 7aa4e0d47..9707ea3e2 100644
|
|
--- a/meson.build
|
|
+++ b/meson.build
|
|
@@ -177,10 +177,12 @@ int main()
|
|
}
|
|
'''
|
|
|
|
-result = cc.run(detect_getmntent_needs_unescape)
|
|
-if result.compiled() and result.returncode() == 0 and result.stdout().strip() == 'needs escaping'
|
|
- message('getmntent does not unescape')
|
|
- add_project_arguments('-DGETMNTENT_NEEDS_UNESCAPING', language: 'c')
|
|
+if not meson.is_cross_build()
|
|
+ result = cc.run(detect_getmntent_needs_unescape)
|
|
+ if result.compiled() and result.returncode() == 0 and result.stdout().strip() == 'needs escaping'
|
|
+ message('getmntent does not unescape')
|
|
+ add_project_arguments('-DGETMNTENT_NEEDS_UNESCAPING', language: 'c')
|
|
+ endif
|
|
endif
|
|
|
|
# Write private test results into fuse_config.h (stored in build directory)
|