Skip to contentSkip to conversation

configure: Don't add Xen's libs to LDFLAGS

PATCH In review Anthony PERARD 6 participants 12 messages Jan 21, 2019 – Feb 4, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configure: Don't add Xen's libs to LDFLAGS

When Xen is detected via pkg-config, it isn't necessary to modify LDFLAGS as modifying libs_softmmu is enough.

---
 configure | 1 -
 1 file changed, 1 deletion(-)
configure +0 -1
index 12fd34f30b..98b270974d 100755
@@ -2355,7 +2355,6 @@ if test "$xen" != "no" ; then
     fi
     QEMU_CFLAGS="$QEMU_CFLAGS $($pkg_config --cflags $xen_pc)"
     libs_softmmu="$($pkg_config --libs $xen_pc) $libs_softmmu"
-    LDFLAGS="$($pkg_config --libs $xen_pc) $LDFLAGS"
   else
 
     xen_libs="-lxenstore -lxenctrl -lxenguest"
Signature · 7 lines
Anthony PERARD


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 15 lines · Anthony PERARD

When Xen is detected via pkg-config, it isn't necessary to modify LDFLAGS as modifying libs_softmmu is enough.

---
 configure | 1 -
 1 file changed, 1 deletion(-)
configure +0 -0
index 12fd34f30b..98b270974d 100755

configure if test "$xen" != "no" ; then · line 2360

Quoted 7 lines
configure +0 -1
@@ -2355,7 +2355,6 @@ if test "$xen" != "no" ; then
     fi
     QEMU_CFLAGS="$QEMU_CFLAGS $($pkg_config --cflags $xen_pc)"
     libs_softmmu="$($pkg_config --libs $xen_pc) $libs_softmmu"
-    LDFLAGS="$($pkg_config --libs $xen_pc) $LDFLAGS"
   else
 
     xen_libs="-lxenstore -lxenctrl -lxenguest"
Reviewed-by on v1 1/1
#2 lore raw
In reply to Anthony PERARD
Quoted 15 lines · Anthony PERARD

When Xen is detected via pkg-config, it isn't necessary to modify LDFLAGS as modifying libs_softmmu is enough.

---
 configure | 1 -
 1 file changed, 1 deletion(-)
configure +0 -0
index 12fd34f30b..98b270974d 100755

configure if test "$xen" != "no" ; then · line 2360

Quoted 7 lines
configure +0 -1
@@ -2355,7 +2355,6 @@ if test "$xen" != "no" ; then
     fi
     QEMU_CFLAGS="$QEMU_CFLAGS $($pkg_config --cflags $xen_pc)"
     libs_softmmu="$($pkg_config --libs $xen_pc) $libs_softmmu"
-    LDFLAGS="$($pkg_config --libs $xen_pc) $LDFLAGS"
   else
 
     xen_libs="-lxenstore -lxenctrl -lxenguest"

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

Reviewed-by on v1 1/1
#3 lore raw
In reply to Anthony PERARD
Quoted 23 lines · Anthony PERARD

When Xen is detected via pkg-config, it isn't necessary to modify LDFLAGS as modifying libs_softmmu is enough.

---
 configure | 1 -
 1 file changed, 1 deletion(-)
configure +0 -2
index 12fd34f30b..98b270974d 100755
@@ -2355,7 +2355,6 @@ if test "$xen" != "no" ; then
     fi
     QEMU_CFLAGS="$QEMU_CFLAGS $($pkg_config --cflags $xen_pc)"
     libs_softmmu="$($pkg_config --libs $xen_pc) $libs_softmmu"
-    LDFLAGS="$($pkg_config --libs $xen_pc) $LDFLAGS"
   else
 
     xen_libs="-lxenstore -lxenctrl -lxenguest"
--
Quoted 1 line

Anthony PERARD

Cc'ing MJT, who first pointed out to me that this bug was resulting in various binaries like the linux-user ones getting linked against the Xen libs unnecessarily.

thanks
-- PMM

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

Reviewed-by on v1 1/1
#4 lore raw
In reply to Anthony PERARD
Quoted 23 lines · Anthony PERARD

When Xen is detected via pkg-config, it isn't necessary to modify LDFLAGS as modifying libs_softmmu is enough.

---
 configure | 1 -
 1 file changed, 1 deletion(-)
configure +0 -2
index 12fd34f30b..98b270974d 100755
@@ -2355,7 +2355,6 @@ if test "$xen" != "no" ; then
     fi
     QEMU_CFLAGS="$QEMU_CFLAGS $($pkg_config --cflags $xen_pc)"
     libs_softmmu="$($pkg_config --libs $xen_pc) $libs_softmmu"
-    LDFLAGS="$($pkg_config --libs $xen_pc) $LDFLAGS"
   else
 
     xen_libs="-lxenstore -lxenctrl -lxenguest"
--
Quoted 1 line

Anthony PERARD

Cc'ing MJT, who first pointed out to me that this bug was resulting in various binaries like the linux-user ones getting linked against the Xen libs unnecessarily.

thanks
-- PMM

