mirror of
https://git.yoctoproject.org/poky
synced 2026-02-10 02:33:02 +01:00
The previous ccache.bbclass has the following problems:
- It uses host's ccache for native recipes, but this may not work on some
hosts, for example, it nerver works on my Ubuntu 14.04.4, there are always
build failures (m4-native failed at do_configure, and others will also be
failed if I disable CCACHE for m4-native)
- native/nativesdk/cross/crosssdk recipes use host's ccache, but target uses
ccache-native, this may confuse user.
- The target recipes may use both host's ccache and ccache-native, this may
cause unexpected problems and be hard to debug. This is because ccache-native is
in SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS, so ccache-native may not be present when
rebuild target recipes, and then it would use hosttools/ccache, but the
previous ccache files were generated by ccache-native.
- Target recipes can't use ccache when no ccache is installed on the host:
CCACHE = "${@bb.utils.which(d.getVar('PATH'), 'ccache') and 'ccache '}"
After refactored:
All types recipes (native, target and others) will use ccache-native except
ccache-native itself, host's cache won't be used any more. It is more
reliable now, which will work everywhere when ccache-native can be built.
And now we need use "CCACHE_DISABLE = '1'" to disable ccache for the recipe
rather than "CCACHE = ''" since we set CCACHE in anonymous function, and
d.getVar('CCACHE') works after "CCACHE ??=" which is set in bitbake.conf, so we
can't check whether CCACHE is set or not in anonymous function since it is
always set. Use CCACHE_DISABLE to disable it would be more clear.
(From OE-Core rev: b25271b65262f70d849a4861da216c9be6c54d53)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
99 lines
3.0 KiB
Plaintext
99 lines
3.0 KiB
Plaintext
# We have a conf and classes directory, add to BBPATH
|
|
BBPATH .= ":${LAYERDIR}"
|
|
# We have recipes-* directories, add to BBFILES
|
|
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb"
|
|
|
|
BBFILE_COLLECTIONS += "core"
|
|
BBFILE_PATTERN_core = "^${LAYERDIR}/"
|
|
BBFILE_PRIORITY_core = "5"
|
|
|
|
LAYERSERIES_CORENAMES = "thud"
|
|
|
|
# This should only be incremented on significant changes that will
|
|
# cause compatibility issues with other layers
|
|
LAYERVERSION_core = "11"
|
|
LAYERSERIES_COMPAT_core = "thud"
|
|
|
|
BBLAYERS_LAYERINDEX_NAME_core = "openembedded-core"
|
|
|
|
# Set a variable to get to the top of the metadata location
|
|
COREBASE = '${@os.path.normpath("${LAYERDIR}/../")}'
|
|
|
|
# opkg-utils is for update-alternatives :(
|
|
SIGGEN_EXCLUDERECIPES_ABISAFE += " \
|
|
sysvinit-inittab \
|
|
busybox-inittab \
|
|
shadow-securetty \
|
|
opkg-arch-config \
|
|
netbase \
|
|
init-ifupdown \
|
|
connman-conf \
|
|
formfactor \
|
|
xserver-xf86-config \
|
|
pointercal-xinput \
|
|
base-files \
|
|
keymaps \
|
|
udev-extraconf \
|
|
packagegroup-x11-xserver \
|
|
systemd-serialgetty \
|
|
initscripts \
|
|
shadow \
|
|
shadow-sysroot \
|
|
base-passwd \
|
|
opkg-utils \
|
|
gstreamer1.0-meta-base \
|
|
ca-certificates \
|
|
"
|
|
|
|
SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += " \
|
|
*->quilt-native \
|
|
*->subversion-native \
|
|
*->git-native \
|
|
*->icecc-create-env-native \
|
|
gcc-cross-${TARGET_ARCH}->linux-libc-headers \
|
|
ppp-dialin->ppp \
|
|
resolvconf->bash \
|
|
docbook-xsl-stylesheets->perl \
|
|
ca-certificates->openssl \
|
|
initramfs-framework->${VIRTUAL-RUNTIME_base-utils} \
|
|
initramfs-framework->eudev \
|
|
initramfs-framework->systemd \
|
|
initramfs-module-install-efi->dosfstools \
|
|
initramfs-module-install-efi->e2fsprogs \
|
|
initramfs-module-install-efi->parted \
|
|
initramfs-module-install-efi->util-linux \
|
|
initramfs-module-install->e2fsprogs \
|
|
initramfs-module-install->grub \
|
|
initramfs-module-install->parted \
|
|
initramfs-module-install->util-linux \
|
|
grub-efi->grub-bootconf \
|
|
liberation-fonts->fontconfig \
|
|
cantarell-fonts->fontconfig \
|
|
gnome-icon-theme->librsvg \
|
|
font-alias->font-util \
|
|
systemd-boot->systemd-bootconf \
|
|
systemd->systemd-conf \
|
|
weston->weston-conf \
|
|
weston-init->weston \
|
|
weston-init->kbd \
|
|
"
|
|
|
|
# Avoid adding bison-native to the sysroot without a specific
|
|
# dependency in the recipe. This means indirect dependencies
|
|
# (e.g. X -> Y -> binutils-cross -> bison-native) no longer meet the
|
|
# dependency incidentally. This improves determinism and avoids build
|
|
# failures when people switch to external toolchains.
|
|
SSTATE_EXCLUDEDEPS_SYSROOT += ".*->bison-native"
|
|
# Nothing needs to depend on libc-initial/gcc-cross-initial
|
|
# base-passwd/shadow-sysroot don't need their dependencies
|
|
SSTATE_EXCLUDEDEPS_SYSROOT += "\
|
|
.*->.*-initial.* \
|
|
.*(base-passwd|shadow-sysroot)->.* \
|
|
"
|
|
# Avoid adding autoconf-archive-native to sysroot without a specific
|
|
# dependency in the recipe.
|
|
SSTATE_EXCLUDEDEPS_SYSROOT += ".*->autoconf-archive-native"
|
|
|
|
# We need to keep bitbake tools in PATH
|
|
PATH := "${@os.path.dirname(bb.utils.which(d.getVar('PATH'),'bitbake'))}:${HOSTTOOLS_DIR}"
|