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>