[Buildroot] [PATCH] infra/pkg-cmake: use an obviously-invalid value for CMAKE_SYSTEM_VERSION

Thomas Petazzoni thomas.petazzoni at bootlin.com
Mon Jan 14 21:22:54 UTC 2019


Hello,

On Sun, 13 Jan 2019 10:52:19 +0100, Yann E. MORIN wrote:

> diff --git a/package/pkg-cmake.mk b/package/pkg-cmake.mk
> index dd048b0949..50ae2b982a 100644
> --- a/package/pkg-cmake.mk
> +++ b/package/pkg-cmake.mk
> @@ -264,7 +264,7 @@ define TOOLCHAIN_CMAKE_INSTALL_FILES
>  		-e 's#@@TARGET_CC@@#$(subst $(HOST_DIR)/,,$(call qstrip,$(TARGET_CC)))#' \
>  		-e 's#@@TARGET_CXX@@#$(subst $(HOST_DIR)/,,$(call qstrip,$(TARGET_CXX)))#' \
>  		-e 's#@@TARGET_FC@@#$(subst $(HOST_DIR)/,,$(call qstrip,$(TARGET_FC)))#' \
> -		-e 's#@@CMAKE_SYSTEM_VERSION@@#$(call qstrip,$(BR2_TOOLCHAIN_HEADERS_AT_LEAST))#' \
> +		-e 's#@@CMAKE_SYSTEM_VERSION@@#1#' \

Using a 'sed' replacement just to encode a hardcoded value in the
destination file seems a bit useless.

What about:

set(CMAKE_SYSTEM_VERSION 1)

in ./support/misc/toolchainfile.cmake.in instead ?

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



More information about the buildroot mailing list