Skip to contentSkip to conversation

tools: add link path flag for local build to pkg-config files

PATCH In review Juergen Gross 2 participants 6 messages Feb 21, 2019 – Feb 22, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools: add link path flag for local build to pkg-config files

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.

---
 tools/Rules.mk | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
tools/Rules.mk +3 -3
index 68f2ed7ce1..f5613f73a7 100644
@@ -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' \
Signature · 7 lines
2.16.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Juergen Gross

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.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#2 lore raw
In reply to Juergen Gross

CC Anthony

Quoted 41 lines · Juergen Gross

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.

---
 tools/Rules.mk | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
tools/Rules.mk +3 -3
index 68f2ed7ce1..f5613f73a7 100644
@@ -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' \
Signature · 1 line
2.16.4

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#3 lore raw
In reply to Juergen Gross
Quoted 8 lines · Juergen Gross

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.

Juergen, do you want this in 4.12?

Wei.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#4 lore raw
Quoted 11 lines · Wei Liu
Quoted 8 lines · Juergen Gross

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.

Juergen, do you want this in 4.12?

Hmm, why? Does it repair any build error in 4.12? I don't think so. It will help for further development (e.g. removing the explicit include paths and libraries added to the qemu configure call), but this won't happen in 4.12.

Juergen

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#5 lore raw
Quoted 9 lines · Juergen Gross
Quoted 8 lines · Wei Liu
Quoted 7 lines · Juergen Gross

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.

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

Juergen, do you want this in 4.12?

Hmm, why? Does it repair any build error in 4.12? I don't think so. It will help for further development (e.g. removing the explicit include paths and libraries added to the qemu configure call), but this won't happen in 4.12.

Thanks for confirming.

Wei.

Quoted 3 lines

Juergen

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel