This is a note to let you know that I've just added the patch titled libtraceevent: Copy pkg-config file to output folder when using O= to the 5.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: libtraceevent-copy-pkg-config-file-to-output-folder-.patch and it can be found in the queue-5.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit fc62f30fcbf4a1860b13269290282eb47778ea47 Author: Sudip Mukherjee <sudipm.mukherjee@xxxxxxxxx> Date: Fri Nov 15 11:36:10 2019 +0000 libtraceevent: Copy pkg-config file to output folder when using O= [ Upstream commit 15b3904f8e884e0d34d5f09906cf6526d0b889a2 ] When we use 'O=' with make to build libtraceevent in a separate folder it still copies 'libtraceevent.pc' to its source folder. Modify the Makefile so that it uses the output folder to copy the pkg-config file and install from there. Signed-off-by: Sudipm Mukherjee <sudipm.mukherjee@xxxxxxxxx> Reviewed-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx> Cc: linux-trace-devel@xxxxxxxxxxxxxxx Link: http://lore.kernel.org/lkml/20191115113610.21493-2-sudipm.mukherjee@xxxxxxxxx Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile index d008e64042ce..ecf882308d8a 100644 --- a/tools/lib/traceevent/Makefile +++ b/tools/lib/traceevent/Makefile @@ -208,10 +208,11 @@ define do_install $(INSTALL) $(if $3,-m $3,) $1 '$(DESTDIR_SQ)$2' endef -PKG_CONFIG_FILE = libtraceevent.pc +PKG_CONFIG_SOURCE_FILE = libtraceevent.pc +PKG_CONFIG_FILE := $(addprefix $(OUTPUT),$(PKG_CONFIG_SOURCE_FILE)) define do_install_pkgconfig_file if [ -n "${pkgconfig_dir}" ]; then \ - cp -f ${PKG_CONFIG_FILE}.template ${PKG_CONFIG_FILE}; \ + cp -f ${PKG_CONFIG_SOURCE_FILE}.template ${PKG_CONFIG_FILE}; \ sed -i "s|INSTALL_PREFIX|${1}|g" ${PKG_CONFIG_FILE}; \ sed -i "s|LIB_VERSION|${EVENT_PARSE_VERSION}|g" ${PKG_CONFIG_FILE}; \ sed -i "s|LIB_DIR|${libdir}|g" ${PKG_CONFIG_FILE}; \