Skip to content

Commit 3e50608

Browse files
committed
patches/sysrepo: port cross-compile fixes from Infix
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
1 parent b48ab47 commit 3e50608

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
From 2549c966c090dd38a7a09907d27d13107d15aedd Mon Sep 17 00:00:00 2001
2+
From: =?UTF-8?q?Mattias=20Walstr=C3=B6m?= <lazzer@gmail.com>
3+
Date: Tue, 16 Dec 2025 08:18:32 +0100
4+
Subject: [PATCH 08/10] Cross compile fixes
5+
MIME-Version: 1.0
6+
Content-Type: text/plain; charset=UTF-8
7+
Content-Transfer-Encoding: 8bit
8+
Organization: Wires
9+
10+
Signed-off-by: Mattias Walström <lazzer@gmail.com>
11+
---
12+
CMakeModules/SetupPrintedContext.cmake | 9 +++++++++
13+
1 file changed, 9 insertions(+)
14+
15+
diff --git a/CMakeModules/SetupPrintedContext.cmake b/CMakeModules/SetupPrintedContext.cmake
16+
index f31ddff6..bfce7a5f 100644
17+
--- a/CMakeModules/SetupPrintedContext.cmake
18+
+++ b/CMakeModules/SetupPrintedContext.cmake
19+
@@ -59,6 +59,15 @@ function(SETUP_PRINTED_CONTEXT)
20+
return()
21+
endif()
22+
23+
+ # cannot run test programs when cross-compiling
24+
+ if(CMAKE_CROSSCOMPILING)
25+
+ message(WARNING "Cannot calculate printed context address when cross-compiling. "
26+
+ "Provide PRINTED_CONTEXT_ADDRESS manually to enable printed context.")
27+
+ message(STATUS "Printed context: disabled")
28+
+ set(PRINTED_CONTEXT_ADDRESS 0 CACHE STRING "${PRINTED_CONTEXT_ADDRESS_DOCSTRING}" FORCE)
29+
+ return()
30+
+ endif()
31+
+
32+
# compile and run the address calculator
33+
try_run(
34+
exec_result compile_result
35+
--
36+
2.43.0

0 commit comments

Comments
 (0)