[OE-core] [PATCH] nativesdk-cmake: fix cmake toolchain file path

Burton, Ross ross.burton at intel.com
Thu Jul 12 16:50:17 UTC 2018


Hi,

I'd suggest that this is unfortunate fallout from the change to the
default cmake packaging (I ran a large build and did a
buildhistory-diff, but didn't consider nativesdk), but cmake itself is
an exception and should put ${datadir}/cmake into PN explicitly.

Ross

On 12 July 2018 at 02:13, Chin Huat Ang <chin.huat.ang at intel.com> wrote:
> The SDK cmake is currently broken as the cmake.sh (sourced via environment-
> setup script) sets cmake alias which looks for cmake toolchain file
> $OECORE_NATIVE_SYSROOT/usr/share/OEToolchainConfig.cmake which cannot be
> found as the file is packaged into nativesdk-cmake-dev package that is not
> installed as part of SDK by default.
>
> The solution here is to move OEToolchainConfig.cmake to a different path which
> doesn't get packaged up in -dev package, in this case the same directory as
> cmake.sh which depends on it.
>
> Both qemux86 and qemuarm64 core-image-sato SDK's cmake has been tested to work
> with this fix to make sure that OEToolchainConfig.cmake does not have target
> architecture specific cmake toolchain settings.
>
> [YOCTO #12827]
>
> Signed-off-by: Chin Huat Ang <chin.huat.ang at intel.com>
> ---
>  meta/recipes-devtools/cmake/cmake/environment.d-cmake.sh | 2 +-
>  meta/recipes-devtools/cmake/cmake_3.11.4.bb              | 4 +---
>  2 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/meta/recipes-devtools/cmake/cmake/environment.d-cmake.sh b/meta/recipes-devtools/cmake/cmake/environment.d-cmake.sh
> index 0eb56b6..be7f2b6 100644
> --- a/meta/recipes-devtools/cmake/cmake/environment.d-cmake.sh
> +++ b/meta/recipes-devtools/cmake/cmake/environment.d-cmake.sh
> @@ -1 +1 @@
> -alias cmake="cmake -DCMAKE_TOOLCHAIN_FILE=$OECORE_NATIVE_SYSROOT/usr/share/cmake/OEToolchainConfig.cmake"
> +alias cmake="cmake -DCMAKE_TOOLCHAIN_FILE=$OECORE_NATIVE_SYSROOT/environment-setup.d/OEToolchainConfig.cmake"
> diff --git a/meta/recipes-devtools/cmake/cmake_3.11.4.bb b/meta/recipes-devtools/cmake/cmake_3.11.4.bb
> index 3f8fd7a..7ef5740 100644
> --- a/meta/recipes-devtools/cmake/cmake_3.11.4.bb
> +++ b/meta/recipes-devtools/cmake/cmake_3.11.4.bb
> @@ -35,10 +35,8 @@ EXTRA_OECMAKE=" \
>  "
>
>  do_install_append_class-nativesdk() {
> -    mkdir -p ${D}${datadir}/cmake
> -    install -m 644 ${WORKDIR}/OEToolchainConfig.cmake ${D}${datadir}/cmake/
> -
>      mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d
> +    install -m 644 ${WORKDIR}/OEToolchainConfig.cmake ${D}${SDKPATHNATIVE}/environment-setup.d/OEToolchainConfig.cmake
>      install -m 644 ${WORKDIR}/environment.d-cmake.sh ${D}${SDKPATHNATIVE}/environment-setup.d/cmake.sh
>  }
>
> --
> 2.7.4
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core



More information about the Openembedded-core mailing list