[eclipse-yocto] [PATCH 2/2] o.y.cmake.managedbuilder: fix broken cmake toolchain file
Tim Orling
ticotimo at gmail.com
Thu Aug 9 07:49:56 PDT 2018
merged to oxygen-master and oxygen/sumo. Thank you.
On Fri, May 18, 2018 at 1:03 AM Chin Huat Ang <chin.huat.ang at intel.com>
wrote:
> The generated toolchain.cmake file was misconfigured to build using
> toolchain from OECORE_TARGET_SYSROOT which led to spurious cmake error
> claiming the toolchain is broken.
>
> The solution is to make sure cmake never looks for programs in
> OECORE_TARGET_SYSROOT, also CMAKE_FIND_ROOT_PATH now only contains
> OECORE_TARGET_SYSROOT so that only target's libraries and include files
> are used.
>
> [YOCTO #12714]
> [YOCTO #12483]
>
> Signed-off-by: Chin Huat Ang <chin.huat.ang at intel.com>
> ---
> .../org/yocto/cmake/managedbuilder/YoctoCMakeMakefileGenerator.java | 5
> ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git
> a/plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/YoctoCMakeMakefileGenerator.java
> b/plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/YoctoCMakeMakefileGenerator.java
> index cac6b84..ac12463 100644
> ---
> a/plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/YoctoCMakeMakefileGenerator.java
> +++
> b/plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/YoctoCMakeMakefileGenerator.java
> @@ -228,8 +228,7 @@ public class YoctoCMakeMakefileGenerator implements
> IManagedBuilderMakefileGener
> toolchainCMakeFileContentAsString += "# only search in the
> paths provided so cmake doesnt pick\n"; //$NON-NLS-1$
> toolchainCMakeFileContentAsString += "# up libraries and
> tools from the native build machine\n"; //$NON-NLS-1$
>
> - List<String> findRootPathValues =
> Arrays.asList("OECORE_NATIVE_SYSROOT", //$NON-NLS-1$
> -
> "OECORE_TARGET_SYSROOT", //$NON-NLS-1$
> + List<String> findRootPathValues =
> Arrays.asList("OECORE_TARGET_SYSROOT", //$NON-NLS-1$
>
> "STAGING_DIR_HOST", //$NON-NLS-1$
>
> "STAGING_DIR_NATIVE", //$NON-NLS-1$
>
> "CROSS_DIR", //$NON-NLS-1$
> @@ -238,7 +237,7 @@ public class YoctoCMakeMakefileGenerator implements
> IManagedBuilderMakefileGener
>
> "EXTERNAL_TOOLCHAIN"); //$NON-NLS-1$
> toolchainCMakeFileContentAsString +=
> createCMakeSetStatement("CMAKE_FIND_ROOT_PATH",
> getFindRootPath(findRootPathValues), null); //$NON-NLS-1$
>
> - toolchainCMakeFileContentAsString +=
> createCMakeSetStatement("CMAKE_FIND_ROOT_PATH_MODE_PROGRAM", "ONLY", null);
> //$NON-NLS-1$ //$NON-NLS-2$
> + toolchainCMakeFileContentAsString +=
> createCMakeSetStatement("CMAKE_FIND_ROOT_PATH_MODE_PROGRAM", "NEVER",
> null); //$NON-NLS-1$ //$NON-NLS-2$
> toolchainCMakeFileContentAsString +=
> createCMakeSetStatement("CMAKE_FIND_ROOT_PATH_MODE_LIBRARY", "ONLY", null);
> //$NON-NLS-1$ //$NON-NLS-2$
> toolchainCMakeFileContentAsString +=
> createCMakeSetStatement("CMAKE_FIND_ROOT_PATH_MODE_INCLUDE", "ONLY", null);
> //$NON-NLS-1$ //$NON-NLS-2$
> toolchainCMakeFileContentAsString += "\n"; //$NON-NLS-1$
> --
> 2.7.4
>
> _______________________________________________
> eclipse-yocto mailing list
> eclipse-yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/eclipse-yocto
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/eclipse-yocto/attachments/20180809/62ed3c17/attachment.html>
More information about the eclipse-yocto
mailing list