Files
meta-openembedded/meta-oe/recipes-test/pm-qa/pm-qa_git.bb
T
mark.yang a0b88afd79 pm-qa: fix build with gcc-15.0.1
* fix following error:
  http://errors.yoctoproject.org/Errors/Details/850314
    utils/uevent_reader.c: In function 'main':
    utils/uevent_reader.c:33:24: error: passing argument 2 of 'signal' from incompatible pointer type [-Wincompatible-pointer-types]
    33 |         signal(SIGINT, exit_handler);
        |                        ^~~~~~~~~~~~
        |                        |
        |                        void (*)(void)
    In file included from utils/uevent_reader.c:4:
    TOPDIR/tmp/work/core2-64-oe-linux/pm-qa/0.5.2/recipe-sysroot/usr/include/signal.h:88:57: note: expected '__sighandler_t' {aka 'void (*)(int)'} but argument is of type 'void (*)(void)'
    88 | extern __sighandler_t signal (int __sig, __sighandler_t __handler)
        |                                          ~~~~~~~~~~~~~~~^~~~~~~~~
    utils/uevent_reader.c:15:6: note: 'exit_handler' declared here
    15 | void exit_handler()
        |      ^~~~~~~~~~~~
    TOPDIR/tmp/work/core2-64-oe-linux/pm-qa/0.5.2/recipe-sysroot/usr/include/signal.h:72:16: note: '__sighandler_t' declared here
    72 | typedef void (*__sighandler_t) (int);
        |                ^~~~~~~~~~~~~~
    make: *** [<builtin>: utils/uevent_reader] Error 1

  Set PATCHTOOL to git because this recipe compiles all .c files including those in .pc/ directory which causes build errors.
  .pc/0001-fix-build-with-gcc-15-Wincompatible-pointer-types-er.patch/utils/uevent_reader.c:15:6: note: 'exit_handler' declared here
   15 | void exit_handler()

Signed-off-by: mark.yang <mark.yang@lge.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-04-02 07:27:48 -07:00

75 lines
2.2 KiB
BlitzBasic

DESCRIPTION = "Utilities for testing Power Management"
HOMEPAGE = "https://wiki.linaro.org/WorkingGroups/PowerManagement/Resources/TestSuite/PmQa"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
PV = "0.5.2"
BRANCH ?= "master"
SRCREV = "05710ec5032be4c8edafb4109d4d908d31243906"
SRC_URI = " \
git://git.linaro.org/power/pm-qa.git;protocol=git;branch=${BRANCH} \
file://0001-fix-build-with-gcc-15-Wincompatible-pointer-types-er.patch \
"
S = "${WORKDIR}/git"
CFLAGS += "-pthread"
PATCHTOOL = "git"
do_compile () {
# Find all the .c files in this project and build them.
for x in `find . -name "*.c"`
do
util=`echo ${x} | sed s/.c$//`
oe_runmake ${util}
done
}
do_install () {
install -d ${D}${bindir}
install -d ${D}${libdir}/${BPN}
# Install the compiled binaries that were built in the previous step
for x in `find . -name "*.c"`
do
util=`echo ${x} | sed s/.c$//`
util_basename=`basename ${util}`
install -m 0755 ${util} ${D}${bindir}/${util_basename}
done
# Install the helper scripts in a subdirectory of $libdir
for script in `find . -name "*.sh" | grep include`
do
# Remove hardcoded relative paths
sed -i -e 's#..\/utils\/##' ${script}
sed -i -e 's#. ..\/Switches#${bindir}#g' ${script}
script_basename=`basename ${script}`
install -m 0755 $script ${D}${libdir}/${BPN}/${script_basename}
done
# Install the shell scripts NOT in the $libdir directory since those
# will be installed elsewhere
for script in `find . -name "*.sh" | grep -v include`
do
# if the script includes any helper scripts from the $libdir
# directory then change the source path to the absolute path
# to reflect the install location of the helper scripts.
sed -i -e "s#. ../include#. ${libdir}/${BPN}#g" ${script}
# Remove hardcoded relative paths
sed -i -e 's#..\/utils\/##' ${script}
script_basename=`basename ${script}`
install -m 0755 $script ${D}${bindir}/${script_basename}
done
}
RDEPENDS:${PN} += "bash"
# http://errors.yoctoproject.org/Errors/Details/186956/
COMPATIBLE_HOST:libc-musl = 'null'