kumquat-buildroot/support
Frank Vanbever 8b87b66815 support/cmake: Explicitly set CMAKE_SYSTEM
Some packages test for CMAKE_SYSTEM explicitly[1]

CMAKE_SYSTEM is comprised of CMAKE_SYSTEM_NAME and CMAKE_SYSTEM_VERSION.
It defaults to CMAKE_SYSTEM_NAME if CMAKE_SYSTEM_VERSION is not set[2]

At the point CMAKE_SYSTEM_NAME is set to "Linux" CMAKE_SYSTEM is already
constructed. Setting it explicitly ensures that it is the correct value.

This is because we do set CMAKE_SYSTEM_NAME twice, in fact:

  - first in toolchainfile.cmake, so that we tell cmake to use the
    "Buildroot" platform,

  - second, in the Buildroot.cmake platform definition itself, so that
    we eventually behave like the Linux platform.

We also set CMAKE_SYSTEM_VERSION to 1, and so the real CMAKE_SYSTEM
value should be set to Linux-1 if we were to follow the documentation to
the letter.

However, for Linux, the version does not matter, and in some situations
may even be harmful (that was reported in one of the commits that
introduce Buildroot.cmake and toolchainfile.cmake).

[1] Fluidsynth 0cd44d00e1/CMakeLists.txt (L80)
[2] https://cmake.org/cmake/help/git-master/variable/CMAKE_SYSTEM.html#variable:CMAKE_SYSTEM

Signed-off-by: Frank Vanbever <frank.vanbever@mind.be>
Acked-by: Yann E. MORIN <yann.morin.1998@free.fr>
[Peter: update commit message with description from Yann]
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>

(cherry picked from commit 07f31ee263)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2019-08-30 22:33:52 +02:00
..
config-fragments config-fragments: drop old crosstool-ng toolchains 2019-03-04 16:26:20 +01:00
dependencies support/dependencies: Add hint for ArchLinux when host needs IA32 libs 2019-05-26 11:10:27 +02:00
docker support/docker: use the distro-provided flake8 2018-06-17 20:54:02 +02:00
download support/download/git: fix formatting of error message 2019-06-24 21:11:26 +02:00
gnuconfig support/gnuconfig/config.sub: add C-SKY support 2019-06-06 17:18:47 +02:00
kconfig support/kconfig/merge_config.sh: avoid false positive matches from comment lines 2018-11-24 10:11:15 +01:00
legal-info legal-info: add hash for our own license file 2017-07-05 16:31:40 +02:00
libtool
misc support/cmake: Explicitly set CMAKE_SYSTEM 2019-08-30 22:33:52 +02:00
scripts support/scripts/check-bin-arch: ignore /usr/lib/grub 2019-06-06 09:41:15 +02:00
testing support/testing/infra/emulator: increase memory size used by Qemu 2019-06-24 21:56:13 +02:00