]> xenbits.xensource.com Git - people/liuw/xen.git/commitdiff
tools: add link path flag for local build to pkg-config files
authorJuergen Gross <jgross@suse.com>
Thu, 21 Feb 2019 17:36:13 +0000 (18:36 +0100)
committerWei Liu <wei.liu2@citrix.com>
Wed, 6 Mar 2019 13:11:15 +0000 (13:11 +0000)
The qemu build process is requiring the link path of Xen libraries
to be specified both with -L and -Wl,-rpath-link. Add the -L flag
to the local pkg-config files.

At the same time let the pkg-config files depend on the Makefile
creating them, too.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/Rules.mk

index 68f2ed7ce10fec45f77a3ef82fe8489777edf85a..f5613f73a753e6869e984c3b6ade29c59cc183a2 100644 (file)
@@ -262,7 +262,7 @@ PKG_CONFIG_DIR ?= $(XEN_ROOT)/tools/pkg-config
 
 PKG_CONFIG_FILTER = $(foreach l,$(PKG_CONFIG_REMOVE),-e 's!\([ ,]\)$(l),!\1!g' -e 's![ ,]$(l)$$!!g')
 
-$(PKG_CONFIG_DIR)/%.pc: %.pc.in Makefile
+$(PKG_CONFIG_DIR)/%.pc: %.pc.in Makefile $(XEN_ROOT)/tools/Rules.mk
        mkdir -p $(PKG_CONFIG_DIR)
        @sed -e 's!@@version@@!$(PKG_CONFIG_VERSION)!g' \
             -e 's!@@prefix@@!$(PKG_CONFIG_PREFIX)!g' \
@@ -271,10 +271,10 @@ $(PKG_CONFIG_DIR)/%.pc: %.pc.in Makefile
             -e 's!@@firmwaredir@@!$(XENFIRMWAREDIR)!g' \
             -e 's!@@libexecbin@@!$(LIBEXEC_BIN)!g' \
             -e 's!@@cflagslocal@@!$(PKG_CONFIG_CFLAGS_LOCAL)!g' \
-            -e 's!@@libsflag@@!-Wl,-rpath-link=!g' \
+            -e 's!@@libsflag@@\([^ ]*\)!-L\1 -Wl,-rpath-link=\1!g' \
             $(PKG_CONFIG_FILTER) < $< > $@
 
-%.pc: %.pc.in Makefile
+%.pc: %.pc.in Makefile $(XEN_ROOT)/tools/Rules.mk
        @sed -e 's!@@version@@!$(PKG_CONFIG_VERSION)!g' \
             -e 's!@@prefix@@!$(PKG_CONFIG_PREFIX)!g' \
             -e 's!@@incdir@@!$(PKG_CONFIG_INCDIR)!g' \