Problems building qemu-xen-dir tools
Hi all,
I've noticed I have had to apply the following patch to get tools to compile properly under an EL6 environment:
tools/Makefile 2012-09-18 18:55:09.989148544 +1000 renamed from tools/Makefile 2012-09-17 20:21:18.000000000 +1000 +1 -0
@@ -187,6 +187,7 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-fi source=.; \ fi; \ cd qemu-xen-dir; \ + env -u CFLAGS \ $$source/configure --enable-xen --target-list=i386-softmmu \ --source-path=$$source \ --extra-cflags="-I$(XEN_ROOT)/tools/include \
Without this, the build fails due to incompatible CFLAGS.
Signature · 6 lines
Steven Haigh Email: [email protected] Web: http://www.crc.id.au Phone: (03) 9001 6090 - 0412 935 897 Fax: (03) 8338 0299
Quoted 1 line · Steven Haigh
Without this, the build fails due to incompatible CFLAGS.
CFLAGS must not be in environment, otherwise make will append its own CFLAGS to that environment variable and pass it on to qemu. qemu itself is not ready for things like -std=gnu99.
Olaf
Quoted 7 lines · Olaf Hering
Quoted 1 line · Steven Haigh
Without this, the build fails due to incompatible CFLAGS.
CFLAGS must not be in environment, otherwise make will append its own CFLAGS to that environment variable and pass it on to qemu. qemu itself is not ready for things like -std=gnu99.
The problem is that packaging guidelines often want you to set CFLAGS to supply distribution standard compile options. On the other hand with something like qemu it means that someone has probably already solved the problem. The attached patch worked for me in testing, which I derived by comparing Fedora's qemu with xen's.
Michael Young
tools/qemu-xen/fpu/softfloat-specialize.h +4 -4
@@ -89,8 +89,8 @@#define floatx80_default_nan_low LIT64( 0xC000000000000000 )#endif -const floatx80 floatx80_default_nan =make_floatx80 (floatx80_default_nan_high, - floatx80_default_nan_low); +const floatx80 floatx80_default_nan + =make_floatx80_init (floatx80_default_nan_high, floatx80_default_nan_low);/*---------------------------------------------------------------------------- | The pattern for a default generated quadruple-precision NaN. The `high' and
@@ -104,8 +104,8 @@#define float128_default_nan_low LIT64( 0x0000000000000000 )#endif -const float128 float128_default_nan =make_float128 (float128_default_nan_high, - float128_default_nan_low); +const float128 float128_default_nan + =make_float128_init (float128_default_nan_high, float128_default_nan_low);/*---------------------------------------------------------------------------- | Raises the exceptions specified by `flags'. Floating-point traps can be
tools/qemu-xen/fpu/softfloat.h +2 -0
@@ -129,6 +126,7 @@uint16_t high; } floatx80;#define make_floatx80 (exp, mant) ((floatx80) { mant, exp }) +#define make_floatx80_init (exp, mant) { .low = mant, .high = exp } typedef struct { #ifdef HOST_WORDS_BIGENDIAN uint64_t high, low;
@@ -137,6 +135,7 @@#endif } float128;#define make_float128 (high_, low_) ((float128) { .high = high_, .low = low_ }) +#define make_float128_init (high_, low_) { .high = high_, .low = low_ }/*---------------------------------------------------------------------------- | Software IEC/IEEE floating-point underflow tininess-detection mode.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 10 lines · M A Young
Quoted 7 lines · Olaf Hering
Quoted 1 line · Steven Haigh
Without this, the build fails due to incompatible CFLAGS.
CFLAGS must not be in environment, otherwise make will append its own CFLAGS to that environment variable and pass it on to qemu. qemu itself is not ready for things like -std=gnu99.
Quoted 5 lines
The problem is that packaging guidelines often want you to set CFLAGS to supply distribution standard compile options. On the other hand with something like qemu it means that someone has probably already solved the problem. The attached patch worked for me in testing, which I derived by comparing Fedora's qemu with xen's.
qemu does not build with rPM_OPT_FLAGS, at least in SuSE.
For Xen, see changeset: 25464:75a2bb5db228
user: Olaf Hering <[email protected]> date: Thu Jun 07 18:51:42 2012 +0100 files: tools/Makefile tools/Rules.mk tools/firmware/Rules.mk
description:
tools: pass EXTRA_CFLAGS via environment
Olaf
Quoted 7 lines · Olaf Hering
qemu does not build with
rPM_OPT_FLAGS, at least in SuSE.
For Xen, see changeset: 25464:75a2bb5db228user: Olaf Hering <[email protected]> date: Thu Jun 07 18:51:42 2012 +0100 files: tools/Makefile tools/Rules.mk tools/firmware/Rules.mkdescription:
tools: passEXTRA_CFLAGSvia environment
Fedora 17 seems happy to build the xen qemu with that patch and the RPM_OPT_FLAGS, though I haven't tried it on the full build system.
Michael Young