qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] QEMU on Solaris 10 (was: [PATCH 01/32] use anonymous me


From: Andreas Färber
Subject: Re: [Qemu-devel] QEMU on Solaris 10 (was: [PATCH 01/32] use anonymous memory for kqemu.)
Date: Sat, 25 Oct 2008 12:27:24 +0200


Am 25.10.2008 um 12:17 schrieb Andreas Färber:


Am 24.10.2008 um 21:59 schrieb Ben Taylor:

the big problem I see is that the addition of c99 features
borks a qemu compile on Solaris, specfically around stdbool.h.
Turning on -std=c99 or -std=gnuc99 creates more problems because
gcc-3.4.3 provided by solaris doesn't accept the anonymous unions
that are prevalent around the new code, specifically nbd and vnc.

I just gave it a try on S10 5/08 amd64, using the gcc 3.4.3 from Sun and --disable-gcc-check

* configure complains about an illegal -q for grep.
It's used in a check for GNU ld. Could we use other options there or let grep be overridable to ggrep?

Since I am building on amd64, it also complained that libSDL is not amd64, so I use: --disable-sdl --disable-gfx-check

I can confirm the build failure due to stdbool.h. I therefore add: -- extra-cflags=-std=gnu99

sparc-softmmu then compiles fine.

Small addition here: in hw/bt-hci.c in bt_submit_hci I spotted an implicit declaration of function `strndup'

This is at r5528 btw.

For i386-softmmu however,

* I get a flood of warnings from softfloat_native.h due to redefinitions of isunordered etc. (defined in Sun's math_c99.h), and

* the build of `qemu` fails to link due to undefined symbols __builtin_isinf and __builtin_isnan in libqemu.a(op_helper.o).

Looking at fpu/softfloat_native.h I see it makes assumptions about these macros that turn wrong when using the C99 headers. Any suggestion what to do here? It does not seem to depend on the GCC version since I am encountering this on 3.4.3, not 4.x.

If I prepend "0 && " to the #if line to avoid the redefinitions, I get compilation errors about __builtin_* functions:

gmake[1]: Entering directory `/export/home/andreas/QEMU/qemu/i386- softmmu'
Makefile:701: no file name for `-include'
gcc -I. -I.. -I/export/home/andreas/QEMU/qemu/target-i386 -I/export/ home/andreas/QEMU/qemu -MMD -MT vl.o -MP -DNEED_CPU_H -D_GNU_SOURCE - D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/export/home/andreas/ QEMU/qemu/tcg -I/export/home/andreas/QEMU/qemu/tcg/x86_64 -I/export/ home/andreas/QEMU/qemu/fpu -DHAS_AUDIO -DHAS_AUDIO_CHOICE -I/export/ home/andreas/QEMU/qemu/slirp -std=gnu99 -O2 -g -fno-strict-aliasing - Wall -Wundef -Wendif-labels -Wwrite-strings -m64 -c -o vl.o /export/ home/andreas/QEMU/qemu/vl.c In file included from /export/home/andreas/QEMU/qemu/fpu/softfloat.h: 440, from /export/home/andreas/QEMU/qemu/target-i386/ cpu.h:47,
                from ../qemu-common.h:62,
                from /export/home/andreas/QEMU/qemu/hw/hw.h:5,
                from /export/home/andreas/QEMU/qemu/vl.c:24:
/export/home/andreas/QEMU/qemu/fpu/softfloat-native.h: In function `float32_le_quiet': /export/home/andreas/QEMU/qemu/fpu/softfloat-native.h:217: error: syntax error before "__builtin_islessequal" /export/home/andreas/QEMU/qemu/fpu/softfloat-native.h:218: warning: no return statement in function returning non-void /export/home/andreas/QEMU/qemu/fpu/softfloat-native.h: In function `float32_lt_quiet': /export/home/andreas/QEMU/qemu/fpu/softfloat-native.h:221: error: syntax error before "__builtin_isless" /export/home/andreas/QEMU/qemu/fpu/softfloat-native.h:222: warning: no return statement in function returning non-void /export/home/andreas/QEMU/qemu/fpu/softfloat-native.h: In function `float32_unordered': /export/home/andreas/QEMU/qemu/fpu/softfloat-native.h:225: error: syntax error before "__builtin_isunordered" /export/home/andreas/QEMU/qemu/fpu/softfloat-native.h:227: warning: no return statement in function returning non-void /export/home/andreas/QEMU/qemu/fpu/softfloat-native.h: In function `float64_le_quiet': /export/home/andreas/QEMU/qemu/fpu/softfloat-native.h:307: error: syntax error before "__builtin_islessequal" /export/home/andreas/QEMU/qemu/fpu/softfloat-native.h:308: warning: no return statement in function returning non-void /export/home/andreas/QEMU/qemu/fpu/softfloat-native.h: In function `float64_lt_quiet': /export/home/andreas/QEMU/qemu/fpu/softfloat-native.h:311: error: syntax error before "__builtin_isless" /export/home/andreas/QEMU/qemu/fpu/softfloat-native.h:313: warning: no return statement in function returning non-void /export/home/andreas/QEMU/qemu/fpu/softfloat-native.h: In function `float64_unordered': /export/home/andreas/QEMU/qemu/fpu/softfloat-native.h:316: error: syntax error before "__builtin_isunordered" /export/home/andreas/QEMU/qemu/fpu/softfloat-native.h:318: warning: no return statement in function returning non-void /export/home/andreas/QEMU/qemu/fpu/softfloat-native.h: In function `floatx80_le_quiet': /export/home/andreas/QEMU/qemu/fpu/softfloat-native.h:394: error: syntax error before "__builtin_islessequal" /export/home/andreas/QEMU/qemu/fpu/softfloat-native.h:395: warning: no return statement in function returning non-void /export/home/andreas/QEMU/qemu/fpu/softfloat-native.h: In function `floatx80_lt_quiet': /export/home/andreas/QEMU/qemu/fpu/softfloat-native.h:398: error: syntax error before "__builtin_isless" /export/home/andreas/QEMU/qemu/fpu/softfloat-native.h:400: warning: no return statement in function returning non-void /export/home/andreas/QEMU/qemu/fpu/softfloat-native.h: In function `floatx80_unordered': /export/home/andreas/QEMU/qemu/fpu/softfloat-native.h:403: error: syntax error before "__builtin_isunordered" /export/home/andreas/QEMU/qemu/fpu/softfloat-native.h:405: warning: no return statement in function returning non-void
/export/home/andreas/QEMU/qemu/vl.c: At top level:
/export/home/andreas/QEMU/qemu/vl.c:205: warning: 'no_frame' defined but not used /export/home/andreas/QEMU/qemu/vl.c:5372: warning: 'qemu_find_bt_vlan' defined but not used
gmake[1]: *** [vl.o] Error 1
gmake[1]: Leaving directory `/export/home/andreas/QEMU/qemu/i386- softmmu'
gmake: *** [subdir-i386-softmmu] Error 2

softfloat-native.h:217 does a simple "return islessequal(a, b);" - Sun's header has it defined as ((x) __builtin_islessequal(y)). This looks a little strange to me... Should we continue to override their macros, using #undef to avoid all the warnings, and define some additional ones for isinf and isnan, or is there a better solution?

The -include warning above appears to be related to dependency tracking only.

Andreas








reply via email to

[Prev in Thread] Current Thread [Next in Thread]