title: build system derived toolchain in Yocto
body: <p>I have a problem starting from the <strong>rocko</strong> upgrade and related to the Recipe-specific Sysroots introduced in Yocto 2.3</p>
  
  <p>Our project uses cmake. So our recipe has:</p>
  
  <pre><code>DEPENDS = "cmake-native [...]"
  </code></pre>
  
  <p>So <code>cmake</code> ends up in build/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/component/1.0-r0/recipe-sysroot-native/usr/bin/cmake
  So when building inside yocto everything is ok.</p>
  
  <p>When we build outside yocto, we use the cross-toolchain generated and populated within the Build Directory:</p>
  
  <pre><code>$ bitbake meta-ide-toolchain
  </code></pre>
  
  <p>and then source the environment:  </p>
  
  <pre><code>$ source build/tmp/environment-setup-cortexa5hf-neon-poky-linux-gnueabi
  </code></pre>
  
  <p>On rocko OECORE_NATIVE_SYSROOT is set to [...]/build/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/meta-ide-support/1.0-r3/recipe-sysroot-native - which doesn't have cmake:</p>
  
  <pre><code>  $ which cmake
    $
  </code></pre>
  
  <p>So no cmake was found...</p>
  
  <p>And on Krogoth it was build/tmp/sysroots/x86_64-linux - cmake is there:  </p>
  
  <pre><code>$ which cmake
    &lt;full path&gt;/build/tmp/sysroots/x86_64-linux/usr/bin/cmake
  </code></pre>
  
  <p>How to correctly setup a toolchain derived from the build directory in order to build outside Yocto ?</p>