Skip to contentSkip to conversation

What symbol contains the current sysroot?

DISCUSSION Paul D. DeRocco 2 participants 2 messages Aug 23, 2013

lore
Share & tools
lore
#0 lore raw

In a do_compile script within a recipe, what symbol can I use to refer to the sysroot in effect during the execution? And whatever it is, is it a real environment variable, or some symbol that is substituted by bitbake before executing the script?

Signature · 2 lines
Ciao,               Paul D. DeRocco
Paul                mailto:[email protected] 
#1 lore raw
Quoted 5 lines · Paul D. DeRocco

In a do_compile script within a recipe, what symbol can I use to refer to the sysroot in effect during the execution? And whatever it is, is it a real environment variable, or some symbol that is substituted by bitbake before executing the script?

in the .bb file you can use ${STAGING_DIR_TARGET} which gives you the sysroot.

this variable will be expanded/substituted when bitbake generates the run.do_compile script to its actual full path.

if you want/need an env variable, you have to set it:

export FOOBAR = "${STAGING_DIR_TARGET}"

then you can use FOOBAR.