The oe-core/poky change 'base.bbclass wipe ${S} before unpacking
source' (poky: a56fb90dc3805494eeaf04c60538425e8d52efc5, oe-core:
eccae514b71394ffaed8fc45dea7942152a334a1) wipes ${S} in do_unpack prior
to unpacking. This breaks our shared source as we set ${S} to the shared
location, and don't actually unpack anything (the result is we try to
build rustc without any source code, which fails predictably)
Avoid this by clearing do_unpack[cleandirs].
At the same time take pieces of gcc-shared-source.inc and note how & why
we differ from how gcc operates.
This is a bit of a hack, and only happens to work because we know the
exact method that do_unpack uses to clear ${S}, and using python()
happens to get called at the "right time".
24 lines
823 B
Plaintext
24 lines
823 B
Plaintext
# gcc's shared source code disables fetch (via the commented code below). We
|
|
# can't do that because rust.bb currently fetches a rustc-snapshot archive itself.
|
|
#do_fetch() {
|
|
# :
|
|
#}
|
|
#do_fetch[noexec] = "1"
|
|
|
|
# gcc does `deltask` do_unpack. We avoid this so that the depends work sanely
|
|
# (things that need source code can still be ordered after do_unpack).
|
|
# As a side effect, we can also unpack things that aren't shared.
|
|
# Note: just setting this normally doesn't work. Use of python() is required.
|
|
python () {
|
|
d.setVarFlag('do_unpack', 'cleandirs', '')
|
|
}
|
|
# Avoid disabling do_patch for the same reason.
|
|
#deltask do_patch
|
|
|
|
SRC_URI = ""
|
|
|
|
S = "${TMPDIR}/work-shared/${SOURCE_NAME}-${PV}-${PR}"
|
|
|
|
do_unpack[depends] += "${SOURCE_NAME}-source-${PV}:do_patch"
|
|
do_populate_lic[depends] += "${SOURCE_NAME}-source-${PV}:do_unpack"
|