yocto: Use tools from sysroot before system PATH (again)
authorPhilippe Coval <philippe.coval@osg.samsung.com>
Fri, 16 Sep 2016 18:22:03 +0000 (20:22 +0200)
committerPhil Coval <philippe.coval@osg.samsung.com>
Sun, 8 Jan 2017 15:07:51 +0000 (15:07 +0000)
commit1085512bc103e987d95a43063e6552f39acd40f2
treedc5e1a5dfd020e1a4935b04ac9b6477a642e467d
parent2921e7e84601e989e242a56d31970ecc3dd5cbd4
yocto: Use tools from sysroot before system PATH (again)

Reintroduce existing change that was (wrongly?) removed in:

https://gerrit.iotivity.org/gerrit/#/c/12029/64/build_common/SConscript

Original review at:

https://gerrit.iotivity.org/gerrit/11935

To ensure reproductibily Scons avoids to rely on environment
 but some systems like Yocto are defining their own cross compiling env.

To deal with those orthogonal paradigms,
 a new CONFIG_ENVIRONMENT_IMPORT variable has been introduced,
 It enables import of needed variables (PATH and pkg-config's ones).

Without this change, system tools might be used by scons
 instead of looking into yocto's sysroot.
 This is not not wanted and may be less reproductible.

This problem was noticed when building Ostro OS
 (on a system without all Yocto dependencies)
 reported error messages were:

  | sh: gdbus-codegen: command not found
  | /bin/sh: 1: pkg-config: not found

More information about using SCONS along Yocto, check some notes at:

https://bitbucket.org/scons/scons/wiki/Notes

Bug: https://jira.iotivity.org/browse/IOT-1219
Change-Id: I6af59a590f8be489398623d29cf85c2f00000002
Origin: https://github.com/TizenTeam/iotivity/tree/sandbox/pcoval/on/master/mine
Thanks-to: Mikko Ylinen <mikko.ylinen@intel.com>
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/16225
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Kishen Maloor <kishen.maloor@intel.com>
build_common/SConscript