diff options
author | Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> | 2019-01-11 00:05:28 +0100 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@bootlin.com> | 2019-01-12 16:06:51 +0100 |
commit | 36568732e40923d19274f1c997e278a1c4e6c99e (patch) | |
tree | 8629a911967a2f6501b25a1e70bcbb00f51353ad /support | |
parent | 147f833692fe02d3b5b5907f508491d773927c19 (diff) | |
download | buildroot-36568732e40923d19274f1c997e278a1c4e6c99e.tar.gz buildroot-36568732e40923d19274f1c997e278a1c4e6c99e.zip |
package/pkg-cmake: add CMAKE_SYSTEM_VERSION to toolchainfile.cmake
Quoting the CMake documentation:
When the CMAKE_SYSTEM_NAME variable is set explicitly to enable cross
compiling then the value of CMAKE_SYSTEM_VERSION must also be set
explicitly to specify the target system version.
Thus, we should also set CMAKE_SYSTEM_VERSION in toolchainfile.cmake. It
is supposed to be set to the value of `uname -r` on the target. We don't
have that exact value available (unless we build the kernel), but the
value of BR2_TOOLCHAIN_HEADERS_AT_LEAST contains the (minimum) version
of the kernel it will run on, so it should be OK for all practical
purposes.
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Cc: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Diffstat (limited to 'support')
-rw-r--r-- | support/misc/toolchainfile.cmake.in | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/support/misc/toolchainfile.cmake.in b/support/misc/toolchainfile.cmake.in index 6f3c8ca971..276b36629f 100644 --- a/support/misc/toolchainfile.cmake.in +++ b/support/misc/toolchainfile.cmake.in @@ -15,6 +15,7 @@ string(REPLACE "/share/buildroot" "" RELOCATED_HOST_DIR ${CMAKE_CURRENT_LIST_DIR list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) set(CMAKE_SYSTEM_NAME Buildroot) +set(CMAKE_SYSTEM_VERSION @@CMAKE_SYSTEM_VERSION@@) set(CMAKE_SYSTEM_PROCESSOR @@CMAKE_SYSTEM_PROCESSOR@@) # Set the {C,CXX}FLAGS appended by CMake depending on the build type |