diff options
author | Bernd Kuhls <bernd.kuhls@t-online.de> | 2022-07-10 13:50:13 +0200 |
---|---|---|
committer | Bernd Kuhls <bernd.kuhls@t-online.de> | 2022-07-12 22:43:17 +0200 |
commit | 6f82abb4bb588652e939b6cb53c692a7586d03a1 (patch) | |
tree | 9d7881fc3b9da0eec3e3929bd119b2f282b7155a /cmake | |
parent | 0172d460c6a3121aa4049074e642005bf492c083 (diff) |
[cmake] Allow specifying HOST_CAN_EXECUTE_TARGET
Executing the target binary will not work when cross-compiling to a
uClibc-based target on a glibc-based host.
https://github.com/xbmc/xbmc/commit/b9a0c7b1f402613e96876ccfec316831801352bd
broke cross-compiling in this case:
-- Found Python3: /home/buildroot/buildroot/output/per-package/kodi/host/x86_64-buildroot-linux-uclibc/sysroot/usr/include/python3.10
(found suitable exact version "3.10.5") found components: Development Development.Module Development.Embed
-- Could NOT find Python3 (missing: Interpreter) (Required is exact version "3.10")
Reason given by package:
Interpreter: Cannot run the interpreter
"/home/buildroot/buildroot/output/per-package/kodi/host/x86_64-buildroot-linux-uclibc/sysroot/usr/bin/python3.10"
$ file /home/buildroot/buildroot/output/per-package/kodi/host/x86_64-buildroot-linux-uclibc/sysroot/usr/bin/python3.10
/home/buildroot/buildroot/output/per-package/kodi/host/x86_64-buildroot-linux-uclibc/sysroot/usr/bin/python3.10:
ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/ld64-uClibc.so.0, not stripped
This patch allows to force -DHOST_CAN_EXECUTE_TARGET=FALSE to avoid
executing the target version of python3 although the host version was set
in configure options:
-DPYTHON_EXECUTABLE=/home/buildroot/buildroot/output/per-package/kodi/host/bin/python3.10
$ file /home/buildroot/buildroot/output/per-package/kodi/host/bin/python3.10
/home/buildroot/buildroot/output/per-package/kodi/host/bin/python3.10:
ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2,
BuildID[sha1]=0502eef4c126feb4162aea6d36f321387f2a58fc, for GNU/Linux 3.2.0, with debug_info, not stripped
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/scripts/common/ArchSetup.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/scripts/common/ArchSetup.cmake b/cmake/scripts/common/ArchSetup.cmake index 97a09b4433..a59fcb52f7 100644 --- a/cmake/scripts/common/ArchSetup.cmake +++ b/cmake/scripts/common/ArchSetup.cmake @@ -59,7 +59,7 @@ endif() # this variable is set if we can execute build artefacts on the host system (for example unit tests). if(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL CMAKE_SYSTEM_PROCESSOR AND CMAKE_HOST_SYSTEM_NAME STREQUAL CMAKE_SYSTEM_NAME) - if(NOT HOST_CAN_EXECUTE_TARGET) + if(NOT DEFINED HOST_CAN_EXECUTE_TARGET) set(HOST_CAN_EXECUTE_TARGET TRUE) endif() else() |