linux-tools: don't build perf when GPLv3 in INCOMPATIBLE_LICENSE
As binutils is required by perf to build and is GPLv3 licensed adding GPLv3 to INCOMPATIBLE_LICENSE will cause linux-yocto to be skipped. Long term we should look at moving perf to a separate recipe but as a short term solution this patch will ensure that when GPLv3 is in INCOMPATIBLE_LICENSE perf is not built and it's dependencies are not added to build. Fixes [YOCTO #1879] (From OE-Core rev: ce61f9031b54067bffa304dab90c31278631dcdf) (From OE-Core rev: 8c1a2fa) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
686345f1d0
commit
e3afb1ebc8
|
@ -1,17 +1,27 @@
|
|||
# included by kernel recipes if they want to build/provide
|
||||
# perf functionality from their tree.
|
||||
do_compile_perf_libc-uclibc () {
|
||||
:
|
||||
}
|
||||
do_install_perf_libc-uclibc () {
|
||||
:
|
||||
}
|
||||
do_compile_perf() {
|
||||
oe_runmake -C ${S}/tools/perf CC="${CC}" LD="${LD}" prefix=${prefix} NO_NEWT=1 NO_DWARF=1
|
||||
|
||||
BUILDPERF = "yes"
|
||||
BUILDPERF_libc-uclibc = "no"
|
||||
# perf requires binutils which is GPLv3 licensed, don't prevent the entire kernel
|
||||
# being built if GPLv3 is in INCOMPATIBLE_LICENSE
|
||||
python () {
|
||||
if ((d.getVar("INCOMPATIBLE_LICENSE", True) or "").find("GPLv3") != -1):
|
||||
# GPLv3, drop perf
|
||||
d.setVar("BUILDPERF", "no")
|
||||
d.setVar("PERFDEPENDS", "")
|
||||
}
|
||||
|
||||
fakeroot do_install_perf() {
|
||||
do_compile_perf () {
|
||||
if [ "${BUILDPERF}" = "yes" ]; then
|
||||
oe_runmake -C ${S}/tools/perf CC="${CC}" LD="${LD}" prefix=${prefix} NO_NEWT=1 NO_DWARF=1
|
||||
fi
|
||||
}
|
||||
|
||||
fakeroot do_install_perf () {
|
||||
if [ "${BUILDPERF}" = "yes" ]; then
|
||||
oe_runmake -C ${S}/tools/perf CC="${CC}" LD="${LD}" prefix=${prefix} DESTDIR=${D} install NO_NEWT=1 NO_DWARF=1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
@ -26,5 +36,6 @@ PERFDEPENDS = "virtual/${MLPREFIX}libc:do_populate_sysroot ${MLPREFIX}elfutils:d
|
|||
PERFDEPENDS_libc-uclibc = ""
|
||||
PERFRDEPENDS = "python perl elfutils"
|
||||
PERFRDEPENDS_libc-uclibc = ""
|
||||
|
||||
do_compile_perf[depends] = "${PERFDEPENDS}"
|
||||
RDEPENDS_perf += "${PERFRDEPENDS}"
|
||||
|
|
|
@ -20,7 +20,7 @@ SRCREV_machine_qemux86-64 = "af2bfbe5f757361b5b027a24d67a93bfdfaaf33c"
|
|||
SRCREV_machine = "4ae8f8605c81c39b959948e23f7123294a5dfb3f"
|
||||
SRCREV_meta = "aeea99683c7283f1f3320bf2ee7085ee252d4e7e"
|
||||
|
||||
PR = "r21"
|
||||
PR = "r22"
|
||||
PV = "${LINUX_VERSION}+git${SRCPV}"
|
||||
|
||||
SRC_URI = "git://git.yoctoproject.org/linux-yocto-2.6.37;protocol=git;nocheckout=1;branch=${KBRANCH},meta;name=machine,meta"
|
||||
|
|
Loading…
Reference in New Issue