Skip to contentSkip to conversation

qemu: Fix incorrect zlib check error

PATCH In review Deepa Srinivasan 3 participants 5 messages Nov 14, 2008 – Nov 25, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qemu: Fix incorrect zlib check error

# HG changeset patch
# User Deepa Srinivasan <[email protected]> # Date 1226685276 21600
# Node ID ae59be00a22c4769a1116943ca5e07cec9154de0 # Parent 1a74ac23ff60cc2ab052072243dc4ff47faf5849
qemu: Fix incorrect zlib check error

From: Deepa Srinivasan <[email protected]>

Include the CFLAGS and LDFLAGS variables in the check for zlib. When cross-compiling for PowerPC, the path for zlib headers and libraries are passed in the CFLAGS and LDFLAGS respectively. While this patch fixes only the check for zlib, this issue potentially affects other configure tests as well.

---

[diffstat]

 configure |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

[diff]

qemu/configure +1 -1
diff -r 1a74ac23ff60 -r ae59be00a22c qemu/configure
@@ -798,7 +798,7 @@ cat > $TMPC << EOF
 #include <zlib.h>
 int main(void) { zlibVersion(); return 0; }
 EOF
-if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} $TMPC -lz 2> /dev/null ; then
+if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} $CFLAGS $LDFLAGS $TMPC -lz 2> /dev/null ; then
     :
 else
     echo
#1 lore raw
Quoted 8 lines · Deepa Srinivasan

qemu: Fix incorrect zlib check error

From: Deepa Srinivasan <[email protected]>

Include the CFLAGS and LDFLAGS variables in the check for zlib. When cross-compiling for PowerPC, the path for zlib headers and libraries are passed in the CFLAGS and LDFLAGS respectively. While this patch fixes only the check for zlib, this issue potentially affects other configure tests as well.

Doesn't anybody else cross-compile qemu? AFAICS, this patch is required to specify the location of cross-built libraries like zlib.

-Hollis

#2 lore raw
Quoted 6 lines · Hollis Blanchard
Quoted 4 lines · Deepa Srinivasan

qemu: Fix incorrect zlib check error

From: Deepa Srinivasan <[email protected]>

Quoted 9 lines
Quoted 5 lines

Include the CFLAGS and LDFLAGS variables in the check for zlib. When cross-compiling for PowerPC, the path for zlib headers and libraries are passed in the CFLAGS and LDFLAGS respectively. While this patch fixes only the check for zlib, this issue potentially affects other configure tests as well.

Doesn't anybody else cross-compile qemu? AFAICS, this patch is required to specify the location of cross-built libraries like zlib.

That's if you're using --extra-cflags. I cross compile without using --extra-cflags by installing libraries in the path of the cross environment. For instance, I have a /usr/i586-mingw32msvc path and the include/ directory in their has a zlib.h. This is what will be used by default.

Regards,

Anthony Liguori

Quoted 4 lines

-Hollis

#3 lore raw
In reply to Deepa Srinivasan
Quoted 7 lines · Deepa Srinivasan

# HG changeset patch
# User Deepa Srinivasan <[email protected]> # Date 1226685276 21600
# Node ID ae59be00a22c4769a1116943ca5e07cec9154de0 # Parent 1a74ac23ff60cc2ab052072243dc4ff47faf5849
qemu: Fix incorrect zlib check error

Quoted 9 lines

From: Deepa Srinivasan <[email protected]>

Include the CFLAGS and LDFLAGS variables in the check for zlib. When cross-compiling for PowerPC, the path for zlib headers and libraries are passed in the CFLAGS and LDFLAGS respectively. While this patch fixes only the check for zlib, this issue potentially affects other configure tests as well.

Please submit this patch against QEMU, and not against kvm-userspace.

Regards,

Anthony Liguori

#4 lore raw

Per the discussion on this mailing list (i.e. installing libraries in the right location) and the update on
http://kvm.qumranet.com/kvmwiki/PowerPC_Host_Userspace by Hollis Blanchard, this fix is no longer needed.

Thanks,
Deepa Srinivasan

[email protected] wrote on 11/18/2008 05:12:05 PM:

Quoted 8 lines
Quoted 7 lines · Deepa Srinivasan

# HG changeset patch
# User Deepa Srinivasan <[email protected]> # Date 1226685276 21600
# Node ID ae59be00a22c4769a1116943ca5e07cec9154de0 # Parent 1a74ac23ff60cc2ab052072243dc4ff47faf5849
qemu: Fix incorrect zlib check error

Quoted 5 lines
Quoted 3 lines

From: Deepa Srinivasan <[email protected]>

Include the CFLAGS and LDFLAGS variables in the check for zlib.

When cross-compiling

Quoted 1 line

for PowerPC, the path for zlib headers and libraries are passed inthe

CFLAGS

Quoted 1 line
Quoted 1 line

and LDFLAGS respectively. While this patch fixes only the check for

zlib,

Quoted 13 lines
Quoted 4 lines

this issue potentially affects other configure tests as well.

Please submit this patch against QEMU, and not against kvm-userspace.

Regards,

Anthony Liguori