#5 lore raw
Quoted 28 lines · Peter Maydell
Quoted 23 lines · Anthony PERARD

When Xen is detected via pkg-config, it isn't necessary to modify LDFLAGS as modifying libs_softmmu is enough.

---
  configure | 1 -
  1 file changed, 1 deletion(-)
configure +0 -2
index 12fd34f30b..98b270974d 100755
@@ -2355,7 +2355,6 @@ if test "$xen" != "no" ; then
      fi
      QEMU_CFLAGS="$QEMU_CFLAGS $($pkg_config --cflags $xen_pc)"
      libs_softmmu="$($pkg_config --libs $xen_pc) $libs_softmmu"
-    LDFLAGS="$($pkg_config --libs $xen_pc) $LDFLAGS"
    else
 
      xen_libs="-lxenstore -lxenctrl -lxenguest"
--
Quoted 1 line

Anthony PERARD

Quoted 3 lines

Cc'ing MJT, who first pointed out to me that this bug was resulting in various binaries like the linux-user ones getting linked against the Xen libs unnecessarily.

Well, at that time I confirmed the patch fixes this issue, and this is the same change I come across too, and it is already used on Debian. So

Thanks,

/mjt

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

#6 lore raw
In reply to Peter Maydell
Quoted 28 lines · Peter Maydell
Quoted 23 lines · Anthony PERARD

When Xen is detected via pkg-config, it isn't necessary to modify LDFLAGS as modifying libs_softmmu is enough.

---
  configure | 1 -
  1 file changed, 1 deletion(-)
configure +0 -2
index 12fd34f30b..98b270974d 100755
@@ -2355,7 +2355,6 @@ if test "$xen" != "no" ; then
      fi
      QEMU_CFLAGS="$QEMU_CFLAGS $($pkg_config --cflags $xen_pc)"
      libs_softmmu="$($pkg_config --libs $xen_pc) $libs_softmmu"
-    LDFLAGS="$($pkg_config --libs $xen_pc) $LDFLAGS"
    else
 
      xen_libs="-lxenstore -lxenctrl -lxenguest"
--
Quoted 1 line

Anthony PERARD

Quoted 3 lines

Cc'ing MJT, who first pointed out to me that this bug was resulting in various binaries like the linux-user ones getting linked against the Xen libs unnecessarily.

Well, at that time I confirmed the patch fixes this issue, and this is the same change I come across too, and it is already used on Debian. So

Thanks,

/mjt

#7 lore raw
Quoted 33 lines · Michael Tokarev
Quoted 28 lines · Peter Maydell
Quoted 23 lines · Anthony PERARD

When Xen is detected via pkg-config, it isn't necessary to modify LDFLAGS as modifying libs_softmmu is enough.

---
  configure | 1 -
  1 file changed, 1 deletion(-)
configure +0 -2
index 12fd34f30b..98b270974d 100755
@@ -2355,7 +2355,6 @@ if test "$xen" != "no" ; then
      fi
      QEMU_CFLAGS="$QEMU_CFLAGS $($pkg_config --cflags $xen_pc)"
      libs_softmmu="$($pkg_config --libs $xen_pc) $libs_softmmu"
-    LDFLAGS="$($pkg_config --libs $xen_pc) $LDFLAGS"
    else
 
      xen_libs="-lxenstore -lxenctrl -lxenguest"
--
Quoted 1 line

Anthony PERARD

Quoted 3 lines

Cc'ing MJT, who first pointed out to me that this bug was resulting in various binaries like the linux-user ones getting linked against the Xen libs unnecessarily.

Quoted 6 lines

Well, at that time I confirmed the patch fixes this issue, and this is the same change I come across too, and it is already used on Debian. So

Typo in Reviewed-by.

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

#8 lore raw
Quoted 4 lines · Markus Armbruster
Quoted 2 lines

Typo in Reviewed-by.

Should we tighten checkpatch.pl to flag suspicious-looking 'xxx-by:' tags, to catch instances of typos?

Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org

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

#10 lore raw
Quoted 10 lines · Eric Blake
Quoted 4 lines · Markus Armbruster
Quoted 2 lines

Typo in Reviewed-by.

Should we tighten checkpatch.pl to flag suspicious-looking 'xxx-by:' tags, to catch instances of typos?

Yes, I would vote for having it whitelist the half a dozen expected ones and complain about the rest. I think we kind of discussed this in the past...

thanks
-- PMM

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

#11 lore raw
Quoted 7 lines · Peter Maydell
Quoted 6 lines · Eric Blake
Quoted 3 lines · Markus Armbruster
Quoted 2 lines
Quoted 8 lines
Quoted 4 lines
Quoted 1 line

Typo in Reviewed-by.

Should we tighten checkpatch.pl to flag suspicious-looking 'xxx-by:' tags, to catch instances of typos?

Yes, I would vote for having it whitelist the half a dozen expected ones and complain about the rest. I think we kind of discussed this in the past...

I submitted a patch along those lines:
https://lists.gnu.org/archive/html/qemu-devel/2019-02/msg00910.html

Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org

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