This ensures that in cases where the preference value changes when the
multilib override is applied, we correctly expand it in that context.
For example, for `PREFERRED_PROVIDER_${TARGET_PREFIX}gcc
= "gcc-external-cross-${TARGET_ARCH}"`, when it sets the prefixed version of
this, we want TARGET_ARCH expanded with the multilib applied, otherwise the
arch suffix will be incorrect for that context.
We ran into this trying to use preferences in meta-sourcery along with
multilibs. We worked around it there via PNBLACKLIST, but this fix should
still go into the core.
Signed-off-by: Christopher Larson <kergoth@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
# implement alternative multilib name
newname = localdata.expand("PREFERRED_PROVIDER_" + virt + p + "-" + pkg)
if not d.getVar(newname, False):
- d.setVar(newname, newval)
+ d.setVar(newname, localdata.expand(newval))
# Avoid future variable key expansion
provexp = d.expand(prov)
if prov != provexp and d.getVar(prov, False):