More configure/Makefile cleanups
Subsystems (2)
v3 cover More configure/Makefile cleanups
Hi
Changes in v3:
- split TARGET_CONFIG and HAVE_MACHINE_BSWAP_H patch
- fix commit message oc HOST_WORDS_BIGENDIAN
- use CONFIG_AUDIO_DRIVERS again. order is important, added a comment to indicate it. Not used audio_init() suggestion, as I don't want to delay more the inclusion of this series, will take a look at that suggestion later.
I answered all the comments/suggestions from previous series
Comments?
Later, Juan.
Changes for v2:
- Changes to LIBS variable are gone (will be done in a different way)
- config-host.h generated from config-host.mak
- Almost everything configurable starts with:
- TARGET_*
- HOST_*
- CONFIG_*
- don't repeat libs name, use the same libraries in detection and in Makefiles (in some cases that was not true)
- CONFIG_NOWIN32 is called CONFIG_POSIX
- sdl configuration is basically sane now
- AUDIO_DRIVERS define is gone, done in audio.c with #ifdefs AUDIO_DRIVERS was a hack that is quite complicated to generate through the Makefile.
Juan Quintela (47):
change HOST_SOLARIS to CONFIG_SOLARIS{_VERSION}
Remove SP_CFLAGS and SP_LDFLAGS
target_arch2 is redefined unconditionally later
remove CONFIG_ from VNC_TLS_{LIBS,FLAGS}
use same algorithm for testing and
remove CONFIG_ from VNC_SASL_{LIBS,FLAGS}
remove CONFIG_ from BLUEZ_{LIBS,FLAGS}
make fmod also use FMOD_{LIBS,CFLAGS}
make oss use OSS_LIBS
move printing of config-host.mak variables to end of generation more specific config.mak can overwrote more general config.mak Add -static in configure if needed
Rename HAVE_FDT to CONFIG_FDT and define it also in Makefile Refactor code to remove one #ifdef CONFIG_FDT
fix indententation
O_LARGEFILE is already set in qemu-common.h
rename HOST_BSD to CONFIG_BSD
define MAP_ANONYMOUS if it is not defined in qemu-common.h rename HAVE_PREADV to CONFIG_PREADV
rename HAVE_IOVEC to CONFIG_IOVEC
rename HAVE_FNMATCH_H to CONFIG_FNMATCH
rename HAVE_MACHINE_BSWAP_H to CONFIG_MACHINE_BSWAP_H rename HAVE_GPROF to TARGET_GPROF
rename HAVE_BYTESWAP_H to CONFIG_BYTESWAP_H
rename DEBUG_TCG to CONFIG_DEBUG_TCG
rename DEBUG_EXEC to CONFIG_DEBUG_EXEC
rename WORDS_BIGENDIAN to HOST_WORDS_BIGENDIAN
Add CONFIG_POSIX
Use CONFIG_POSIX to simplify Makefile
the else part of this test is obsolete We are testing for sdl = yes
inside the else part of the test if sdl = yes
sdl_config value was always sdl-config
Calculate sdl_libs and sdl_flags and use them everywhere instead of setup sdl_x11 just add -lX11 to sdl_libs target_softmmu is undefined at that point
remove sdl_static. Just do the right thing if static is yes indent with 2 spaces sdl tests
Define and use xen libs in a single place
simplify curses library selection
simplify brlapi selection
simplify vde libs selection
simplify fdt libs selection
test if xen is enabled only once
define ENOTSUP the same that the other errors
rename NEEDS_LIBSUNMATH to CONFIG_NEEDS_LIBSUNMATH rename USE_NPTL to CONFIG_USE_NPTL
Generate config-host.h from config-host.mak
move on_vcpu inside proper #ifdef
Makefile | 35 +--- Makefile.hw | 2 +- Makefile.target | 43 ++--- acl.c | 4 +- audio/audio.c | 7 +- audio/audio.h | 2 +- block.c | 4 +- block/raw-posix.c | 4 +- bsd-user/mmap.c | 2 +- bsd-user/qemu.h | 6 +- bsd-user/syscall.c | 6 +- bswap.h | 12 +- configure | 381 ++++++++++++++++-------------------- console.c | 8 +- cpu-all.h | 12 +- cpu-defs.h | 2 +- cpu-exec.c | 16 +- create_config | 57 +++++- disas.c | 2 +- dyngen-exec.h | 4 +- exec.c | 2 +- fpu/softfloat-native.c | 15 +- fpu/softfloat-native.h | 11 +- fpu/softfloat.h | 6 +- gdbstub.c | 2 +- hw/blizzard_template.h | 2 +- hw/bt-hci.c | 2 +- hw/gus.c | 2 +- hw/omap_lcd_template.h | 2 +- hw/petalogix_s3adsp1800_mmu.c | 8 +- hw/pl110_template.h | 6 +- hw/ppc440_bamboo.c | 2 +- hw/ppce500_mpc8544ds.c | 4 +- hw/pxa2xx_template.h | 2 +- hw/vga.c | 14 +- hw/vga_template.h | 6 +- kqemu.c | 2 +- kvm-all.c | 18 +- linux-user/arm/nwfpe/double_cpdo.c | 4 +- linux-user/arm/nwfpe/fpa11_cpdt.c | 4 +- linux-user/main.c | 6 +- linux-user/mmap.c | 2 +- linux-user/qemu.h | 8 +- linux-user/syscall.c | 26 ++-- loader.c | 4 +- net.c | 6 +- osdep.c | 12 +- posix-aio-compat.c | 4 +- qemu-char.c | 2 +- qemu-common.h | 13 +- qemu-lock.h | 2 +- savevm.c | 4 +- sdl.c | 4 +- slirp/ip.h | 6 +- slirp/slirp_config.h | 2 +- slirp/tcp.h | 2 +- target-arm/neon_helper.c | 2 +- target-i386/cpu.h | 2 +- target-i386/exec.h | 2 +- target-i386/translate.c | 4 +- target-mips/cpu.h | 4 +- target-ppc/kvm_ppc.c | 2 +- target-ppc/op_helper.c | 30 ++-- target-ppc/translate.c | 4 +- target-ppc/translate_init.c | 4 +- target-sparc/op_helper.c | 2 +- tcg/arm/tcg-target.c | 2 +- tcg/sparc/tcg-target.h | 2 +- tcg/tcg.c | 2 +- tcg/tcg.h | 2 +- vl.c | 6 +- vnc.c | 2 +- 72 files changed, 436 insertions(+), 462 deletions(-)
PATCH v3 1/47 change HOST_SOLARIS to CONFIG_SOLARIS{_VERSION}
--- configure | 3 ++- cpu-exec.c | 10 +++++----- dyngen-exec.h | 2 +- fpu/softfloat-native.c | 13 ++++++++----- fpu/softfloat-native.h | 9 +++++---- fpu/softfloat.h | 2 +- kqemu.c | 2 +- osdep.c | 6 +++--- target-mips/cpu.h | 2 +- tcg/sparc/tcg-target.h | 2 +- 10 files changed, 28 insertions(+), 23 deletions(-)
configure +2 -1
@@ -1588,7 +1588,8 @@ fi if test "$solaris" = "yes" ; then echo "CONFIG_SOLARIS=y" >> $config_host_mak - echo "#define HOST_SOLARIS $solarisrev" >> $config_host_h + echo "#define CONFIG_SOLARIS 1" >> $config_host_h + echo "#define CONFIG_SOLARIS_VERSION $solarisrev" >> $config_host_h if test "$needs_libsunmath" = "yes" ; then echo "NEEDS_LIBSUNMATH=yes" >> $config_host_mak echo "#define NEEDS_LIBSUNMATH 1" >> $config_host_h
cpu-exec.c +5 -5
@@ -38,7 +38,7 @@#endif #endif -#if defined(__sparc__) && !defined(HOST_SOLARIS ) +#if defined(__sparc__) && !defined(CONFIG_SOLARIS )// Work around ugly bugs in glibc that mangle global register contents #undef env#define env cpu_single_env
@@ -258,7 +258,7 @@ int cpu_exec(CPUState *env1)/* prepare setjmp context for exception handling */ for (;;) {if (setjmp (env->jmp_env) ==0 ) { -#if defined(__sparc__) && !defined(HOST_SOLARIS ) +#if defined(__sparc__) && !defined(CONFIG_SOLARIS )#undef env env = cpu_single_env;#define env cpu_single_env
@@ -414,7 +414,7 @@ int cpu_exec(CPUState *env1) env->interrupt_request &= ~(CPU_INTERRUPT_HARD |CPU_INTERRUPT_VIRQ ); intno =cpu_get_pic_interrupt (env);qemu_log_mask (CPU_LOG_TB_IN_ASM ,"Servicing hardware INT=0x%02x\n" , intno); -#if defined(__sparc__) && !defined(HOST_SOLARIS ) +#if defined(__sparc__) && !defined(CONFIG_SOLARIS )#undef env env = cpu_single_env;#define env cpu_single_env
@@ -644,7 +644,7 @@ int cpu_exec(CPUState *env1)while (env->current_tb) { tc_ptr = tb->tc_ptr;/* execute the generated code */ -#if defined(__sparc__) && !defined(HOST_SOLARIS ) +#if defined(__sparc__) && !defined(CONFIG_SOLARIS )#undef env env = cpu_single_env;#define env cpu_single_env
@@ -1435,7 +1435,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,siginfo_t *info = pinfo;int is_write;uint32_t insn; -#if !defined(__arch64__) || defined(HOST_SOLARIS ) +#if !defined(__arch64__) || defined(CONFIG_SOLARIS )uint32_t *regs = (uint32_t *)(info +1 );void *sigmask = (regs +20 );/* XXX: is there a standard glibc define ? */
dyngen-exec.h +1 -1
@@ -75,7 +75,7 @@ extern int printf(const char *, ...);#define AREG1 "s0"#define AREG2 "s1"#elif defined(__sparc__) -#ifdef HOST_SOLARIS +#ifdef CONFIG_SOLARIS #define AREG0 "g2"#define AREG1 "g3"#define AREG2 "g4"
fpu/softfloat-native.c +8 -5
@@ -2,7 +2,7 @@context is supported */ #include "softfloat.h" #include <math.h> -#if defined(HOST_SOLARIS ) +#if defined(CONFIG_SOLARIS )#include <fenv.h> #endif
@@ -10,7 +10,7 @@ void set_float_rounding_mode(int val STATUS_PARAM) {STATUS (float_rounding_mode) = val;#if defined(HOST_BSD ) && !defined(__APPLE__) || \ - (defined(HOST_SOLARIS ) &&HOST_SOLARIS <10 ) + (defined(CONFIG_SOLARIS ) &&CONFIG_SOLARIS_VERSION <10 )fpsetround (val);#elif defined(__arm__)/* nothing to do */
@@ -26,7 +26,8 @@ void set_floatx80_rounding_precision(int val STATUS_PARAM) }#endif -#if defined(HOST_BSD ) || (defined(HOST_SOLARIS ) &&HOST_SOLARIS <10 ) +#if defined(HOST_BSD ) || \ + (defined(CONFIG_SOLARIS ) &&CONFIG_SOLARIS_VERSION <10 )#define lrint (d) ((int32_t)rint(d))#define llrint (d) ((int64_t)rint(d))#define lrintf (f) ((int32_t)rint(f))
@@ -34,7 +35,8 @@ void set_floatx80_rounding_precision(int val STATUS_PARAM)#define sqrtf (f) ((float)sqrt(f))#define remainderf (fa, fb) ((float)remainder(fa, fb))#define rintf (f) ((float)rint(f)) -#if !defined(__sparc__) && defined(HOST_SOLARIS ) &&HOST_SOLARIS <10 +#if !defined(__sparc__) && \ + (defined(CONFIG_SOLARIS ) &&CONFIG_SOLARIS_VERSION <10 )extern long double rintl (long double );extern long double scalbnl (long double ,int );
@@ -349,7 +351,8 @@ uint64_t float64_to_uint64_round_to_zero (float64 a STATUS_PARAM)/*---------------------------------------------------------------------------- | Software IEC/IEEE double-precision operations. *----------------------------------------------------------------------------*/ -#if defined(__sun__) && defined(HOST_SOLARIS ) &&HOST_SOLARIS <10 +#if defined(__sun__) && \ + (defined(CONFIG_SOLARIS ) &&CONFIG_SOLARIS_VERSION <10 )static inline float64 trunc (float64 x) {return x <0 ? -floor (-x) :floor (x);
fpu/softfloat-native.h +5 -4
@@ -1,7 +1,7 @@/* Native implementation of soft float functions */ #include <math.h> -#if (defined(HOST_BSD ) && !defined(__APPLE__)) || defined(HOST_SOLARIS ) +#if (defined(HOST_BSD ) && !defined(__APPLE__)) || defined(CONFIG_SOLARIS )#include <ieeefp.h> #define fabsf (f) ((float)fabs(f))#else
@@ -19,8 +19,9 @@* Solaris 10 with GCC4 does not need these macros as they * are defined in <iso/math_c99.h> with a compiler directive */ -#if defined(HOST_SOLARIS ) && ((HOST_SOLARIS <=9 ) || ((HOST_SOLARIS >=10 ) \ - && (__GNUC__ <4 ))) \ +#if defined(CONFIG_SOLARIS ) && \ + ((CONFIG_SOLARIS_VERSION <=9 ) || \ + ((CONFIG_SOLARIS_VERSION >=10 ) && (__GNUC__ <4 ))) \ || (defined(__OpenBSD__) && (OpenBSD <200811 ))/* * C99 7.12.3 classification macros
@@ -111,7 +112,7 @@ typedef union {/*---------------------------------------------------------------------------- | Software IEC/IEEE floating-point rounding mode. *----------------------------------------------------------------------------*/ -#if (defined(HOST_BSD ) && !defined(__APPLE__)) || defined(HOST_SOLARIS ) +#if (defined(HOST_BSD ) && !defined(__APPLE__)) || defined(CONFIG_SOLARIS )#if defined(__OpenBSD__)#define FE_RM FP_RM#define FE_RP FP_RP
fpu/softfloat.h +1 -1
@@ -32,7 +32,7 @@ these four paragraphs for those parts of this code that are retained.#ifndef SOFTFLOAT_H #define SOFTFLOAT_H -#if defined(HOST_SOLARIS ) && defined(NEEDS_LIBSUNMATH ) +#if defined(CONFIG_SOLARIS ) && defined(NEEDS_LIBSUNMATH )#include <sunmath.h> #endif
kqemu.c +1 -1
@@ -25,7 +25,7 @@#include <sys/mman.h> #include <sys/ioctl.h> #endif -#ifdef HOST_SOLARIS +#ifdef CONFIG_SOLARIS #include <sys/ioccom.h> #endif #include <stdlib.h>
osdep.c +3 -3
@@ -28,7 +28,7 @@#include <errno.h> #include <unistd.h> #include <fcntl.h> -#ifdef HOST_SOLARIS +#ifdef CONFIG_SOLARIS #include <sys/types.h> #include <sys/statvfs.h> #endif
@@ -116,7 +116,7 @@ static void *kqemu_vmalloc(size_t size)int map_anon =0 ;const char *tmpdir;char phys_ram_file[1024 ]; -#ifdef HOST_SOLARIS +#ifdef CONFIG_SOLARIS struct statvfs stfs;#else struct statfs stfs;
@@ -129,7 +129,7 @@ static void *kqemu_vmalloc(size_t size)if (phys_ram_fd <0 ) { tmpdir =getenv ("QEMU_TMPDIR" ); if (!tmpdir) -#ifdef HOST_SOLARIS +#ifdef CONFIG_SOLARIS tmpdir ="/tmp" ;if (statvfs (tmpdir, &stfs) ==0 ) {#else
target-mips/cpu.h +1 -1
@@ -14,7 +14,7 @@// uint_fast8_t and uint_fast16_t not in <sys/int_types.h> // XXX: move that elsewhere -#if defined(HOST_SOLARIS ) &&HOST_SOLARIS <10 +#if defined(CONFIG_SOLARIS ) &&CONFIG_SOLARIS_VERSION <10 typedef unsigned char uint_fast8_t ;typedef unsigned int uint_fast16_t ;#endif
tcg/sparc/tcg-target.h +1 -1
@@ -95,7 +95,7 @@ enum {/* Note: must be synced with dyngen-exec.h and Makefile.target */ -#ifdef HOST_SOLARIS +#ifdef CONFIG_SOLARIS #define TCG_AREG0 TCG_REG_G2#define TCG_AREG1 TCG_REG_G3#define TCG_AREG2 TCG_REG_G4
Signature · 1 line
1.6.2.5
PATCH v3 2/47 Remove SP_CFLAGS and SP_LDFLAGS
In reply to Juan QuintelaSP_CFLAGS and SP_LDFLAGS are only used as initial values for ARCH_CFLAGS/ARCH_LDFLAGS. Call it directly ARCH_*. Once there, use the same indentantion that the rest of the file
--- configure | 35 ++++++++++++++++++++++------------- 1 files changed, 22 insertions(+), 13 deletions(-)
configure +22 -13
@@ -475,13 +475,28 @@ for opt do --sparc_cpu=*) sparc_cpu="$optarg" case $sparc_cpu in - v7|v8) SP_CFLAGS="-m32 -mcpu=${sparc_cpu} -D__sparc_${sparc_cpu}__"; SP_LDFLAGS="-m32" - target_arch2="sparc"; cpu="sparc" ;; - v8plus|v8plusa) SP_CFLAGS="-m32 -mcpu=ultrasparc -D__sparc_${sparc_cpu}__"; SP_LDFLAGS="-m32" - target_arch2="sparc"; cpu="sparc" ;; - v9) SP_CFLAGS="-m64 -mcpu=ultrasparc -D__sparc_${sparc_cpu}__"; SP_LDFLAGS="-m64" - target_arch2="sparc64"; cpu="sparc64" ;; - *) echo "undefined SPARC architecture. Exiting";exit 1;; + v7|v8) + ARCH_CFLAGS="-m32 -mcpu=${sparc_cpu} -D__sparc_${sparc_cpu}__" + ARCH_LDFLAGS="-m32" + target_arch2="sparc" + cpu="sparc" + ;; + v8plus|v8plusa) + ARCH_CFLAGS="-m32 -mcpu=ultrasparc -D__sparc_${sparc_cpu}__" + ARCH_LDFLAGS="-m32" + target_arch2="sparc" + cpu="sparc" + ;; + v9) + ARCH_CFLAGS="-m64 -mcpu=ultrasparc -D__sparc_${sparc_cpu}__" + ARCH_LDFLAGS="-m64" + target_arch2="sparc64" + cpu="sparc64" + ;; + *) + echo "undefined SPARC architecture. Exiting"; + exit 1 + ;; esac ;; --enable-werror) werror="yes"
@@ -554,9 +569,6 @@ case "$cpu" in sparc) if test -z "$sparc_cpu" ; then ARCH_CFLAGS="-m32 -mcpu=ultrasparc -D__sparc_v8plus__" ARCH_LDFLAGS="-m32" - else - ARCH_CFLAGS="${SP_CFLAGS}" - ARCH_LDFLAGS="${SP_LDFLAGS}" fi ARCH_CFLAGS="$ARCH_CFLAGS -ffixed-g2 -ffixed-g3" if test "$solaris" = "no" ; then
@@ -566,9 +578,6 @@ case "$cpu" in sparc64) if test -z "$sparc_cpu" ; then ARCH_CFLAGS="-m64 -mcpu=ultrasparc -D__sparc_v9__" ARCH_LDFLAGS="-m64" - else - ARCH_CFLAGS="${SP_CFLAGS}" - ARCH_LDFLAGS="${SP_LDFLAGS}" fi if test "$solaris" = "no" ; then ARCH_CFLAGS="$ARCH_CFLAGS -ffixed-g5 -ffixed-g6 -ffixed-g7"
Signature · 1 line
1.6.2.5
PATCH v3 3/47 target_arch2 is redefined unconditionally later
In reply to Juan Quintela--- configure | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-)
configure +0 -3
@@ -478,19 +478,16 @@ for opt do v7|v8) ARCH_CFLAGS="-m32 -mcpu=${sparc_cpu} -D__sparc_${sparc_cpu}__" ARCH_LDFLAGS="-m32" - target_arch2="sparc" cpu="sparc" ;; v8plus|v8plusa) ARCH_CFLAGS="-m32 -mcpu=ultrasparc -D__sparc_${sparc_cpu}__" ARCH_LDFLAGS="-m32" - target_arch2="sparc" cpu="sparc" ;; v9) ARCH_CFLAGS="-m64 -mcpu=ultrasparc -D__sparc_${sparc_cpu}__" ARCH_LDFLAGS="-m64" - target_arch2="sparc64" cpu="sparc64" ;; *)
Signature · 1 line
1.6.2.5
PATCH v3 4/47 remove CONFIG_ from VNC_TLS_{LIBS, FLAGS}
In reply to Juan Quintela--- Makefile | 2 +- Makefile.target | 4 ++-- configure | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-)
Makefile +1 -1
@@ -193,7 +193,7 @@ vnc.h: vnc-tls.h vnc-auth-vencrypt.h vnc-auth-sasl.h keymaps.h vnc.o: vnc.c vnc.h vnc_keysym.h vnchextile.h d3des.c d3des.h acl.h -vnc.o: CFLAGS += $(CONFIG_VNC_TLS_CFLAGS) +vnc.o: CFLAGS += $(VNC_TLS_CFLAGS) vnc-tls.o: vnc-tls.c vnc.h
Makefile.target +2 -2
@@ -456,8 +456,8 @@ adlib.o fmopl.o: CFLAGS := ${CFLAGS} -DBUILD_Y8950=0 endif ifdef CONFIG_VNC_TLS -CPPFLAGS += $(CONFIG_VNC_TLS_CFLAGS) -LIBS += $(CONFIG_VNC_TLS_LIBS) +CPPFLAGS += $(VNC_TLS_CFLAGS) +LIBS += $(VNC_TLS_LIBS) endif ifdef CONFIG_VNC_SASL
configure +2 -2
@@ -1649,8 +1649,8 @@ if test "$mixemu" = "yes" ; then fi if test "$vnc_tls" = "yes" ; then echo "CONFIG_VNC_TLS=y" >> $config_host_mak - echo "CONFIG_VNC_TLS_CFLAGS=$vnc_tls_cflags" >> $config_host_mak - echo "CONFIG_VNC_TLS_LIBS=$vnc_tls_libs" >> $config_host_mak + echo "VNC_TLS_CFLAGS=$vnc_tls_cflags" >> $config_host_mak + echo "VNC_TLS_LIBS=$vnc_tls_libs" >> $config_host_mak echo "#define CONFIG_VNC_TLS 1" >> $config_host_h fi if test "$vnc_sasl" = "yes" ; then
Signature · 1 line
1.6.2.5
PATCH v3 5/47 use same algorithm for testing and
In reply to Juan Quintela--- configure | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-)
configure +7 -1
@@ -2107,7 +2107,13 @@ fi $source_path/create_config < $config_mak > $config_h -test -f ${config_h}~ && cmp -s $config_h ${config_h}~ && mv ${config_h}~ $config_h +if test -f ${config_h}~ ; then + if cmp -s $config_h ${config_h}~ ; then + mv ${config_h}~ $config_h + else + rm ${config_h}~ + fi +fi done # for target in $targets
Signature · 1 line
1.6.2.5
PATCH v3 6/47 remove CONFIG_ from VNC_SASL_{LIBS, FLAGS}
In reply to Juan Quintela--- Makefile.target | 4 ++-- configure | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
Makefile.target +2 -2
@@ -461,8 +461,8 @@ LIBS += $(VNC_TLS_LIBS) endif ifdef CONFIG_VNC_SASL -CPPFLAGS += $(CONFIG_VNC_SASL_CFLAGS) -LIBS += $(CONFIG_VNC_SASL_LIBS) +CPPFLAGS += $(VNC_SASL_CFLAGS) +LIBS += $(VNC_SASL_LIBS) endif ifdef CONFIG_BLUEZ
configure +2 -2
@@ -1655,8 +1655,8 @@ if test "$vnc_tls" = "yes" ; then fi if test "$vnc_sasl" = "yes" ; then echo "CONFIG_VNC_SASL=y" >> $config_host_mak - echo "CONFIG_VNC_SASL_CFLAGS=$vnc_sasl_cflags" >> $config_host_mak - echo "CONFIG_VNC_SASL_LIBS=$vnc_sasl_libs" >> $config_host_mak + echo "VNC_SASL_CFLAGS=$vnc_sasl_cflags" >> $config_host_mak + echo "VNC_SASL_LIBS=$vnc_sasl_libs" >> $config_host_mak echo "#define CONFIG_VNC_SASL 1" >> $config_host_h fi if test "$fnmatch" = "yes" ; then
Signature · 1 line
1.6.2.5
PATCH v3 7/47 remove CONFIG_ from BLUEZ_{LIBS,FLAGS}
In reply to Juan Quintela--- Makefile | 2 +- Makefile.target | 2 +- configure | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)
Makefile +1 -1
@@ -203,7 +203,7 @@ vnc-auth-sasl.o: vnc-auth-sasl.c vnc.h curses.o: curses.c keymaps.h curses_keys.h -bt-host.o: CFLAGS += $(CONFIG_BLUEZ_CFLAGS) +bt-host.o: CFLAGS += $(BLUEZ_CFLAGS) libqemu_common.a: $(obj-y)
Makefile.target +1 -1
@@ -466,7 +466,7 @@ LIBS += $(VNC_SASL_LIBS) endif ifdef CONFIG_BLUEZ -LIBS += $(CONFIG_BLUEZ_LIBS) +LIBS += $(BLUEZ_LIBS) endif # xen backend driver support
configure +2 -2
@@ -1737,8 +1737,8 @@ if test "$brlapi" = "yes" ; then fi if test "$bluez" = "yes" ; then echo "CONFIG_BLUEZ=y" >> $config_host_mak - echo "CONFIG_BLUEZ_CFLAGS=$bluez_cflags" >> $config_host_mak - echo "CONFIG_BLUEZ_LIBS=$bluez_libs" >> $config_host_mak + echo "BLUEZ_CFLAGS=$bluez_cflags" >> $config_host_mak + echo "BLUEZ_LIBS=$bluez_libs" >> $config_host_mak echo "#define CONFIG_BLUEZ 1" >> $config_host_h fi if test "$xen" = "yes" ; then
Signature · 1 line
1.6.2.5
PATCH v3 8/47 make fmod also use FMOD_{LIBS,CFLAGS}
In reply to Juan Quintela--- Makefile | 2 +- Makefile.target | 2 +- configure | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)
Makefile +1 -1
@@ -124,7 +124,7 @@ ifdef CONFIG_COREAUDIO AUDIO_PT = y endif ifdef CONFIG_FMOD -audio/audio.o audio/fmodaudio.o: CPPFLAGS := -I$(CONFIG_FMOD_INC) $(CPPFLAGS) +audio/audio.o audio/fmodaudio.o: CPPFLAGS := $(FMOD_CFLAGS) $(CPPFLAGS) endif ifdef CONFIG_ESD AUDIO_PT = y
Makefile.target +1 -1
@@ -437,7 +437,7 @@ ifdef CONFIG_DSOUND LIBS += -lole32 -ldxguid endif ifdef CONFIG_FMOD -LIBS += $(CONFIG_FMOD_LIB) +LIBS += $(FMOD_LIBS) endif ifdef CONFIG_OSS LIBS += $(CONFIG_OSS_LIB)
configure +2 -2
@@ -1636,8 +1636,8 @@ for drv in $audio_drv_list; do def=CONFIG_`echo $drv | tr '[:lower:]' '[:upper:]'` echo "$def=y" >> $config_host_mak if test "$drv" = "fmod"; then - echo "CONFIG_FMOD_LIB=$fmod_lib" >> $config_host_mak - echo "CONFIG_FMOD_INC=$fmod_inc" >> $config_host_mak + echo "FMOD_LIBS=$fmod_lib" >> $config_host_mak + echo "FMOD_CFLAGS=-I$fmod_inc" >> $config_host_mak elif test "$drv" = "oss"; then echo "CONFIG_OSS_LIB=$oss_lib" >> $config_host_mak fi
Signature · 1 line
1.6.2.5
PATCH v3 10/47 move printing of config-host.mak variables to end of generation
In reply to Juan Quintela--- configure | 52 +++++++++++++++++++++++++++------------------------- 1 files changed, 27 insertions(+), 25 deletions(-)
configure +27 -25
@@ -1500,27 +1500,8 @@ printf " '%s'" "$0" "$@" >> $config_host_mak echo >> $config_host_mak echo "/* Automatically generated by configure - do not modify */" > $config_host_h -echo "prefix=$prefix" >> $config_host_mak -echo "bindir=\${prefix}$binsuffix" >> $config_host_mak -echo "mandir=\${prefix}$mansuffix" >> $config_host_mak -echo "datadir=\${prefix}$datasuffix" >> $config_host_mak -echo "docdir=\${prefix}$docsuffix" >> $config_host_mak echo "#define CONFIG_QEMU_SHAREDIR \"$prefix$datasuffix\"" >> $config_host_h -echo "MAKE=$make" >> $config_host_mak -echo "INSTALL=$install" >> $config_host_mak -echo "INSTALL_DIR=$install -d -m0755 -p" >> $config_host_mak -echo "INSTALL_DATA=$install -m0644 -p" >> $config_host_mak -echo "INSTALL_PROG=$install -m0755 -p" >> $config_host_mak -echo "CC=$cc" >> $config_host_mak -echo "HOST_CC=$host_cc" >> $config_host_mak -echo "AR=$ar" >> $config_host_mak -echo "OBJCOPY=$objcopy" >> $config_host_mak -echo "LD=$ld" >> $config_host_mak -echo "CFLAGS=$CFLAGS $OS_CFLAGS $ARCH_CFLAGS $EXTRA_CFLAGS" >> $config_host_mak -echo "LDFLAGS=$LDFLAGS $OS_LDFLAGS $ARCH_LDFLAGS $EXTRA_LDFLAGS" >> $config_host_mak -echo "EXESUF=$EXESUF" >> $config_host_mak -echo "PTHREADLIBS=$PTHREADLIBS" >> $config_host_mak -echo "CLOCKLIBS=$CLOCKLIBS" >> $config_host_mak + case "$cpu" in i386|x86_64|alpha|cris|hppa|ia64|m68k|microblaze|mips|mips64|ppc|ppc64|s390|sparc|sparc64) ARCH=$cpu
@@ -1543,11 +1524,6 @@ fi if test "$debug" = "yes" ; then echo "#define DEBUG_EXEC 1" >> $config_host_h fi -if test "$sparse" = "yes" ; then - echo "CC := REAL_CC=\"\$(CC)\" cgcc" >> $config_host_mak - echo "HOST_CC := REAL_CC=\"\$(HOST_CC)\" cgcc" >> $config_host_mak - echo "CFLAGS += -Wbitwise -Wno-transparent-union -Wno-old-initializer -Wno-non-pointer-null" >> $config_host_mak -fi if test "$strip_opt" = "yes" ; then echo "STRIP_OPT=-s" >> $config_host_mak fi
@@ -1839,6 +1815,32 @@ if test "$cpu" = "i386" -o "$cpu" = "x86_64" ; then fi echo "ROMS=$roms" >> $config_host_mak +echo "prefix=$prefix" >> $config_host_mak +echo "bindir=\${prefix}$binsuffix" >> $config_host_mak +echo "mandir=\${prefix}$mansuffix" >> $config_host_mak +echo "datadir=\${prefix}$datasuffix" >> $config_host_mak +echo "docdir=\${prefix}$docsuffix" >> $config_host_mak +echo "MAKE=$make" >> $config_host_mak +echo "INSTALL=$install" >> $config_host_mak +echo "INSTALL_DIR=$install -d -m0755 -p" >> $config_host_mak +echo "INSTALL_DATA=$install -m0644 -p" >> $config_host_mak +echo "INSTALL_PROG=$install -m0755 -p" >> $config_host_mak +echo "CC=$cc" >> $config_host_mak +echo "HOST_CC=$host_cc" >> $config_host_mak +if test "$sparse" = "yes" ; then + echo "CC := REAL_CC=\"\$(CC)\" cgcc" >> $config_host_mak + echo "HOST_CC := REAL_CC=\"\$(HOST_CC)\" cgcc" >> $config_host_mak + echo "CFLAGS += -Wbitwise -Wno-transparent-union -Wno-old-initializer -Wno-non-pointer-null" >> $config_host_mak +fi +echo "AR=$ar" >> $config_host_mak +echo "OBJCOPY=$objcopy" >> $config_host_mak +echo "LD=$ld" >> $config_host_mak +echo "CFLAGS=$CFLAGS $OS_CFLAGS $ARCH_CFLAGS $EXTRA_CFLAGS" >> $config_host_mak +echo "LDFLAGS=$LDFLAGS $OS_LDFLAGS $ARCH_LDFLAGS $EXTRA_LDFLAGS" >> $config_host_mak +echo "EXESUF=$EXESUF" >> $config_host_mak +echo "PTHREADLIBS=$PTHREADLIBS" >> $config_host_mak +echo "CLOCKLIBS=$CLOCKLIBS" >> $config_host_mak + if test -f ${config_host_h}~ ; then if cmp -s $config_host_h ${config_host_h}~ ; then mv ${config_host_h}~ $config_host_h
Signature · 1 line
1.6.2.5
PATCH v3 11/47 more specific config.mak can overwrote more general config.mak
In reply to Juan Quintela--- Makefile.hw | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Makefile.hw +1 -1
@@ -1,7 +1,7 @@ # Makefile for qemu target independent devices. -include config.mak include ../config-host.mak +include config.mak include $(SRC_PATH)/rules.mak .PHONY: all
Signature · 1 line
1.6.2.5
PATCH v3 9/47 make oss use OSS_LIBS
In reply to Juan Quintela--- Makefile.target | 2 +- configure | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Makefile.target +1 -1
@@ -440,7 +440,7 @@ ifdef CONFIG_FMOD LIBS += $(FMOD_LIBS) endif ifdef CONFIG_OSS -LIBS += $(CONFIG_OSS_LIB) +LIBS += $(OSS_LIBS) endif sound-obj-y =
configure +1 -1
@@ -1639,7 +1639,7 @@ for drv in $audio_drv_list; do echo "FMOD_LIBS=$fmod_lib" >> $config_host_mak echo "FMOD_CFLAGS=-I$fmod_inc" >> $config_host_mak elif test "$drv" = "oss"; then - echo "CONFIG_OSS_LIB=$oss_lib" >> $config_host_mak + echo "OSS_LIBS=$oss_lib" >> $config_host_mak fi done echo "" >>$config_host_h
Signature · 1 line
1.6.2.5
PATCH v3 12/47 Add -static in configure if needed
In reply to Juan Quintela--- Makefile | 4 +--- Makefile.target | 11 ----------- configure | 1 + 3 files changed, 2 insertions(+), 14 deletions(-)
Makefile +1 -3
@@ -20,9 +20,7 @@ CPPFLAGS += -I. -I$(SRC_PATH) -MMD -MP -MT $@ CPPFLAGS += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE CPPFLAGS += -U_FORTIFY_SOURCE LIBS= -ifdef CONFIG_STATIC -LDFLAGS += -static -endif + ifdef BUILD_DOCS DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 qemu-nbd.8 else
Makefile.target +0 -11
@@ -175,10 +175,6 @@ ifdef CONFIG_LINUX_USER VPATH+=:$(SRC_PATH)/linux-user:$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR) CPPFLAGS+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR) -ifdef CONFIG_STATIC -LDFLAGS+=-static -endif - ifeq ($(ARCH),i386) ifdef TARGET_GPROF USE_I386_LD=y
@@ -322,10 +318,6 @@ ifdef CONFIG_BSD_USER VPATH+=:$(SRC_PATH)/bsd-user CPPFLAGS+=-I$(SRC_PATH)/bsd-user -I$(SRC_PATH)/bsd-user/$(TARGET_ARCH) -ifdef CONFIG_STATIC -LDFLAGS+=-static -endif - ifeq ($(ARCH),i386) ifdef TARGET_GPROF USE_I386_LD=y
@@ -620,9 +612,6 @@ CPPFLAGS+=-I$(SRC_PATH)/slirp endif # specific flags are needed for non soft mmu emulator -ifdef CONFIG_STATIC -LDFLAGS+=-static -endif ifndef CONFIG_DARWIN ifndef CONFIG_WIN32 ifndef CONFIG_SOLARIS
configure +1 -0
@@ -1588,6 +1588,7 @@ fi if test "$static" = "yes" ; then echo "CONFIG_STATIC=y" >> $config_host_mak echo "#define CONFIG_STATIC 1" >> $config_host_h + LDFLAGS="$LDFLAGS -static" fi if test $profiler = "yes" ; then echo "#define CONFIG_PROFILER 1" >> $config_host_h
Signature · 1 line
1.6.2.5
PATCH v3 13/47 Rename HAVE_FDT to CONFIG_FDT and define it also in Makefile
In reply to Juan Quintela--- Makefile.target | 4 ++-- configure | 3 ++- hw/petalogix_s3adsp1800_mmu.c | 4 ++-- hw/ppc440_bamboo.c | 2 +- hw/ppce500_mpc8544ds.c | 4 ++-- target-ppc/kvm_ppc.c | 2 +- 6 files changed, 10 insertions(+), 9 deletions(-)
Makefile.target +2 -2
@@ -513,8 +513,8 @@ ifeq ($(TARGET_BASE_ARCH), ppc) CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE endif +obj-ppc-$(CONFIG_FDT) += device_tree.o ifdef FDT_LIBS -obj-ppc-y += device_tree.o LIBS+= $(FDT_LIBS) endif
@@ -541,8 +541,8 @@ obj-microblaze-y += xilinx_ethlite.o obj-microblaze-y += pflash_cfi02.o +obj-microblaze-$(CONFIG_FDT) += device_tree.o ifdef FDT_LIBS -obj-microblaze-y += device_tree.o LIBS+= $(FDT_LIBS) endif
configure +2 -1
@@ -1739,7 +1739,8 @@ if test "$preadv" = "yes" ; then echo "#define HAVE_PREADV 1" >> $config_host_h fi if test "$fdt" = "yes" ; then - echo "#define HAVE_FDT 1" >> $config_host_h + echo "CONFIG_FDT=y" >> $config_host_mak + echo "#define CONFIG_FDT 1" >> $config_host_h echo "FDT_LIBS=-lfdt" >> $config_host_mak fi
hw/petalogix_s3adsp1800_mmu.c +2 -2
@@ -52,14 +52,14 @@ static int petalogix_load_device_tree(target_phys_addr_t addr,target_phys_addr_t initrd_size, const char *kernel_cmdline) { -#ifdef HAVE_FDT +#ifdef CONFIG_FDT void *fdt;int r;#endif char *path;int fdt_size; -#ifdef HAVE_FDT +#ifdef CONFIG_FDT /* Try the local "mb.dtb" override. */ fdt = load_device_tree("mb.dtb", &fdt_size); if (!fdt) {
hw/ppc440_bamboo.c +1 -1
@@ -32,7 +32,7 @@ static void *bamboo_load_device_tree(target_phys_addr_t addr, const char *kernel_cmdline) {void *fdt =NULL ; -#ifdef HAVE_FDT +#ifdef CONFIG_FDT uint32_t mem_reg_property[] = {0 ,0 , ramsize };char *filename;int fdt_size;
hw/ppce500_mpc8544ds.c +2 -2
@@ -46,7 +46,7 @@#define MPC8544_PCI_IO 0xE1000000#define MPC8544_PCI_IOLEN 0x10000 -#ifdef HAVE_FDT +#ifdef CONFIG_FDT static int mpc8544_copy_soc_cell (void *fdt,const char *node,const char *prop) {uint32_t cell;
@@ -77,7 +77,7 @@ static void *mpc8544_load_device_tree(target_phys_addr_t addr, const char *kernel_cmdline) {void *fdt =NULL ; -#ifdef HAVE_FDT +#ifdef CONFIG_FDT uint32_t mem_reg_property[] = {0 , ramsize};char *filename;int fdt_size;
target-ppc/kvm_ppc.c +1 -1
@@ -21,7 +21,7 @@static QEMUTimer *kvmppc_timer;static unsigned int kvmppc_timer_rate; -#ifdef HAVE_FDT +#ifdef CONFIG_FDT int kvmppc_read_host_property (const char *node_path,const char *prop,void *val,size_t len) {
Signature · 1 line
1.6.2.5
PATCH v3 14/47 Refactor code to remove one #ifdef CONFIG_FDT
In reply to Juan Quintela--- hw/petalogix_s3adsp1800_mmu.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-)
hw/petalogix_s3adsp1800_mmu.c +2 -4
@@ -52,14 +52,12 @@ static int petalogix_load_device_tree(target_phys_addr_t addr,target_phys_addr_t initrd_size, const char *kernel_cmdline) { + char *path; +int fdt_size; #ifdef CONFIG_FDT void *fdt; int r; -#endif -char *path; -int fdt_size; -#ifdef CONFIG_FDT /* Try the local "mb.dtb" override. */ fdt = load_device_tree("mb.dtb", &fdt_size); if (!fdt) {
Signature · 1 line
1.6.2.5
PATCH v3 15/47 fix indententation
In reply to Juan Quintela--- configure | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-)
configure +2 -3
@@ -1797,9 +1797,8 @@ else exit 1 fi -if test "$xen" = "yes" ; - then - echo "CONFIG_XEN=y" >> $config_host_mak +if test "$xen" = "yes" ; then + echo "CONFIG_XEN=y" >> $config_host_mak fi tools=
Signature · 1 line
1.6.2.5
PATCH v3 16/47 O_LARGEFILE is already set in qemu-common.h
In reply to Juan Quintela--- configure | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
configure +0 -1
@@ -1746,7 +1746,6 @@ fi # XXX: suppress that if [ "$bsd" = "yes" ] ; then - echo "#define O_LARGEFILE 0" >> $config_host_h echo "#define MAP_ANONYMOUS MAP_ANON" >> $config_host_h echo "#define HOST_BSD 1" >> $config_host_h fi
Signature · 1 line
1.6.2.5
PATCH v3 17/47 rename HOST_BSD to CONFIG_BSD
In reply to Juan Quintela--- block.c | 4 ++-- block/raw-posix.c | 4 ++-- configure | 2 +- dyngen-exec.h | 2 +- fpu/softfloat-native.c | 4 ++-- fpu/softfloat-native.h | 4 ++-- fpu/softfloat.h | 2 +- net.c | 6 +++--- osdep.c | 6 +++--- qemu-char.c | 2 +- savevm.c | 4 ++-- vl.c | 4 ++-- 12 files changed, 22 insertions(+), 22 deletions(-)
block.c +2 -2
@@ -22,7 +22,7 @@* THE SOFTWARE. */ #include "config-host.h" -#ifdef HOST_BSD +#ifdef CONFIG_BSD /* include native header before sys-queue.h */ #include <sys/queue.h> #endif
@@ -32,7 +32,7 @@#include "block_int.h" #include "module.h" -#ifdef HOST_BSD +#ifdef CONFIG_BSD #include <sys/types.h> #include <sys/stat.h> #include <sys/ioctl.h>
block/raw-posix.c +2 -2
@@ -779,7 +779,7 @@ static int64_t raw_getlength(BlockDriverState *bs)BDRVRawState *s = bs->opaque;int fd = s->fd;int64_t size; -#ifdef HOST_BSD +#ifdef CONFIG_BSD struct stat sb;#ifdef __FreeBSD__int reopened =0 ;
@@ -795,7 +795,7 @@ static int64_t raw_getlength(BlockDriverState *bs)if (ret <0 )return ret; -#ifdef HOST_BSD +#ifdef CONFIG_BSD #ifdef __FreeBSD__ again:#endif
configure +1 -1
@@ -1747,7 +1747,7 @@ fi # XXX: suppress that if [ "$bsd" = "yes" ] ; then echo "#define MAP_ANONYMOUS MAP_ANON" >> $config_host_h - echo "#define HOST_BSD 1" >> $config_host_h + echo "#define CONFIG_BSD 1" >> $config_host_h fi echo "#define CONFIG_UNAME_RELEASE \"$uname_release\"" >> $config_host_h
dyngen-exec.h +1 -1
@@ -39,7 +39,7 @@/* XXX: This may be wrong for 64-bit ILP32 hosts. */ typedef void *host_reg_t ; -#ifdef HOST_BSD +#ifdef CONFIG_BSD typedef struct __sFILE FILE ;#else typedef struct FILE FILE ;
fpu/softfloat-native.c +2 -2
@@ -9,7 +9,7 @@ void set_float_rounding_mode(int val STATUS_PARAM) {STATUS (float_rounding_mode) = val; -#if defined(HOST_BSD ) && !defined(__APPLE__) || \ +#if defined(CONFIG_BSD ) && !defined(__APPLE__) || \ (defined(CONFIG_SOLARIS ) &&CONFIG_SOLARIS_VERSION <10 )fpsetround (val);#elif defined(__arm__)
@@ -26,7 +26,7 @@ void set_floatx80_rounding_precision(int val STATUS_PARAM) }#endif -#if defined(HOST_BSD ) || \ +#if defined(CONFIG_BSD ) || \ (defined(CONFIG_SOLARIS ) &&CONFIG_SOLARIS_VERSION <10 )#define lrint (d) ((int32_t)rint(d))#define llrint (d) ((int64_t)rint(d))
fpu/softfloat-native.h +2 -2
@@ -1,7 +1,7 @@/* Native implementation of soft float functions */ #include <math.h> -#if (defined(HOST_BSD ) && !defined(__APPLE__)) || defined(CONFIG_SOLARIS ) +#if (defined(CONFIG_BSD ) && !defined(__APPLE__)) || defined(CONFIG_SOLARIS )#include <ieeefp.h> #define fabsf (f) ((float)fabs(f))#else
@@ -112,7 +112,7 @@ typedef union {/*---------------------------------------------------------------------------- | Software IEC/IEEE floating-point rounding mode. *----------------------------------------------------------------------------*/ -#if (defined(HOST_BSD ) && !defined(__APPLE__)) || defined(CONFIG_SOLARIS ) +#if (defined(CONFIG_BSD ) && !defined(__APPLE__)) || defined(CONFIG_SOLARIS )#if defined(__OpenBSD__)#define FE_RM FP_RM#define FE_RP FP_RP
fpu/softfloat.h +1 -1
@@ -90,7 +90,7 @@ typedef int64_t sbits64;#define FLOAT128 #else /* native float support */ -#if (defined(__i386__) || defined(__x86_64__)) && !defined(HOST_BSD ) +#if (defined(__i386__) || defined(__x86_64__)) && !defined(CONFIG_BSD )#define FLOATX80 #endif #endif /* !CONFIG_SOFTFLOAT */
net.c +3 -3
@@ -29,7 +29,7 @@#include <sys/time.h> #include <zlib.h> -/* Needed early for HOST_BSD etc. */ +/* Needed early for CONFIG_BSD etc. */ #include "config-host.h" #ifndef _WIN32
@@ -52,7 +52,7 @@#include <dirent.h> #include <netdb.h> #include <sys/select.h> -#ifdef HOST_BSD +#ifdef CONFIG_BSD #include <sys/stat.h> #if defined(__FreeBSD__) || defined(__DragonFly__)#include <libutil.h>
@@ -1463,7 +1463,7 @@ static TAPState *net_tap_fd_init(VLANState *vlan,return s; } -#if defined (HOST_BSD ) || defined (__FreeBSD_kernel__) +#if defined (CONFIG_BSD ) || defined (__FreeBSD_kernel__)static int tap_open (char *ifname,int ifname_size) {int fd;
osdep.c +3 -3
@@ -36,12 +36,12 @@/* FIXME: This file should be target independent. However it has kqemu hacks, so must be built for every target. */ -/* Needed early for HOST_BSD etc. */ +/* Needed early for CONFIG_BSD etc. */ #include "config-host.h" #ifdef _WIN32#include <windows.h> -#elif defined(HOST_BSD ) +#elif defined(CONFIG_BSD )#include <stdlib.h> #else #include <malloc.h>
@@ -210,7 +210,7 @@ void *qemu_memalign(size_t alignment, size_t size)if (ret !=0 )abort ();return ptr; -#elif defined(HOST_BSD ) +#elif defined(CONFIG_BSD )return oom_check (valloc (size));#else return oom_check (memalign (alignment, size));
qemu-char.c +1 -1
@@ -61,7 +61,7 @@#include <dirent.h> #include <netdb.h> #include <sys/select.h> -#ifdef HOST_BSD +#ifdef CONFIG_BSD #include <sys/stat.h> #ifdef __FreeBSD__#include <libutil.h>
savevm.c +2 -2
@@ -29,7 +29,7 @@#include <sys/time.h> #include <zlib.h> -/* Needed early for HOST_BSD etc. */ +/* Needed early for CONFIG_BSD etc. */ #include "config-host.h" #ifndef _WIN32
@@ -52,7 +52,7 @@#include <dirent.h> #include <netdb.h> #include <sys/select.h> -#ifdef HOST_BSD +#ifdef CONFIG_BSD #include <sys/stat.h> #if defined(__FreeBSD__) || defined(__DragonFly__)#include <libutil.h>
vl.c +2 -2
@@ -29,7 +29,7 @@#include <sys/time.h> #include <zlib.h> -/* Needed early for HOST_BSD etc. */ +/* Needed early for CONFIG_BSD etc. */ #include "config-host.h" /* Needed early to override system queue definitions on BSD */ #include "sys-queue.h"
@@ -56,7 +56,7 @@#include <dirent.h> #include <netdb.h> #include <sys/select.h> -#ifdef HOST_BSD +#ifdef CONFIG_BSD #include <sys/stat.h> #if defined(__FreeBSD__) || defined(__DragonFly__)#include <libutil.h>
Signature · 1 line
1.6.2.5
PATCH v3 18/47 define MAP_ANONYMOUS if it is not defined in qemu-common.h
In reply to Juan Quintela--- configure | 1 - qemu-common.h | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-)
configure +0 -1
@@ -1746,7 +1746,6 @@ fi # XXX: suppress that if [ "$bsd" = "yes" ] ; then - echo "#define MAP_ANONYMOUS MAP_ANON" >> $config_host_h echo "#define CONFIG_BSD 1" >> $config_host_h fi
qemu-common.h +3 -1
@@ -32,7 +32,9 @@#ifndef O_BINARY #define O_BINARY 0#endif - +#ifndef MAP_ANONYMOUS +#define MAP_ANONYMOUS MAP_ANON +#endif #ifndef ENOMEDIUM #define ENOMEDIUM ENODEV#endif
Signature · 1 line
1.6.2.5
PATCH v3 19/47 rename HAVE_PREADV to CONFIG_PREADV
In reply to Juan Quintela--- configure | 2 +- posix-aio-compat.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
configure +1 -1
@@ -1736,7 +1736,7 @@ if test "$iovec" = "yes" ; then echo "#define HAVE_IOVEC 1" >> $config_host_h fi if test "$preadv" = "yes" ; then - echo "#define HAVE_PREADV 1" >> $config_host_h + echo "#define CONFIG_PREADV 1" >> $config_host_h fi if test "$fdt" = "yes" ; then echo "CONFIG_FDT=y" >> $config_host_mak
posix-aio-compat.c +2 -2
@@ -33,7 +33,7 @@ static int cur_threads = 0;static int idle_threads =0 ; static TAILQ_HEAD(, qemu_paiocb) request_list; -#ifdef HAVE_PREADV +#ifdef CONFIG_PREADV static int preadv_present =1 ;#else static int preadv_present =0 ;
@@ -102,7 +102,7 @@ static size_t handle_aiocb_ioctl(struct qemu_paiocb *aiocb)return aiocb->aio_nbytes; } -#ifdef HAVE_PREADV +#ifdef CONFIG_PREADV static ssize_t qemu_preadv (int fd,const struct iovec *iov,int nr_iov,off_t offset)
Signature · 1 line
1.6.2.5
PATCH v3 20/47 rename HAVE_IOVEC to CONFIG_IOVEC
In reply to Juan Quintela--- configure | 2 +- qemu-common.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
configure +1 -1
@@ -1733,7 +1733,7 @@ if test "$blobs" = "yes" ; then echo "INSTALL_BLOBS=yes" >> $config_host_mak fi if test "$iovec" = "yes" ; then - echo "#define HAVE_IOVEC 1" >> $config_host_h + echo "#define CONFIG_IOVEC 1" >> $config_host_h fi if test "$preadv" = "yes" ; then echo "#define CONFIG_PREADV 1" >> $config_host_h
qemu-common.h +2 -2
@@ -39,8 +39,8 @@#define ENOMEDIUM ENODEV#endif -#ifndef HAVE_IOVEC -#define HAVE_IOVEC +#ifndef CONFIG_IOVEC +#define CONFIG_IOVEC struct iovec { void *iov_base; size_t iov_len;
Signature · 1 line
1.6.2.5
PATCH v3 22/47 rename HAVE_MACHINE_BSWAP_H to CONFIG_MACHINE_BSWAP_H
In reply to Juan Quintela--- bswap.h | 4 ++-- configure | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
bswap.h +2 -2
@@ -5,7 +5,7 @@#include <inttypes.h> -#ifdef HAVE_MACHINE_BSWAP_H +#ifdef CONFIG_MACHINE_BSWAP_H #include <sys/endian.h> #include <sys/types.h> #include <machine/bswap.h>
@@ -64,7 +64,7 @@ static inline uint64_t bswap64(uint64_t x) return bswap_64(x); } -#endif /* ! HAVE_MACHINE_BSWAP_H */ +#endif /* ! CONFIG_MACHINE_BSWAP_H */ static inline void bswap16s (uint16_t *s) {
configure +1 -1
@@ -1550,7 +1550,7 @@ EOF int main(void) { return bswap32(0); } EOF if $cc $ARCH_CFLAGS -o $TMPE $TMPC >/dev/null 2> /dev/null ; then - echo "#define HAVE_MACHINE_BSWAP_H 1" >> $config_host_h + echo "#define CONFIG_MACHINE_BSWAP_H 1" >> $config_host_h fi fi
Signature · 1 line
1.6.2.5
PATCH v3 23/47 rename HAVE_GPROF to TARGET_GPROF
In reply to Juan QuintelaUse was not consistent, in Makefile was TARGET_GPROF and in *h HAVE_GPROF
--- bsd-user/syscall.c | 6 +++--- configure | 2 +- linux-user/syscall.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-)
bsd-user/syscall.c +3 -3
@@ -66,7 +66,7 @@ abi_long do_freebsd_syscall(void *cpu_env, int num, abi_long arg1,switch (num) {case TARGET_FREEBSD_NR_exit: -#ifdef HAVE_GPROF +#ifdef TARGET_GPROF _mcleanup ();#endif gdb_exit (cpu_env, arg1);
@@ -138,7 +138,7 @@ abi_long do_netbsd_syscall(void *cpu_env, int num, abi_long arg1,switch (num) {case TARGET_NETBSD_NR_exit: -#ifdef HAVE_GPROF +#ifdef TARGET_GPROF _mcleanup ();#endif gdb_exit (cpu_env, arg1);
@@ -210,7 +210,7 @@ abi_long do_openbsd_syscall(void *cpu_env, int num, abi_long arg1,switch (num) {case TARGET_OPENBSD_NR_exit: -#ifdef HAVE_GPROF +#ifdef TARGET_GPROF _mcleanup ();#endif gdb_exit (cpu_env, arg1);
configure +1 -1
@@ -1583,7 +1583,7 @@ if test -n "$sparc_cpu"; then fi if test "$gprof" = "yes" ; then echo "TARGET_GPROF=yes" >> $config_host_mak - echo "#define HAVE_GPROF 1" >> $config_host_h + echo "#define TARGET_GPROF 1" >> $config_host_h fi if test "$static" = "yes" ; then echo "CONFIG_STATIC=y" >> $config_host_mak
linux-user/syscall.c +3 -3
@@ -57,7 +57,7 @@#include <netinet/ip.h> #include <netinet/tcp.h> #include <qemu-common.h> -#ifdef HAVE_GPROF +#ifdef TARGET_GPROF #include <sys/gmon.h> #endif
@@ -4162,7 +4162,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, pthread_exit(NULL); }#endif -#ifdef HAVE_GPROF +#ifdef TARGET_GPROF _mcleanup ();#endif gdb_exit (cpu_env, arg1);
@@ -5676,7 +5676,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,#ifdef __NR_exit_group/* new thread calls */ case TARGET_NR_exit_group: -#ifdef HAVE_GPROF +#ifdef TARGET_GPROF _mcleanup ();#endif gdb_exit (cpu_env, arg1);
Signature · 1 line
1.6.2.5
PATCH v3 21/47 rename HAVE_FNMATCH_H to CONFIG_FNMATCH
In reply to Juan Quintela--- acl.c | 4 ++-- configure | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
acl.c +2 -2
@@ -27,7 +27,7 @@#include "sysemu.h" #include "acl.h" -#ifdef HAVE_FNMATCH_H +#ifdef CONFIG_FNMATCH #include <fnmatch.h> #endif
@@ -79,7 +79,7 @@ int qemu_acl_party_is_allowed(qemu_acl *acl,qemu_acl_entry *entry; TAILQ_FOREACH(entry, &acl->entries, next) { -#ifdef HAVE_FNMATCH_H +#ifdef CONFIG_FNMATCH if (fnmatch (entry->match, party,0 ) ==0 )return entry->deny ?0 :1 ;#else
configure +1 -1
@@ -1637,7 +1637,7 @@ if test "$vnc_sasl" = "yes" ; then echo "#define CONFIG_VNC_SASL 1" >> $config_host_h fi if test "$fnmatch" = "yes" ; then - echo "#define HAVE_FNMATCH_H 1" >> $config_host_h + echo "#define CONFIG_FNMATCH 1" >> $config_host_h fi qemu_version=`head $source_path/VERSION` echo "VERSION=$qemu_version" >>$config_host_mak
Signature · 1 line
1.6.2.5
PATCH v3 24/47 rename HAVE_BYTESWAP_H to CONFIG_BYTESWAP_H
In reply to Juan Quintela--- bswap.h | 4 ++-- configure | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
bswap.h +2 -2
@@ -11,7 +11,7 @@#include <machine/bswap.h> #else -#ifdef HAVE_BYTESWAP_H +#ifdef CONFIG_BYTESWAP_H #include <byteswap.h> #else
@@ -47,7 +47,7 @@ (uint64_t)(((uint64_t)(__x) & (uint64_t)0xff00000000000000ULL) >> 56) )); \ }) -#endif /* !HAVE_BYTESWAP_H */ +#endif /* !CONFIG_BYTESWAP_H */ static inline uint16_t bswap16 (uint16_t x) {
configure +1 -1
@@ -1541,7 +1541,7 @@ else int main(void) { return bswap_32(0); } EOF if $cc $ARCH_CFLAGS -o $TMPE $TMPC >/dev/null 2> /dev/null ; then - echo "#define HAVE_BYTESWAP_H 1" >> $config_host_h + echo "#define CONFIG_BYTESWAP_H 1" >> $config_host_h fi cat > $TMPC << EOF #include <sys/endian.h>
Signature · 1 line
1.6.2.5
PATCH v3 25/47 rename DEBUG_TCG to CONFIG_DEBUG_TCG
In reply to Juan Quintela--- configure | 2 +- tcg/tcg.c | 2 +- tcg/tcg.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
configure +1 -1
@@ -1519,7 +1519,7 @@ arch_name=`echo $ARCH | tr '[:lower:]' '[:upper:]'` echo "#define HOST_$arch_name 1" >> $config_host_h if test "$debug_tcg" = "yes" ; then - echo "#define DEBUG_TCG 1" >> $config_host_h + echo "#define CONFIG_DEBUG_TCG 1" >> $config_host_h fi if test "$debug" = "yes" ; then echo "#define DEBUG_EXEC 1" >> $config_host_h
tcg/tcg.c +1 -1
@@ -27,7 +27,7 @@#include "config.h" -#ifndef DEBUG_TCG +#ifndef CONFIG_DEBUG_TCG /* define it to suppress various consistency checks (faster) */ #define NDEBUG #endif
tcg/tcg.h +1 -1
@@ -121,7 +121,7 @@ typedef tcg_target_ulong TCGArg;are aliases for target_ulong and host pointer sized values respectively. */ -#ifdef DEBUG_TCG +#ifdef CONFIG_DEBUG_TCG #define DEBUG_TCGV 1#endif
Signature · 1 line
1.6.2.5
PATCH v3 26/47 rename DEBUG_EXEC to CONFIG_DEBUG_EXEC
In reply to Juan Quintela--- configure | 2 +- cpu-exec.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)
configure +1 -1
@@ -1522,7 +1522,7 @@ if test "$debug_tcg" = "yes" ; then echo "#define CONFIG_DEBUG_TCG 1" >> $config_host_h fi if test "$debug" = "yes" ; then - echo "#define DEBUG_EXEC 1" >> $config_host_h + echo "#define CONFIG_DEBUG_EXEC 1" >> $config_host_h fi if test "$strip_opt" = "yes" ; then echo "STRIP_OPT=-s" >> $config_host_mak
cpu-exec.c +3 -3
@@ -46,7 +46,7 @@int tb_invalidated_flag; -//#define DEBUG_EXEC +//#define CONFIG_DEBUG_EXEC //#define DEBUG_SIGNAL int qemu_cpu_has_work (CPUState *env)
@@ -568,7 +568,7 @@ int cpu_exec(CPUState *env1) env->exception_index =EXCP_INTERRUPT ;cpu_loop_exit (); } -#ifdef DEBUG_EXEC +#ifdef CONFIG_DEBUG_EXEC if (qemu_loglevel_mask (CPU_LOG_TB_CPU )) {/* restore flags in standard format */ regs_to_env ();
@@ -614,7 +614,7 @@ int cpu_exec(CPUState *env1) next_tb =0 ; tb_invalidated_flag =0 ; } -#ifdef DEBUG_EXEC +#ifdef CONFIG_DEBUG_EXEC qemu_log_mask (CPU_LOG_EXEC ,"Trace 0x%08lx [" TARGET_FMT_lx"] %s\n" , (long )tb->tc_ptr, tb->pc,lookup_symbol (tb->pc));
Signature · 1 line
1.6.2.5
PATCH v3 27/47 rename WORDS_BIGENDIAN to HOST_WORDS_BIGENDIAN
In reply to Juan Quintela--- Makefile.target | 8 ++++---- audio/audio.h | 2 +- bswap.h | 4 ++-- configure | 4 ++-- console.c | 8 ++++---- cpu-all.h | 12 ++++++------ cpu-defs.h | 2 +- disas.c | 2 +- fpu/softfloat.h | 2 +- hw/blizzard_template.h | 2 +- hw/bt-hci.c | 2 +- hw/gus.c | 2 +- hw/omap_lcd_template.h | 2 +- hw/pl110_template.h | 6 +++--- hw/pxa2xx_template.h | 2 +- hw/vga.c | 14 +++++++------- hw/vga_template.h | 6 +++--- linux-user/arm/nwfpe/double_cpdo.c | 4 ++-- linux-user/arm/nwfpe/fpa11_cpdt.c | 4 ++-- loader.c | 4 ++-- sdl.c | 4 ++-- slirp/ip.h | 6 +++--- slirp/slirp_config.h | 2 +- slirp/tcp.h | 2 +- target-arm/neon_helper.c | 2 +- target-i386/cpu.h | 2 +- target-i386/exec.h | 2 +- target-i386/translate.c | 4 ++-- target-mips/cpu.h | 2 +- target-ppc/op_helper.c | 30 +++++++++++++++--------------- target-ppc/translate.c | 4 ++-- target-ppc/translate_init.c | 4 ++-- target-sparc/op_helper.c | 2 +- tcg/arm/tcg-target.c | 2 +- vl.c | 2 +- vnc.c | 2 +- 36 files changed, 82 insertions(+), 82 deletions(-)
Makefile.target +4 -4
@@ -234,7 +234,7 @@ LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld endif ifeq ($(ARCH),mips) -ifeq ($(WORDS_BIGENDIAN),yes) +ifeq ($(HOST_WORDS_BIGENDIAN),y) LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld else LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH)el.ld
@@ -242,7 +242,7 @@ endif endif ifeq ($(ARCH),mips64) -ifeq ($(WORDS_BIGENDIAN),yes) +ifeq ($(HOST_WORDS_BIGENDIAN),y) LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld else LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH)el.ld
@@ -377,7 +377,7 @@ LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld endif ifeq ($(ARCH),mips) -ifeq ($(WORDS_BIGENDIAN),yes) +ifeq ($(HOST_WORDS_BIGENDIAN),y) LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld else LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH)el.ld
@@ -385,7 +385,7 @@ endif endif ifeq ($(ARCH),mips64) -ifeq ($(WORDS_BIGENDIAN),yes) +ifeq ($(HOST_WORDS_BIGENDIAN),y) LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld else LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH)el.ld
audio/audio.h +1 -1
@@ -38,7 +38,7 @@ typedef enum { AUD_FMT_S32 } audfmt_e; -#ifdef WORDS_BIGENDIAN +#ifdef HOST_WORDS_BIGENDIAN #define AUDIO_HOST_ENDIANNESS 1#else #define AUDIO_HOST_ENDIANNESS 0
bswap.h +2 -2
@@ -81,7 +81,7 @@ static inline void bswap64s(uint64_t *s) *s =bswap64 (*s); } -#if defined(WORDS_BIGENDIAN ) +#if defined(HOST_WORDS_BIGENDIAN )#define be_bswap (v, size) (v)#define le_bswap (v, size) bswap ## size(v)#define be_bswaps (v, size)
@@ -203,7 +203,7 @@ static inline void cpu_to_be32wu(uint32_t *p, uint32_t v)#endif -#ifdef WORDS_BIGENDIAN +#ifdef HOST_WORDS_BIGENDIAN #define cpu_to_32wu cpu_to_be32wu#else #define cpu_to_32wu cpu_to_le32wu
configure +2 -2
@@ -1528,8 +1528,8 @@ if test "$strip_opt" = "yes" ; then echo "STRIP_OPT=-s" >> $config_host_mak fi if test "$bigendian" = "yes" ; then - echo "WORDS_BIGENDIAN=yes" >> $config_host_mak - echo "#define WORDS_BIGENDIAN 1" >> $config_host_h + echo "HOST_WORDS_BIGENDIAN=y" >> $config_host_mak + echo "#define HOST_WORDS_BIGENDIAN 1" >> $config_host_h fi echo "#define HOST_LONG_BITS $hostlongbits" >> $config_host_h if test "$mingw32" = "yes" ; then
console.c +4 -4
@@ -307,7 +307,7 @@ static void vga_bitblt(DisplayState *ds, int xs, int ys, int xd, int yd, int w, (((uint32_t)(__x) & (uint32_t)0x00ff0000UL) >> 8) | \ (((uint32_t)(__x) & (uint32_t)0xff000000UL) >> 24) )) -#ifdef WORDS_BIGENDIAN +#ifdef HOST_WORDS_BIGENDIAN #define PAT (x) x#else #define PAT (x) cbswap_32(x)
@@ -1559,7 +1559,7 @@ DisplaySurface* defaultallocator_create_displaysurface(int width, int height) surface->height = height; surface->linesize = width *4 ; surface->pf =qemu_default_pixelformat (32 ); -#ifdef WORDS_BIGENDIAN +#ifdef HOST_WORDS_BIGENDIAN surface->flags =QEMU_ALLOCATED_FLAG |QEMU_BIG_ENDIAN_FLAG ;#else surface->flags =QEMU_ALLOCATED_FLAG ;
@@ -1580,7 +1580,7 @@ DisplaySurface* defaultallocator_resize_displaysurface(DisplaySurface *surface, surface->data = (uint8_t *)qemu_realloc (surface->data, surface->linesize * surface->height); else surface->data = (uint8_t*) qemu_malloc(surface->linesize * surface->height); -#ifdef WORDS_BIGENDIAN +#ifdef HOST_WORDS_BIGENDIAN surface->flags =QEMU_ALLOCATED_FLAG |QEMU_BIG_ENDIAN_FLAG ;#else surface->flags =QEMU_ALLOCATED_FLAG ;
@@ -1598,7 +1598,7 @@ DisplaySurface* qemu_create_displaysurface_from(int width, int height, int bpp, surface->height = height; surface->linesize = linesize; surface->pf =qemu_default_pixelformat (bpp); -#ifdef WORDS_BIGENDIAN +#ifdef HOST_WORDS_BIGENDIAN surface->flags =QEMU_BIG_ENDIAN_FLAG ;#endif surface->data = data;
cpu-all.h +6 -6
@@ -27,7 +27,7 @@* WORDS_ALIGNED : if defined, the host cpu can only make word aligned * memory accesses. * -* WORDS_BIGENDIAN : if defined, the host cpu is big endian and +* HOST_WORDS_BIGENDIAN : if defined, the host cpu is big endian and * otherwise little endian. * * (TARGET_WORDS_ALIGNED : same for target cpu (not supported yet))
@@ -37,7 +37,7 @@#include "softfloat.h" -#if defined(WORDS_BIGENDIAN ) != defined(TARGET_WORDS_BIGENDIAN ) +#if defined(HOST_WORDS_BIGENDIAN ) != defined(TARGET_WORDS_BIGENDIAN )#define BSWAP_NEEDED #endif
@@ -123,7 +123,7 @@ typedef union {endian ! */ typedef union { float64 d; -#if defined(WORDS_BIGENDIAN) \ +#if defined(HOST_WORDS_BIGENDIAN) \ || (defined(__arm__) && !defined(__VFP_FP__) && !defined(CONFIG_SOFTFLOAT)) struct { uint32_t upper;
@@ -141,7 +141,7 @@ typedef union { #ifdef TARGET_SPARC typedef union { float128 q; -#if defined(WORDS_BIGENDIAN) \ +#if defined(HOST_WORDS_BIGENDIAN) \ || (defined(__arm__) && !defined(__VFP_FP__) && !defined(CONFIG_SOFTFLOAT)) struct { uint32_t upmost;
@@ -221,7 +221,7 @@ static inline void stb_p(void *ptr, int v)/* NOTE: on arm, putting 2 in /proc/sys/debug/alignment so that the kernel handles unaligned load/stores may give better results, but it is a system wide setting : bad */ -#if defined(WORDS_BIGENDIAN ) || defined(WORDS_ALIGNED ) +#if defined(HOST_WORDS_BIGENDIAN ) || defined(WORDS_ALIGNED )/* conservative code for little endian unaligned accesses */ static inline int lduw_le_p (const void *ptr)
@@ -398,7 +398,7 @@ static inline void stfq_le_p(void *ptr, float64 v) }#endif -#if !defined(WORDS_BIGENDIAN ) || defined(WORDS_ALIGNED ) +#if !defined(HOST_WORDS_BIGENDIAN ) || defined(WORDS_ALIGNED )static inline int lduw_be_p (const void *ptr) {
cpu-defs.h +1 -1
@@ -106,7 +106,7 @@ typedef struct CPUTLBEntry { sizeof(target_phys_addr_t))]; } CPUTLBEntry; -#ifdef WORDS_BIGENDIAN +#ifdef HOST_WORDS_BIGENDIAN typedef struct icount_decr_u16 { uint16_t high; uint16_t low;
disas.c +1 -1
@@ -246,7 +246,7 @@ void disas(FILE *out, void *code, unsigned long size) disasm_info.buffer_vma = (unsigned long )code; disasm_info.buffer_length = size; -#ifdef WORDS_BIGENDIAN +#ifdef HOST_WORDS_BIGENDIAN disasm_info.endian =BFD_ENDIAN_BIG ;#else disasm_info.endian =BFD_ENDIAN_LITTLE ;
fpu/softfloat.h +1 -1
@@ -146,7 +146,7 @@ typedef struct {#endif #ifdef FLOAT128 typedef struct { -#ifdef WORDS_BIGENDIAN +#ifdef HOST_WORDS_BIGENDIAN uint64_t high, low; #else uint64_t low, high;
hw/blizzard_template.h +1 -1
@@ -41,7 +41,7 @@# error unknown bit depth#endif -#ifdef WORDS_BIGENDIAN +#ifdef HOST_WORDS_BIGENDIAN # define SWAP_WORDS 1#endif
hw/bt-hci.c +1 -1
@@ -419,7 +419,7 @@ static void bt_submit_raw_acl(struct bt_piconet_s *net, int length, uint8_t *dat* be continuously allocated. We do it though, to preserve similar * behaviour between hosts. Some things, like the BD_ADDR cannot be * preserved though (for example if a real hci is used). */ -#ifdef WORDS_BIGENDIAN +#ifdef HOST_WORDS_BIGENDIAN # define HNDL (raw) bswap16(raw)#else # define HNDL (raw) (raw)
hw/gus.c +1 -1
@@ -35,7 +35,7 @@#define ldebug (...)#endif -#ifdef WORDS_BIGENDIAN +#ifdef HOST_WORDS_BIGENDIAN #define GUS_ENDIANNESS 1#else #define GUS_ENDIANNESS 0
hw/omap_lcd_template.h +1 -1
@@ -152,7 +152,7 @@ static void glue(draw_line12_, DEPTH)(void *opaque,static void glue (draw_line16_ ,DEPTH )(void *opaque,uint8_t *d,const uint8_t *s,int width,int deststep) { -#if DEPTH ==16 && defined(WORDS_BIGENDIAN ) == defined(TARGET_WORDS_BIGENDIAN ) +#if DEPTH ==16 && defined(HOST_WORDS_BIGENDIAN ) == defined(TARGET_WORDS_BIGENDIAN )memcpy (d, s, width *2 );#else uint16_t v;
hw/pl110_template.h +3 -3
@@ -95,18 +95,18 @@ static drawfn glue(pl110_draw_fn_,BITS)[36] =#if ORDER ==0 #define NAME glue(glue(lblp_, BORDER), BITS) -#ifdef WORDS_BIGENDIAN +#ifdef HOST_WORDS_BIGENDIAN #define SWAP_WORDS 1#endif #elif ORDER ==1 #define NAME glue(glue(bbbp_, BORDER), BITS) -#ifndef WORDS_BIGENDIAN +#ifndef HOST_WORDS_BIGENDIAN #define SWAP_WORDS 1#endif #else #define SWAP_PIXELS 1#define NAME glue(glue(lbbp_, BORDER), BITS) -#ifdef WORDS_BIGENDIAN +#ifdef HOST_WORDS_BIGENDIAN #define SWAP_WORDS 1#endif #endif
hw/pxa2xx_template.h +1 -1
@@ -23,7 +23,7 @@# error unknown bit depth#endif -#ifdef WORDS_BIGENDIAN +#ifdef HOST_WORDS_BIGENDIAN # define SWAP_WORDS 1#endif
hw/vga.c +7 -7
@@ -74,19 +74,19 @@ const uint8_t gr_mask[16] = { (((uint32_t)(__x) & (uint32_t)0x00ff0000UL) >> 8) | \ (((uint32_t)(__x) & (uint32_t)0xff000000UL) >> 24) )) -#ifdef WORDS_BIGENDIAN +#ifdef HOST_WORDS_BIGENDIAN #define PAT (x) cbswap_32(x)#else #define PAT (x) (x)#endif -#ifdef WORDS_BIGENDIAN +#ifdef HOST_WORDS_BIGENDIAN #define BIG 1#else #define BIG 0#endif -#ifdef WORDS_BIGENDIAN +#ifdef HOST_WORDS_BIGENDIAN #define GET_PLANE (data, p) (((data) >> (24 - (p) * 8)) & 0xff)#else #define GET_PLANE (data, p) (((data) >> ((p) * 8)) & 0xff)
@@ -113,7 +113,7 @@ static const uint32_t mask16[16] = {#undef PAT -#ifdef WORDS_BIGENDIAN +#ifdef HOST_WORDS_BIGENDIAN #define PAT (x) (x)#else #define PAT (x) cbswap_32(x)
@@ -1369,7 +1369,7 @@ static void vga_draw_text(VGAState *s, int full_update)if (cx > cx_max) cx_max = cx; *ch_attr_ptr = ch_attr; -#ifdef WORDS_BIGENDIAN +#ifdef HOST_WORDS_BIGENDIAN ch = ch_attr >>8 ; cattr = ch_attr &0xff ;#else
@@ -1632,7 +1632,7 @@ static void vga_draw_graphic(VGAState *s, int full_update) disp_width != s->last_width || height != s->last_height || s->last_depth != depth) { -#if defined(WORDS_BIGENDIAN ) == defined(TARGET_WORDS_BIGENDIAN ) +#if defined(HOST_WORDS_BIGENDIAN ) == defined(TARGET_WORDS_BIGENDIAN )if (depth ==16 || depth ==32 ) {#else if (depth ==32 ) {
@@ -1641,7 +1641,7 @@ static void vga_draw_graphic(VGAState *s, int full_update) s->ds->surface =qemu_create_displaysurface_from (disp_width, height, depth, s->line_offset, s->vram_ptr + (s->start_addr *4 )); -#if defined(WORDS_BIGENDIAN ) != defined(TARGET_WORDS_BIGENDIAN ) +#if defined(HOST_WORDS_BIGENDIAN ) != defined(TARGET_WORDS_BIGENDIAN ) s->ds->surface->pf =qemu_different_endianness_pixelformat (depth);#endif dpy_resize (s->ds);
hw/vga_template.h +3 -3
@@ -417,7 +417,7 @@ void glue(vga_draw_cursor_line_, DEPTH)(uint8_t *d1,static void glue (vga_draw_line15_ ,PIXEL_NAME )(VGAState *s1,uint8_t *d,const uint8_t *s,int width) { -#if DEPTH ==15 && defined(WORDS_BIGENDIAN ) == defined(TARGET_WORDS_BIGENDIAN ) +#if DEPTH ==15 && defined(HOST_WORDS_BIGENDIAN ) == defined(TARGET_WORDS_BIGENDIAN )memcpy (d, s, width *2 );#else int w;
@@ -442,7 +442,7 @@ static void glue(vga_draw_line15_, PIXEL_NAME)(VGAState *s1, uint8_t *d,static void glue (vga_draw_line16_ ,PIXEL_NAME )(VGAState *s1,uint8_t *d,const uint8_t *s,int width) { -#if DEPTH ==16 && defined(WORDS_BIGENDIAN ) == defined(TARGET_WORDS_BIGENDIAN ) +#if DEPTH ==16 && defined(HOST_WORDS_BIGENDIAN ) == defined(TARGET_WORDS_BIGENDIAN )memcpy (d, s, width *2 );#else int w;
@@ -493,7 +493,7 @@ static void glue(vga_draw_line24_, PIXEL_NAME)(VGAState *s1, uint8_t *d,static void glue (vga_draw_line32_ ,PIXEL_NAME )(VGAState *s1,uint8_t *d,const uint8_t *s,int width) { -#if DEPTH ==32 && defined(WORDS_BIGENDIAN ) == defined(TARGET_WORDS_BIGENDIAN ) && !defined(BGR_FORMAT ) +#if DEPTH ==32 && defined(HOST_WORDS_BIGENDIAN ) == defined(TARGET_WORDS_BIGENDIAN ) && !defined(BGR_FORMAT )memcpy (d, s, width *4 );#else int w;
linux-user/arm/nwfpe/double_cpdo.c +2 -2
@@ -150,7 +150,7 @@ unsigned int DoubleCPDO(const unsigned int opcode)case MNF_CODE : {unsigned int *p = (unsigned int *)&rFm; -#ifdef WORDS_BIGENDIAN +#ifdef HOST_WORDS_BIGENDIAN p[0 ] ^=0x80000000 ;#else p[1 ] ^=0x80000000 ;
@@ -162,7 +162,7 @@ unsigned int DoubleCPDO(const unsigned int opcode)case ABS_CODE : {unsigned int *p = (unsigned int *)&rFm; -#ifdef WORDS_BIGENDIAN +#ifdef HOST_WORDS_BIGENDIAN p[0 ] &=0x7fffffff ;#else p[1 ] &=0x7fffffff ;
linux-user/arm/nwfpe/fpa11_cpdt.c +2 -2
@@ -44,7 +44,7 @@ void loadDouble(const unsigned int Fn, target_ulong addr)unsigned int *p; p = (unsigned int *)&fpa11->fpreg[Fn].fDouble; fpa11->fType[Fn] = typeDouble; -#ifdef WORDS_BIGENDIAN +#ifdef HOST_WORDS_BIGENDIAN /* FIXME - handle failure of get_user() */ get_user_u32 (p[0 ], addr);/* sign & exponent */ get_user_u32 (p[1 ], addr +4 );
@@ -147,7 +147,7 @@ void storeDouble(const unsigned int Fn, target_ulong addr)default : val = fpa11->fpreg[Fn].fDouble; }/* FIXME - handle put_user() failures */ -#ifdef WORDS_BIGENDIAN +#ifdef HOST_WORDS_BIGENDIAN put_user_u32 (p[0 ], addr);/* msw */ put_user_u32 (p[1 ], addr +4 );/* lsw */ #else
loader.c +2 -2
@@ -324,7 +324,7 @@ int load_elf(const char *filename, int64_t address_offset, e_ident[2] != ELFMAG2 || e_ident[3] != ELFMAG3) goto fail; -#ifdef WORDS_BIGENDIAN +#ifdef HOST_WORDS_BIGENDIAN data_order =ELFDATA2MSB ;#else data_order =ELFDATA2LSB ;
@@ -358,7 +358,7 @@ int load_elf(const char *filename, int64_t address_offset,static void bswap_uboot_header (uboot_image_header_t *hdr) { -#ifndef WORDS_BIGENDIAN +#ifndef HOST_WORDS_BIGENDIAN bswap32s (&hdr->ih_magic);bswap32s (&hdr->ih_hcrc);bswap32s (&hdr->ih_time);
sdl.c +2 -2
@@ -185,7 +185,7 @@ static DisplaySurface* sdl_create_displaysurface(int width, int height) surface->linesize = width * host_format.BytesPerPixel; surface->pf =sdl_to_qemu_pixelformat (&host_format); } -#ifdef WORDS_BIGENDIAN +#ifdef HOST_WORDS_BIGENDIAN surface->flags =QEMU_ALLOCATED_FLAG |QEMU_BIG_ENDIAN_FLAG ;#else surface->flags =QEMU_ALLOCATED_FLAG ;
@@ -204,7 +204,7 @@ static DisplaySurface* sdl_create_displaysurface(int width, int height) surface->linesize = real_screen->pitch; surface->data = real_screen->pixels; -#ifdef WORDS_BIGENDIAN +#ifdef HOST_WORDS_BIGENDIAN surface->flags =QEMU_REALPIXELS_FLAG |QEMU_BIG_ENDIAN_FLAG ;#else surface->flags =QEMU_REALPIXELS_FLAG ;
slirp/ip.h +3 -3
@@ -33,7 +33,7 @@#ifndef _IP_H_#define _IP_H_ -#ifdef WORDS_BIGENDIAN +#ifdef HOST_WORDS_BIGENDIAN # ifndef NTOHL # define NTOHL (d)# endif
@@ -73,7 +73,7 @@ typedef u_int32_t n_long; /* long as received from the net */* Structure of an internet header, naked of options. */ struct ip { -#ifdef WORDS_BIGENDIAN +#ifdef HOST_WORDS_BIGENDIAN u_int ip_v:4 ,/* version */ ip_hl:4 ;/* header length */ #else
@@ -139,7 +139,7 @@ struct ip_timestamp {u_int8_t ipt_code;/* IPOPT_TS */ u_int8_t ipt_len;/* size of structure (variable) */ u_int8_t ipt_ptr;/* index of current entry */ -#ifdef WORDS_BIGENDIAN +#ifdef HOST_WORDS_BIGENDIAN u_int ipt_oflw:4, /* overflow counter */ ipt_flg:4; /* flags, see below */#else
slirp/slirp_config.h +1 -1
@@ -86,7 +86,7 @@#undef HAVE_SYS_BITYPES_H/* Define if the machine is big endian */ -//#undef WORDS_BIGENDIAN +//#undef HOST_WORDS_BIGENDIAN /* Define if your sprintf returns char * instead of int */ #undef BAD_SPRINTF
slirp/tcp.h +1 -1
@@ -50,7 +50,7 @@ struct tcphdr {u_int16_t th_dport;/* destination port */ tcp_seq th_seq;/* sequence number */ tcp_seq th_ack;/* acknowledgement number */ -#ifdef WORDS_BIGENDIAN +#ifdef HOST_WORDS_BIGENDIAN u_int th_off:4, /* data offset */ th_x2:4; /* (unused) */#else
target-arm/neon_helper.c +1 -1
@@ -49,7 +49,7 @@ typedef struct \ { \type v1; \ } neon_##name; -#ifdef WORDS_BIGENDIAN +#ifdef HOST_WORDS_BIGENDIAN #define NEON_TYPE2 (name, type) \ typedef struct \ { \
target-i386/cpu.h +1 -1
@@ -528,7 +528,7 @@ typedef union {uint64_t q; } MMXReg; -#ifdef WORDS_BIGENDIAN +#ifdef HOST_WORDS_BIGENDIAN #define XMM_B (n) _b[15 - (n)]#define XMM_W (n) _w[7 - (n)]#define XMM_L (n) _l[3 - (n)]
target-i386/exec.h +1 -1
@@ -155,7 +155,7 @@ typedef union {/* NOTE: arm is horrible as double 32 bit words are stored in big endian ! */ typedef union { double d; -#if !defined(WORDS_BIGENDIAN) && !defined(__arm__) +#if !defined(HOST_WORDS_BIGENDIAN) && !defined(__arm__) struct { uint32_t lower; int32_t upper;
target-i386/translate.c +2 -2
@@ -255,7 +255,7 @@ static inline void gen_op_andl_A0_ffff(void)#endif /* !TARGET_X86_64 */ -#if defined(WORDS_BIGENDIAN ) +#if defined(HOST_WORDS_BIGENDIAN )#define REG_B_OFFSET (sizeof(target_ulong) - 1)#define REG_H_OFFSET (sizeof(target_ulong) - 2)#define REG_W_OFFSET (sizeof(target_ulong) - 2)
@@ -7151,7 +7151,7 @@ static target_ulong disas_insn(DisasContext *s, target_ulong pc_start)break ;case 4 :/* smsw */ gen_svm_check_intercept (s, pc_start,SVM_EXIT_READ_CR0 ); -#if definedTARGET_X86_64 && definedWORDS_BIGENDIAN +#if definedTARGET_X86_64 && definedHOST_WORDS_BIGENDIAN tcg_gen_ld32u_tl(cpu_T[0], cpu_env, offsetof(CPUX86State,cr[0]) + 4);#else tcg_gen_ld32u_tl(cpu_T[0], cpu_env, offsetof(CPUX86State,cr[0]));
target-mips/cpu.h +1 -1
@@ -62,7 +62,7 @@ union fpr_t {/* define FP_ENDIAN_IDX to access the same location * in the fpr_t union regardless of the host endianess */ -#if defined(WORDS_BIGENDIAN ) +#if defined(HOST_WORDS_BIGENDIAN )# define FP_ENDIAN_IDX 1#else # define FP_ENDIAN_IDX 0
target-ppc/op_helper.c +15 -15
@@ -1921,7 +1921,7 @@ target_ulong helper_dlmzb (target_ulong high, target_ulong low, uint32_t update_/*****************************************************************************/ /* Altivec extension helpers */ -#if defined(WORDS_BIGENDIAN ) +#if defined(HOST_WORDS_BIGENDIAN )#define HI_IDX 0#define LO_IDX 1#else
@@ -1929,7 +1929,7 @@ target_ulong helper_dlmzb (target_ulong high, target_ulong low, uint32_t update_#define LO_IDX 0#endif -#if defined(WORDS_BIGENDIAN ) +#if defined(HOST_WORDS_BIGENDIAN )#define VECTOR_FOR_INORDER_I (index, element) \ for (index = 0; index < ARRAY_SIZE(r->element); index++)#else
@@ -2055,7 +2055,7 @@ STVE(stvewx, stl, bswap32, u32)void helper_mtvscr (ppc_avr_t *r) { -#if defined(WORDS_BIGENDIAN ) +#if defined(HOST_WORDS_BIGENDIAN ) env->vscr = r->u32[3 ];#else env->vscr = r->u32[0 ];
@@ -2422,7 +2422,7 @@ void helper_vmladduhm (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, ppc_avr_t *c) } \ *r = result; \ } -#if defined(WORDS_BIGENDIAN ) +#if defined(HOST_WORDS_BIGENDIAN )#define MRGHI 0#define MRGLO 1#else
@@ -2583,7 +2583,7 @@ void helper_vperm (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, ppc_avr_t *c)int i; VECTOR_FOR_INORDER_I (i, u8) {int s = c->u8[i] &0x1f ; -#if defined(WORDS_BIGENDIAN ) +#if defined(HOST_WORDS_BIGENDIAN )int index = s &0xf ;#else int index =15 - (s &0xf );
@@ -2597,7 +2597,7 @@ void helper_vperm (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, ppc_avr_t *c) *r = result; } -#if defined(WORDS_BIGENDIAN ) +#if defined(HOST_WORDS_BIGENDIAN )#define PKBIG 1#else #define PKBIG 0
@@ -2606,7 +2606,7 @@ void helper_vpkpx (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) {int i, j;ppc_avr_t result; -#if defined(WORDS_BIGENDIAN ) +#if defined(HOST_WORDS_BIGENDIAN )const ppc_avr_t *x[2 ] = { a, b };#else const ppc_avr_t *x[2 ] = { b, a };
@@ -2723,7 +2723,7 @@ void helper_vlogefp (ppc_avr_t *r, ppc_avr_t *b) } } -#if defined(WORDS_BIGENDIAN ) +#if defined(HOST_WORDS_BIGENDIAN )#define LEFT 0#define RIGHT 1#else
@@ -2783,7 +2783,7 @@ void helper_vsldoi (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b, uint32_t shift)int i;ppc_avr_t result; -#if defined(WORDS_BIGENDIAN ) +#if defined(HOST_WORDS_BIGENDIAN )for (i =0 ; i <ARRAY_SIZE (r->u8); i++) {int index = sh + i;if (index >0xf ) {
@@ -2809,7 +2809,7 @@ void helper_vslo (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) {int sh = (b->u8[LO_IDX *0xf ] >>3 ) &0xf ; -#if defined (WORDS_BIGENDIAN ) +#if defined (HOST_WORDS_BIGENDIAN )memmove (&r->u8[0 ], &a->u8[sh],16 -sh);memset (&r->u8[16 -sh],0 , sh);#else
@@ -2820,7 +2820,7 @@ void helper_vslo (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b)/* Experimental testing shows that hardware masks the immediate. */ #define _SPLAT_MASKED (element) (splat & (ARRAY_SIZE(r->element) - 1)) -#if defined(WORDS_BIGENDIAN ) +#if defined(HOST_WORDS_BIGENDIAN )#define SPLAT_ELEMENT (element) _SPLAT_MASKED(element)#else #define SPLAT_ELEMENT (element) (ARRAY_SIZE(r->element)-1 - _SPLAT_MASKED(element))
@@ -2877,7 +2877,7 @@ void helper_vsro (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) {int sh = (b->u8[LO_IDX *0xf ] >>3 ) &0xf ; -#if defined (WORDS_BIGENDIAN ) +#if defined (HOST_WORDS_BIGENDIAN )memmove (&r->u8[sh], &a->u8[0 ],16 -sh);memset (&r->u8[0 ],0 , sh);#else
@@ -2901,7 +2901,7 @@ void helper_vsumsws (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b)ppc_avr_t result;int sat =0 ; -#if defined(WORDS_BIGENDIAN ) +#if defined(HOST_WORDS_BIGENDIAN ) upper =ARRAY_SIZE (r->s32)-1 ;#else upper =0 ;
@@ -2925,7 +2925,7 @@ void helper_vsum2sws (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b)ppc_avr_t result;int sat =0 ; -#if defined(WORDS_BIGENDIAN ) +#if defined(HOST_WORDS_BIGENDIAN ) upper =1 ;#else upper =0 ;
@@ -2997,7 +2997,7 @@ void helper_vsum4ubs (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) } } -#if defined(WORDS_BIGENDIAN ) +#if defined(HOST_WORDS_BIGENDIAN )#define UPKHI 1#define UPKLO 0#else
target-ppc/translate.c +2 -2
@@ -120,7 +120,7 @@ void ppc_translate_init(void) cpu_reg_names_size -= (i <10 ) ?4 :5 ;snprintf (p, cpu_reg_names_size,"avr%dH" , i); -#ifdef WORDS_BIGENDIAN +#ifdef HOST_WORDS_BIGENDIAN cpu_avrh[i] =tcg_global_mem_new_i64 (TCG_AREG0 , offsetof(CPUState, avr[i].u64[0]), p);#else
@@ -131,7 +131,7 @@ void ppc_translate_init(void) cpu_reg_names_size -= (i <10 ) ?6 :7 ;snprintf (p, cpu_reg_names_size,"avr%dL" , i); -#ifdef WORDS_BIGENDIAN +#ifdef HOST_WORDS_BIGENDIAN cpu_avrl[i] =tcg_global_mem_new_i64 (TCG_AREG0 , offsetof(CPUState, avr[i].u64[1]), p);#else
target-ppc/translate_init.c +2 -2
@@ -9388,7 +9388,7 @@ static int gdb_set_float_reg(CPUState *env, uint8_t *mem_buf, int n)static int gdb_get_avr_reg (CPUState *env,uint8_t *mem_buf,int n) {if (n <32 ) { -#ifdef WORDS_BIGENDIAN +#ifdef HOST_WORDS_BIGENDIAN stq_p (mem_buf, env->avr[n].u64[0 ]);stq_p (mem_buf+8 , env->avr[n].u64[1 ]);#else
@@ -9411,7 +9411,7 @@ static int gdb_get_avr_reg(CPUState *env, uint8_t *mem_buf, int n)static int gdb_set_avr_reg (CPUState *env,uint8_t *mem_buf,int n) {if (n <32 ) { -#ifdef WORDS_BIGENDIAN +#ifdef HOST_WORDS_BIGENDIAN env->avr[n].u64[0 ] =ldq_p (mem_buf); env->avr[n].u64[1 ] =ldq_p (mem_buf+8 );#else
target-sparc/op_helper.c +1 -1
@@ -385,7 +385,7 @@ void helper_faligndata(void) *((uint64_t *)&DT0 ) = tmp; } -#ifdef WORDS_BIGENDIAN +#ifdef HOST_WORDS_BIGENDIAN #define VIS_B64 (n) b[7 - (n)]#define VIS_W64 (n) w[3 - (n)]#define VIS_SW64 (n) sw[3 - (n)]
tcg/arm/tcg-target.c +1 -1
@@ -282,7 +282,7 @@ static inline void tcg_out_b(TCGContext *s, int cond, int32_t offset)static inline void tcg_out_b_noaddr (TCGContext *s,int cond) { -#ifdef WORDS_BIGENDIAN +#ifdef HOST_WORDS_BIGENDIAN tcg_out8 (s, (cond <<4 ) |0x0a ); s->code_ptr +=3 ;#else
vl.c +1 -1
@@ -516,7 +516,7 @@ uint64_t muldiv64(uint64_t a, uint32_t b, uint32_t c)union {uint64_t ll;struct { -#ifdef WORDS_BIGENDIAN +#ifdef HOST_WORDS_BIGENDIAN uint32_t high, low;#else uint32_t low, high;
vnc.c +1 -1
@@ -1656,7 +1656,7 @@ static void pixel_format_message (VncState *vs) {vnc_write_u8 (vs, vs->ds->surface->pf.bits_per_pixel);/* bits-per-pixel */ vnc_write_u8 (vs, vs->ds->surface->pf.depth);/* depth */ -#ifdef WORDS_BIGENDIAN +#ifdef HOST_WORDS_BIGENDIAN vnc_write_u8 (vs,1 );/* big-endian-flag */ #else vnc_write_u8 (vs,0 );/* big-endian-flag */
Signature · 1 line
1.6.2.5
PATCH v3 28/47 Add CONFIG_POSIX
In reply to Juan QuintelaWe need a way to define posix-like (a.k.a. no win32)
--- configure | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
configure +1 -0
@@ -1536,6 +1536,7 @@ if test "$mingw32" = "yes" ; then echo "CONFIG_WIN32=y" >> $config_host_mak echo "#define CONFIG_WIN32 1" >> $config_host_h else + echo "CONFIG_POSIX=y" >> $config_host_mak cat > $TMPC << EOF #include <byteswap.h> int main(void) { return bswap_32(0); }
Signature · 1 line
1.6.2.5
PATCH v3 29/47 Use CONFIG_POSIX to simplify Makefile
In reply to Juan Quintela--- Makefile | 21 +++++---------------- 1 files changed, 5 insertions(+), 16 deletions(-)
Makefile +5 -16
@@ -62,21 +62,13 @@ recurse-all: $(SUBDIR_RULES) block-obj-y = cutils.o cache-utils.o qemu-malloc.o qemu-option.o module.o block-obj-y += nbd.o block.o aio.o aes.o +block-obj-$(CONFIG_AIO) += posix-aio-compat.o block-nested-y += cow.o qcow.o vmdk.o cloop.o dmg.o bochs.o vpc.o vvfat.o block-nested-y += qcow2.o qcow2-refcount.o qcow2-cluster.o qcow2-snapshot.o block-nested-y += parallels.o nbd.o - - -ifdef CONFIG_WIN32 -block-nested-y += raw-win32.o -else -ifdef CONFIG_AIO -block-obj-y += posix-aio-compat.o -endif -block-nested-y += raw-posix.o -endif - +block-nested-$(CONFIG_WIN32) += raw-win32.o +block-nested-$(CONFIG_POSIX) += raw-posix.o block-nested-$(CONFIG_CURL) += curl.o block-obj-y += $(addprefix block/, $(block-nested-y))
@@ -112,11 +104,8 @@ ifdef CONFIG_BRLAPI LIBS+=-lbrlapi endif -ifdef CONFIG_WIN32 -obj-y += tap-win32.o -else -obj-y += migration-exec.o -endif +obj-$(CONFIG_WIN32) += tap-win32.o +obj-$(CONFIG_POSIX) += migration-exec.o ifdef CONFIG_COREAUDIO AUDIO_PT = y
Signature · 1 line
1.6.2.5
PATCH v3 30/47 the else part of this test is obsolete We are testing for sdl = yes inside the else part of the test if sdl = yes
In reply to Juan Quintela--- configure | 8 +------- 1 files changed, 1 insertions(+), 7 deletions(-)
configure +1 -7
@@ -926,13 +926,7 @@ EOF fi fi # static link fi # sdl compile test -else - # Make sure to disable cocoa if sdl was set - if test "$sdl" = "yes" ; then - cocoa="no" - audio_drv_list="`echo $audio_drv_list | sed s,coreaudio,,g`" - fi -fi # -z $sdl +fi if test "$sdl" = "yes" ; then cat > $TMPC <<EOF
Signature · 1 line
1.6.2.5
PATCH v3 33/47 instead of setup sdl_x11 just add -lX11 to sdl_libs
In reply to Juan Quintela--- configure | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-)
configure +1 -4
@@ -201,7 +201,6 @@ aix="no" blobs="yes" fdt="yes" sdl="yes" -sdl_x11="no" xen="yes" pkgversion=""
@@ -940,7 +939,7 @@ cat > $TMPC <<EOF int main(void) { return 0; } EOF if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} $sdl_cflags $TMPC $sdl_libs > /dev/null 2>&1 ; then - sdl_x11="yes" + sdl_libs="$sdl_libs -lX11" fi fi
@@ -1659,8 +1658,6 @@ if test "$sdl1" = "yes" ; then echo "CONFIG_SDL=y" >> $config_host_mak if test "$target_softmmu" = "no" -o "$static" = "yes"; then echo "SDL_LIBS=$sdl_static_libs" >> $config_host_mak - elif test "$sdl_x11" = "yes" ; then - echo "SDL_LIBS=$sld_libs -lX11" >> $config_host_mak else echo "SDL_LIBS=$sdl_libs`" >> $config_host_mak fi
Signature · 1 line
1.6.2.5
PATCH v3 31/47 sdl_config value was always sdl-config
In reply to Juan Quintela--- configure | 21 ++++++++++----------- 1 files changed, 10 insertions(+), 11 deletions(-)
configure +10 -11
@@ -893,7 +893,6 @@ fi sdl_too_old=no if test "$sdl" = "yes" ; then - sdl_config="sdl-config" sdl=no sdl_static=no
@@ -902,8 +901,8 @@ cat > $TMPC << EOF #undef main /* We don't want SDL to override our main() */ int main( void ) { return SDL_Init (SDL_INIT_VIDEO); } EOF - if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} `$sdl_config --cflags 2> /dev/null` $TMPC `$sdl_config --libs 2> /dev/null` > $TMPSDLLOG 2>&1 ; then - _sdlversion=`$sdl_config --version | sed 's/[^0-9]//g'` + if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} `sdl-config --cflags 2> /dev/null` $TMPC `sdl-config --libs 2> /dev/null` > $TMPSDLLOG 2>&1 ; then + _sdlversion=`sdl-config --version | sed 's/[^0-9]//g'` if test "$_sdlversion" -lt 121 ; then sdl_too_old=yes else
@@ -915,13 +914,13 @@ EOF # static link with sdl ? if test "$sdl" = "yes" ; then aa="no" - `$sdl_config --static-libs 2>/dev/null | grep \\\-laa > /dev/null` && aa="yes" - sdl_static_libs=`$sdl_config --static-libs 2>/dev/null` + `sdl-config --static-libs 2>/dev/null | grep \\\-laa > /dev/null` && aa="yes" + sdl_static_libs=`sdl-config --static-libs 2>/dev/null` if [ "$aa" = "yes" ] ; then sdl_static_libs="$sdl_static_libs `aalib-config --static-libs`" fi - if $cc -o $TMPE ${OS_CFLAGS} `$sdl_config --cflags 2> /dev/null` $TMPC $sdl_static_libs > /dev/null 2> /dev/null; then + if $cc -o $TMPE ${OS_CFLAGS} `sdl-config --cflags 2> /dev/null` $TMPC $sdl_static_libs > /dev/null 2> /dev/null; then sdl_static=yes fi fi # static link
@@ -938,7 +937,7 @@ cat > $TMPC <<EOF #endif int main(void) { return 0; } EOF - if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} `$sdl_config --cflags 2> /dev/null` $TMPC `$sdl_config --libs 2> /dev/null` > /dev/null 2>&1 ; then + if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} `sdl-config --cflags 2> /dev/null` $TMPC `sdl-config --libs 2> /dev/null` > /dev/null 2>&1 ; then sdl_x11="yes" fi fi
@@ -1659,14 +1658,14 @@ if test "$sdl1" = "yes" ; then if test "$target_softmmu" = "no" -o "$static" = "yes"; then echo "SDL_LIBS=$sdl_static_libs" >> $config_host_mak elif test "$sdl_x11" = "yes" ; then - echo "SDL_LIBS=`$sdl_config --libs` -lX11" >> $config_host_mak + echo "SDL_LIBS=`sdl-config --libs` -lX11" >> $config_host_mak else - echo "SDL_LIBS=`$sdl_config --libs`" >> $config_host_mak + echo "SDL_LIBS=`sdl-config --libs`" >> $config_host_mak fi if [ "${aa}" = "yes" ] ; then - echo "SDL_CFLAGS=`$sdl_config --cflags` `aalib-config --cflags`" >> $config_host_mak + echo "SDL_CFLAGS=`sdl-config --cflags` `aalib-config --cflags`" >> $config_host_mak else - echo "SDL_CFLAGS=`$sdl_config --cflags`" >> $config_host_mak + echo "SDL_CFLAGS=`sdl-config --cflags`" >> $config_host_mak fi fi if test "$cocoa" = "yes" ; then
Signature · 1 line
1.6.2.5
PATCH v3 32/47 Calculate sdl_libs and sdl_flags and use them everywhere
In reply to Juan Quintela--- configure | 16 +++++++++------- 1 files changed, 9 insertions(+), 7 deletions(-)
configure +9 -7
@@ -901,7 +901,9 @@ cat > $TMPC << EOF #undef main /* We don't want SDL to override our main() */ int main( void ) { return SDL_Init (SDL_INIT_VIDEO); } EOF - if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} `sdl-config --cflags 2> /dev/null` $TMPC `sdl-config --libs 2> /dev/null` > $TMPSDLLOG 2>&1 ; then + sdl_cflags=`sdl-config --cflags 2> /dev/null` + sdl_libs=`sdl-config --libs 2> /dev/null` + if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} $sdl_cflags $TMPC $sdl_libs > $TMPSDLLOG 2>&1 ; then _sdlversion=`sdl-config --version | sed 's/[^0-9]//g'` if test "$_sdlversion" -lt 121 ; then sdl_too_old=yes
@@ -920,7 +922,7 @@ EOF sdl_static_libs="$sdl_static_libs `aalib-config --static-libs`" fi - if $cc -o $TMPE ${OS_CFLAGS} `sdl-config --cflags 2> /dev/null` $TMPC $sdl_static_libs > /dev/null 2> /dev/null; then + if $cc -o $TMPE ${OS_CFLAGS} $sdl_cflags $TMPC $sdl_static_libs > /dev/null 2> /dev/null; then sdl_static=yes fi fi # static link
@@ -937,7 +939,7 @@ cat > $TMPC <<EOF #endif int main(void) { return 0; } EOF - if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} `sdl-config --cflags 2> /dev/null` $TMPC `sdl-config --libs 2> /dev/null` > /dev/null 2>&1 ; then + if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} $sdl_cflags $TMPC $sdl_libs > /dev/null 2>&1 ; then sdl_x11="yes" fi fi
@@ -1658,14 +1660,14 @@ if test "$sdl1" = "yes" ; then if test "$target_softmmu" = "no" -o "$static" = "yes"; then echo "SDL_LIBS=$sdl_static_libs" >> $config_host_mak elif test "$sdl_x11" = "yes" ; then - echo "SDL_LIBS=`sdl-config --libs` -lX11" >> $config_host_mak + echo "SDL_LIBS=$sld_libs -lX11" >> $config_host_mak else - echo "SDL_LIBS=`sdl-config --libs`" >> $config_host_mak + echo "SDL_LIBS=$sdl_libs`" >> $config_host_mak fi if [ "${aa}" = "yes" ] ; then - echo "SDL_CFLAGS=`sdl-config --cflags` `aalib-config --cflags`" >> $config_host_mak + echo "SDL_CFLAGS=$sdl_cflags `aalib-config --cflags`" >> $config_host_mak else - echo "SDL_CFLAGS=`sdl-config --cflags`" >> $config_host_mak + echo "SDL_CFLAGS=$sdl_cflags" >> $config_host_mak fi fi if test "$cocoa" = "yes" ; then
Signature · 1 line
1.6.2.5
PATCH v3 37/47 Define and use xen libs in a single place
In reply to Juan Quintela--- configure | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-)
configure +8 -7
@@ -874,16 +874,17 @@ fi # xen probe if test "$xen" = "yes" ; then -cat > $TMPC <<EOF + xen_libs="-lxenstore -lxenctrl -lxenguest" + cat > $TMPC <<EOF #include <xenctrl.h> #include <xs.h> int main(void) { xs_daemon_open(); xc_interface_open(); return 0; } EOF - if $cc $CFLAGS $ARCH_CFLAGS -c -o $TMPO $TMPC $LDFLAGS -lxenstore -lxenctrl 2> /dev/null > /dev/null ; then - : - else - xen="no" - fi + if $cc $CFLAGS $ARCH_CFLAGS -c -o $TMPO $TMPC $LDFLAGS $xen_libs 2> /dev/null > /dev/null ; then + : + else + xen="no" + fi fi ##########################################
@@ -1691,7 +1692,7 @@ if test "$bluez" = "yes" ; then echo "#define CONFIG_BLUEZ 1" >> $config_host_h fi if test "$xen" = "yes" ; then - echo "XEN_LIBS=-lxenstore -lxenctrl -lxenguest" >> $config_host_mak + echo "XEN_LIBS=$xen_libs" >> $config_host_mak fi if test "$aio" = "yes" ; then echo "#define CONFIG_AIO 1" >> $config_host_h
Signature · 1 line
1.6.2.5
PATCH v3 38/47 simplify curses library selection
In reply to Juan Quintela--- configure | 15 +++++---------- 1 files changed, 5 insertions(+), 10 deletions(-)
configure +5 -10
@@ -1099,8 +1099,6 @@ fi # -z $brlapi # curses probe if test "$curses" = "yes" ; then - curses=no - ncurses=no cat > $TMPC << EOF #include <curses.h> #ifdef __OpenBSD__
@@ -1109,10 +1107,11 @@ if test "$curses" = "yes" ; then int main(void) { resize_term(0, 0); return curses_version(); } EOF if $cc $ARCH_CFLAGS -o $TMPE $TMPC -lncurses > /dev/null 2> /dev/null ; then - curses=yes - ncurses=yes + curses_libs="-lncurses" elif $cc $ARCH_CFLAGS -o $TMPE $TMPC -lcurses > /dev/null 2> /dev/null ; then - curses=yes + curses_libs="-lcurses" + else + curses=no fi fi # test "$curses"
@@ -1654,11 +1653,7 @@ fi if test "$curses" = "yes" ; then echo "#define CONFIG_CURSES 1" >> $config_host_h echo "CONFIG_CURSES=y" >> $config_host_mak - if test "$ncurses" = "yes" ; then - echo "CURSES_LIBS=-lncurses" >> $config_host_mak - else - echo "CURSES_LIBS=-lcurses" >> $config_host_mak - fi + echo "CURSES_LIBS=$curses_libs" >> $config_host_mak fi if test "$atfile" = "yes" ; then echo "#define CONFIG_ATFILE 1" >> $config_host_h
Signature · 1 line
1.6.2.5
PATCH v3 35/47 remove sdl_static. Just do the right thing if static is yes
In reply to Juan Quintela--- configure | 42 ++++++++++++------------------------------ 1 files changed, 12 insertions(+), 30 deletions(-)
configure +12 -30
@@ -893,7 +893,6 @@ sdl_too_old=no if test "$sdl" = "yes" ; then sdl=no - sdl_static=no cat > $TMPC << EOF #include <SDL.h>
@@ -913,16 +912,18 @@ EOF fi # static link with sdl ? - if test "$sdl" = "yes" ; then + if test "$sdl" = "yes" -a "$static" = "yes" ; then aa="no" - `sdl-config --static-libs 2>/dev/null | grep \\\-laa > /dev/null` && aa="yes" - sdl_static_libs=`sdl-config --static-libs 2>/dev/null` - if [ "$aa" = "yes" ] ; then - sdl_static_libs="$sdl_static_libs `aalib-config --static-libs`" + sdl_libs=`sdl-config --static-libs 2>/dev/null` + if test `sdl-config --static-libs 2>/dev/null | grep \\\-laa > /dev/null` ; then + sdl_libs="$sdl_libs `aalib-config --static-libs >2 /dev/null`" + sdl_cflags="$sd_cflags `aalib-config --cflags >2 /dev/null`" fi - if $cc -o $TMPE ${OS_CFLAGS} $sdl_cflags $TMPC $sdl_static_libs > /dev/null 2> /dev/null; then - sdl_static=yes + if $cc -o $TMPE ${OS_CFLAGS} $sdl_cflags $TMPC $sdl_libs > /dev/null 2> /dev/null; then + : + else + sdl=no fi fi # static link fi # sdl compile test
@@ -1436,9 +1437,6 @@ if test "$darwin" = "yes" ; then echo "Cocoa support $cocoa" fi echo "SDL support $sdl" -if test "$sdl" != "no" ; then - echo "SDL static link $sdl_static" -fi echo "curses support $curses" echo "curl support $curl" echo "mingw32 support $mingw32"
@@ -1477,9 +1475,6 @@ echo "preadv support $preadv" if test $sdl_too_old = "yes"; then echo "-> Your SDL version is too old - please upgrade to have SDL support" fi -#if test "$sdl_static" = "no"; then -# echo "WARNING: cannot compile statically with SDL - qemu-fast won't have a graphical output" -#fi config_host_mak="config-host.mak" config_host_h="config-host.h"
@@ -1648,24 +1643,11 @@ echo "TARGET_DIRS=$target_list" >> $config_host_mak if [ "$build_docs" = "yes" ] ; then echo "BUILD_DOCS=yes" >> $config_host_mak fi -if test "$static" = "yes"; then - sdl1=$sdl_static -else - sdl1=$sdl -fi -if test "$sdl1" = "yes" ; then +if test "$sdl" = "yes" ; then echo "#define CONFIG_SDL 1" >> $config_host_h echo "CONFIG_SDL=y" >> $config_host_mak - if test "$static" = "yes"; then - echo "SDL_LIBS=$sdl_static_libs" >> $config_host_mak - else - echo "SDL_LIBS=$sdl_libs`" >> $config_host_mak - fi - if [ "${aa}" = "yes" ] ; then - echo "SDL_CFLAGS=$sdl_cflags `aalib-config --cflags`" >> $config_host_mak - else - echo "SDL_CFLAGS=$sdl_cflags" >> $config_host_mak - fi + echo "SDL_LIBS=$sdl_libs" >> $config_host_mak + echo "SDL_CFLAGS=$sdl_cflags" >> $config_host_mak fi if test "$cocoa" = "yes" ; then echo "#define CONFIG_COCOA 1" >> $config_host_h
Signature · 1 line
1.6.2.5
PATCH v3 36/47 indent with 2 spaces sdl tests
In reply to Juan Quintela--- configure | 65 +++++++++++++++++++++++++++++------------------------------- 1 files changed, 31 insertions(+), 34 deletions(-)
configure +31 -34
@@ -892,45 +892,42 @@ fi sdl_too_old=no if test "$sdl" = "yes" ; then - sdl=no - -cat > $TMPC << EOF + sdl=no + cat > $TMPC << EOF #include <SDL.h> #undef main /* We don't want SDL to override our main() */ int main( void ) { return SDL_Init (SDL_INIT_VIDEO); } EOF - sdl_cflags=`sdl-config --cflags 2> /dev/null` - sdl_libs=`sdl-config --libs 2> /dev/null` - if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} $sdl_cflags $TMPC $sdl_libs > $TMPSDLLOG 2>&1 ; then - _sdlversion=`sdl-config --version | sed 's/[^0-9]//g'` - if test "$_sdlversion" -lt 121 ; then - sdl_too_old=yes - else - if test "$cocoa" = "no" ; then - sdl=yes - fi - fi - - # static link with sdl ? - if test "$sdl" = "yes" -a "$static" = "yes" ; then - aa="no" - sdl_libs=`sdl-config --static-libs 2>/dev/null` - if test `sdl-config --static-libs 2>/dev/null | grep \\\-laa > /dev/null` ; then - sdl_libs="$sdl_libs `aalib-config --static-libs >2 /dev/null`" - sdl_cflags="$sd_cflags `aalib-config --cflags >2 /dev/null`" - fi + sdl_cflags=`sdl-config --cflags 2> /dev/null` + sdl_libs=`sdl-config --libs 2> /dev/null` + if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} $sdl_cflags $TMPC $sdl_libs > $TMPSDLLOG 2>&1 ; then + _sdlversion=`sdl-config --version | sed 's/[^0-9]//g'` + if test "$_sdlversion" -lt 121 ; then + sdl_too_old=yes + else + if test "$cocoa" = "no" ; then + sdl=yes + fi + fi - if $cc -o $TMPE ${OS_CFLAGS} $sdl_cflags $TMPC $sdl_libs > /dev/null 2> /dev/null; then - : - else - sdl=no - fi - fi # static link - fi # sdl compile test + # static link with sdl ? + if test "$sdl" = "yes" -a "$static" = "yes" ; then + sdl_libs=`sdl-config --static-libs 2>/dev/null` + if test `sdl-config --static-libs 2>/dev/null | grep \\\-laa > /dev/null` ; then + sdl_libs="$sdl_libs `aalib-config --static-libs >2 /dev/null`" + sdl_cflags="$sd_cflags `aalib-config --cflags >2 /dev/null`" + fi + if $cc -o $TMPE ${OS_CFLAGS} $sdl_cflags $TMPC $sdl_libs > /dev/null 2> /dev/null; then + : + else + sdl=no + fi + fi # static link + fi # sdl compile test fi if test "$sdl" = "yes" ; then -cat > $TMPC <<EOF + cat > $TMPC <<EOF #include <SDL.h> #if defined(SDL_VIDEO_DRIVER_X11) #include <X11/XKBlib.h>
@@ -939,9 +936,9 @@ cat > $TMPC <<EOF #endif int main(void) { return 0; } EOF - if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} $sdl_cflags $TMPC $sdl_libs > /dev/null 2>&1 ; then - sdl_libs="$sdl_libs -lX11" - fi + if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} $sdl_cflags $TMPC $sdl_libs > /dev/null 2>&1 ; then + sdl_libs="$sdl_libs -lX11" + fi fi ##########################################
Signature · 1 line
1.6.2.5
PATCH v3 39/47 simplify brlapi selection
In reply to Juan QuintelaUse same style that everythnig else
--- Makefile | 4 +--- configure | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-)
Makefile +1 -3
@@ -100,9 +100,7 @@ obj-y += qdev.o qdev-properties.o ssi.o obj-$(CONFIG_BRLAPI) += baum.o -ifdef CONFIG_BRLAPI -LIBS+=-lbrlapi -endif +LIBS+=$(BRLAPI_LIBS) obj-$(CONFIG_WIN32) += tap-win32.o obj-$(CONFIG_POSIX) += migration-exec.o
configure +10 -8
@@ -159,6 +159,7 @@ case "$cpu" in cpu="unknown" ;; esac +brlapi="yes" gprof="no" debug_tcg="no" debug="no"
@@ -1084,16 +1085,17 @@ done ########################################## # BrlAPI probe -if test -z "$brlapi" ; then - brlapi=no -cat > $TMPC << EOF +if test "$brlapi" = "yes" ; then + brlapi=no + brlapi_libs="-lbrlapi" + cat > $TMPC << EOF #include <brlapi.h> int main( void ) { return brlapi__openConnection (NULL, NULL, NULL); } EOF - if $cc ${ARCH_CFLAGS} -o $TMPE ${OS_CFLAGS} $TMPC -lbrlapi > /dev/null 2> /dev/null ; then - brlapi=yes - fi # brlapi compile test -fi # -z $brlapi + if $cc ${ARCH_CFLAGS} -o $TMPE ${OS_CFLAGS} $TMPC $brlapi_libs > /dev/null 2> /dev/null ; then + brlapi=yes + fi +fi ########################################## # curses probe
@@ -1678,7 +1680,7 @@ fi if test "$brlapi" = "yes" ; then echo "CONFIG_BRLAPI=y" >> $config_host_mak echo "#define CONFIG_BRLAPI 1" >> $config_host_h - echo "BRLAPI_LIBS=-lbrlapi" >> $config_host_mak + echo "BRLAPI_LIBS=$brlapi_libs" >> $config_host_mak fi if test "$bluez" = "yes" ; then echo "CONFIG_BLUEZ=y" >> $config_host_mak
Signature · 1 line
1.6.2.5
PATCH v3 34/47 target_softmmu is undefined at that point
In reply to Juan Quintela--- configure | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
configure +1 -1
@@ -1656,7 +1656,7 @@ fi if test "$sdl1" = "yes" ; then echo "#define CONFIG_SDL 1" >> $config_host_h echo "CONFIG_SDL=y" >> $config_host_mak - if test "$target_softmmu" = "no" -o "$static" = "yes"; then + if test "$static" = "yes"; then echo "SDL_LIBS=$sdl_static_libs" >> $config_host_mak else echo "SDL_LIBS=$sdl_libs`" >> $config_host_mak
Signature · 1 line
1.6.2.5
PATCH v3 40/47 simplify vde libs selection
In reply to Juan Quintela--- configure | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-)
configure +6 -6
@@ -997,6 +997,8 @@ fi ########################################## # vde libraries probe if test "$vde" = "yes" ; then + vde=no + vde_libs="-lvdeplug" cat > $TMPC << EOF #include <libvdeplug.h> int main(void)
@@ -1006,11 +1008,9 @@ int main(void) return 0; } EOF - if $cc $ARCH_CFLAGS -o $TMPE $TMPC -lvdeplug > /dev/null 2> /dev/null ; then - : - else - vde="no" - fi + if $cc $ARCH_CFLAGS -o $TMPE $TMPC $vde_libs > /dev/null 2> /dev/null ; then + vde=yes + fi fi ##########################################
@@ -1589,7 +1589,7 @@ fi if test "$vde" = "yes" ; then echo "CONFIG_VDE=y" >> $config_host_mak echo "#define CONFIG_VDE 1" >> $config_host_h - echo "VDE_LIBS=-lvdeplug" >> $config_host_mak + echo "VDE_LIBS=$vde_libs" >> $config_host_mak fi for card in $audio_card_list; do def=CONFIG_`echo $card | tr '[:lower:]' '[:upper:]'`
Signature · 1 line
1.6.2.5
PATCH v3 41/47 simplify fdt libs selection
In reply to Juan Quintela--- Makefile.target | 4 ---- configure | 9 +++++---- 2 files changed, 5 insertions(+), 8 deletions(-)
Makefile.target +0 -4
@@ -514,9 +514,7 @@ CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE endif obj-ppc-$(CONFIG_FDT) += device_tree.o -ifdef FDT_LIBS LIBS+= $(FDT_LIBS) -endif obj-mips-y = mips_r4k.o mips_jazz.o mips_malta.o mips_mipssim.o obj-mips-y += mips_timer.o mips_int.o dma.o vga.o serial.o i8254.o i8259.o rc4030.o
@@ -542,9 +540,7 @@ obj-microblaze-y += xilinx_ethlite.o obj-microblaze-y += pflash_cfi02.o obj-microblaze-$(CONFIG_FDT) += device_tree.o -ifdef FDT_LIBS LIBS+= $(FDT_LIBS) -endif # Boards obj-cris-y = cris_pic_cpu.o etraxfs.o axis_dev88.o
configure +5 -4
@@ -1257,11 +1257,12 @@ fi ########################################## # fdt probe if test "$fdt" = "yes" ; then - fdt=no - cat > $TMPC << EOF + fdt=no + fdt_libs="-lfdt" + cat > $TMPC << EOF int main(void) { return 0; } EOF - if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} $TMPC -lfdt 2> /dev/null > /dev/null ; then + if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} $TMPC $fdt_libs 2> /dev/null > /dev/null ; then fdt=yes fi fi
@@ -1711,7 +1712,7 @@ fi if test "$fdt" = "yes" ; then echo "CONFIG_FDT=y" >> $config_host_mak echo "#define CONFIG_FDT 1" >> $config_host_h - echo "FDT_LIBS=-lfdt" >> $config_host_mak + echo "FDT_LIBS=$fdt_libs" >> $config_host_mak fi # XXX: suppress that
Signature · 1 line
1.6.2.5
PATCH v3 42/47 test if xen is enabled only once
In reply to Juan Quintela--- configure | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-)
configure +1 -4
@@ -1690,6 +1690,7 @@ if test "$bluez" = "yes" ; then echo "#define CONFIG_BLUEZ 1" >> $config_host_h fi if test "$xen" = "yes" ; then + echo "CONFIG_XEN=y" >> $config_host_mak echo "XEN_LIBS=$xen_libs" >> $config_host_mak fi if test "$aio" = "yes" ; then
@@ -1766,10 +1767,6 @@ else exit 1 fi -if test "$xen" = "yes" ; then - echo "CONFIG_XEN=y" >> $config_host_mak -fi - tools= if test `expr "$target_list" : ".*softmmu.*"` != 0 ; then tools="qemu-img\$(EXESUF) $tools"
Signature · 1 line
1.6.2.5
PATCH v3 46/47 Generate config-host.h from config-host.mak
In reply to Juan QuintelaGenerate CONFIG_AUDIO_DRIVERS. Order is important here, because the first driver in the list is the one used by default.
--- audio/audio.c | 7 ++++- configure | 82 +++++++++++++++++++------------------------------------- create_config | 53 ++++++++++++++++++++++++++++++++++-- 3 files changed, 84 insertions(+), 58 deletions(-)
audio/audio.c +6 -1
@@ -37,8 +37,13 @@#define SW_NAME (sw) (sw)->name ? (sw)->name : "unknown" + +/* Order of CONFIG_AUDIO_DRIVERS is import. +The 1st one is the one used by default, that is the reason +that we generate the list. +*/ static struct audio_driver *drvtab[] = { -AUDIO_DRIVERS +CONFIG_AUDIO_DRIVERS &no_audio_driver, &wav_audio_driver };
configure +28 -54
261 lines not on this page · raw message
create_config +50 -3
73 lines not on this page · raw message
Signature · 1 line
1.6.2.5
PATCH v3 45/47 rename USE_NPTL to CONFIG_USE_NPTL
In reply to Juan Quintela--- bsd-user/mmap.c | 2 +- bsd-user/qemu.h | 6 +++--- configure | 2 +- create_config | 4 ---- exec.c | 2 +- gdbstub.c | 2 +- linux-user/main.c | 6 +++--- linux-user/mmap.c | 2 +- linux-user/qemu.h | 8 ++++---- linux-user/syscall.c | 20 ++++++++++---------- qemu-lock.h | 2 +- 11 files changed, 26 insertions(+), 30 deletions(-)
bsd-user/mmap.c +1 -1
@@ -30,7 +30,7 @@//#define DEBUG_MMAP -#if defined(USE_NPTL ) +#if defined(CONFIG_USE_NPTL )pthread_mutex_t mmap_mutex;static int __thread mmap_lock_count;
bsd-user/qemu.h +3 -3
@@ -24,7 +24,7 @@ enum BSDType {#include "target_signal.h" #include "gdbstub.h" -#if defined(USE_NPTL ) +#if defined(CONFIG_USE_NPTL )#define THREAD __thread#else #define THREAD
@@ -188,7 +188,7 @@ void mmap_lock(void);void mmap_unlock (void );void cpu_list_lock (void );void cpu_list_unlock (void ); -#if defined(USE_NPTL ) +#if defined(CONFIG_USE_NPTL )void mmap_fork_start (void );void mmap_fork_end (int child);#endif
@@ -382,7 +382,7 @@ static inline void *lock_user_string(abi_ulong guest_addr)#define unlock_user_struct (host_ptr, guest_addr, copy) \ unlock_user(host_ptr, guest_addr, (copy) ? sizeof(*host_ptr) : 0) -#if defined(USE_NPTL ) +#if defined(CONFIG_USE_NPTL )#include <pthread.h> #endif
configure +1 -1
@@ -2056,7 +2056,7 @@ if test "$target_user_only" = "yes" -a "$bflt" = "yes"; then fi if test "$target_user_only" = "yes" \ -a "$nptl" = "yes" -a "$target_nptl" = "yes"; then - echo "USE_NPTL=y" >> $config_mak + echo "CONFIG_USE_NPTL=y" >> $config_mak fi # 32 bit ELF loader in addition to native 64 bit loader? if test "$target_user_only" = "yes" -a "$elfload32" = "yes"; then
create_config +0 -4
@@ -46,10 +46,6 @@ case $line in value=${line#*=} echo "#define $name $value" ;; - USE_NPTL=y) # configuration - name=${line%=*} - echo "#define $name 1" - ;; esac done # read
exec.c +1 -1
@@ -1514,7 +1514,7 @@ void cpu_set_log_filename(const char *filename)static void cpu_unlink_tb (CPUState *env) { -#if defined(USE_NPTL ) +#if defined(CONFIG_USE_NPTL )/* FIXME: TB unchaining isn't SMP safe. For now just ignore the problem and hope the cpu will stop of its own accord. For userspace emulation this often isn't actually as bad as it sounds. Often
gdbstub.c +1 -1
@@ -1592,7 +1592,7 @@ static void gdb_set_cpu_pc(GDBState *s, target_ulong pc)static inline int gdb_id (CPUState *env) { -#if defined(CONFIG_USER_ONLY ) && defined(USE_NPTL ) +#if defined(CONFIG_USER_ONLY ) && defined(CONFIG_USE_NPTL )return env->host_tid;#else return env->cpu_index +1 ;
linux-user/main.c +3 -3
@@ -108,7 +108,7 @@ int64_t cpu_get_real_ticks(void)#endif -#if defined(USE_NPTL ) +#if defined(CONFIG_USE_NPTL )/***********************************************************/ /* Helper routines for implementing atomic operations. */
@@ -222,7 +222,7 @@ void cpu_list_unlock(void) {pthread_mutex_unlock (&cpu_list_mutex); } -#else /* if !USE_NPTL */ +#else /* if !CONFIG_USE_NPTL */ /* These are no-ops because we are not threadsafe. */ static inline void cpu_exec_start (CPUState *env) {
@@ -2357,7 +2357,7 @@ THREAD CPUState *thread_env;void task_settid (TaskState *ts) {if (ts->ts_tid ==0 ) { -#ifdef USE_NPTL +#ifdef CONFIG_USE_NPTL ts->ts_tid = (pid_t )syscall (SYS_gettid);#else /* when no threads are used, tid becomes pid */
linux-user/mmap.c +1 -1
@@ -33,7 +33,7 @@//#define DEBUG_MMAP -#if defined(USE_NPTL ) +#if defined(CONFIG_USE_NPTL )pthread_mutex_t mmap_mutex =PTHREAD_MUTEX_INITIALIZER ;static int __thread mmap_lock_count;
linux-user/qemu.h +4 -4
@@ -20,7 +20,7 @@#include "gdbstub.h" #include "sys-queue.h" -#if defined(USE_NPTL ) +#if defined(CONFIG_USE_NPTL )#define THREAD __thread#else #define THREAD
@@ -104,7 +104,7 @@ typedef struct TaskState {uint32_t v86flags;uint32_t v86mask;#endif -#ifdef USE_NPTL +#ifdef CONFIG_USE_NPTL abi_ulong child_tidptr;#endif #ifdef TARGET_M68K
@@ -244,7 +244,7 @@ void mmap_unlock(void);abi_ulong mmap_find_vma (abi_ulong ,abi_ulong );void cpu_list_lock (void );void cpu_list_unlock (void ); -#if defined(USE_NPTL ) +#if defined(CONFIG_USE_NPTL )void mmap_fork_start (void );void mmap_fork_end (int child);#endif
@@ -441,7 +441,7 @@ static inline void *lock_user_string(abi_ulong guest_addr)#define unlock_user_struct (host_ptr, guest_addr, copy) \ unlock_user(host_ptr, guest_addr, (copy) ? sizeof(*host_ptr) : 0) -#if defined(USE_NPTL ) +#if defined(CONFIG_USE_NPTL )#include <pthread.h> #endif
linux-user/syscall.c +10 -10
@@ -82,7 +82,7 @@#include "qemu.h" #include "qemu-common.h" -#if defined(USE_NPTL ) +#if defined(CONFIG_USE_NPTL )#define CLONE_NPTL_FLAGS2 (CLONE_SETTLS | \ CLONE_PARENT_SETTID | CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID)#else
@@ -219,7 +219,7 @@ _syscall1(int,exit_group,int,error_code)#if defined(TARGET_NR_set_tid_address) && defined(__NR_set_tid_address) _syscall1(int,set_tid_address,int *,tidptr)#endif -#if defined(USE_NPTL ) +#if defined(CONFIG_USE_NPTL )#if defined(TARGET_NR_futex) && defined(__NR_futex) _syscall6(int,sys_futex,int *,uaddr,int,op,int,val, const struct timespec *,timeout,int *,uaddr2,int,val3)
@@ -3458,7 +3458,7 @@ static abi_long do_arch_prctl(CPUX86State *env, int code, abi_ulong addr)#endif /* defined(TARGET_I386) */ -#if defined(USE_NPTL ) +#if defined(CONFIG_USE_NPTL )#define NEW_STACK_SIZE PTHREAD_STACK_MIN
@@ -3527,7 +3527,7 @@ static int do_fork(CPUState *env, unsigned int flags, abi_ulong newsp,TaskState *ts;uint8_t *new_stack;CPUState *new_env; -#if defined(USE_NPTL ) +#if defined(CONFIG_USE_NPTL )unsigned int nptl_flags;sigset_t sigmask;#endif
@@ -3538,7 +3538,7 @@ static int do_fork(CPUState *env, unsigned int flags, abi_ulong newsp,if (flags &CLONE_VM ) {TaskState *parent_ts = (TaskState *)env->opaque; -#if defined(USE_NPTL ) +#if defined(CONFIG_USE_NPTL )new_thread_info info;pthread_attr_t attr;#endif
@@ -3552,7 +3552,7 @@ static int do_fork(CPUState *env, unsigned int flags, abi_ulong newsp, new_env->opaque = ts; ts->bprm = parent_ts->bprm; ts->info = parent_ts->info; -#if defined(USE_NPTL ) +#if defined(CONFIG_USE_NPTL ) nptl_flags = flags; flags &= ~CLONE_NPTL_FLAGS2 ;
@@ -3621,7 +3621,7 @@ static int do_fork(CPUState *env, unsigned int flags, abi_ulong newsp,/* Child Process. */ cpu_clone_regs (env, newsp);fork_end (1 ); -#if defined(USE_NPTL ) +#if defined(CONFIG_USE_NPTL )/* There is a race condition here. The parent process could theoretically read the TID in the child process before the child tid is set. This would require using either ptrace
@@ -4016,7 +4016,7 @@ static inline abi_long host_to_target_stat64(void *cpu_env, }#endif -#if defined(USE_NPTL ) +#if defined(CONFIG_USE_NPTL )/* ??? Using host futex calls even when target atomic operations are not really atomic probably breaks things. However implementing futexes locally would make futexes shared between multiple processes
@@ -4126,7 +4126,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,switch (num) {case TARGET_NR_exit: -#ifdef USE_NPTL +#ifdef CONFIG_USE_NPTL /* In old applications this may be used to implement _exit(2). However in threaded applictions it is used for thread termination, and _exit_group is used for application termination.
@@ -6828,7 +6828,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, }break ;#endif -#if defined(USE_NPTL ) +#if defined(CONFIG_USE_NPTL )case TARGET_NR_futex: ret =do_futex (arg1, arg2, arg3, arg4, arg5, arg6);break ;
qemu-lock.h +1 -1
@@ -23,7 +23,7 @@likely to release it soon. In environments where you have more threads than physical CPUs (the extreme case being a single CPU host) a spinlock simply wastes CPU until the OS decides to preempt it. */ -#if defined(USE_NPTL ) +#if defined(CONFIG_USE_NPTL )#include <pthread.h> #define spin_lock pthread_mutex_lock
Signature · 1 line
1.6.2.5
PATCH v3 43/47 define ENOTSUP the same that the other errors
In reply to Juan Quintela--- configure | 5 ----- qemu-common.h | 5 +++-- 2 files changed, 3 insertions(+), 7 deletions(-)
configure +0 -5
@@ -265,7 +265,6 @@ oss_lib="-lossaudio" ;; OpenBSD) bsd="yes" -openbsd="yes" audio_drv_list="oss" audio_possible_drivers="oss sdl esd" oss_lib="-lossaudio"
@@ -1544,10 +1543,6 @@ EOF fi fi -if [ "$openbsd" = "yes" ] ; then - echo "#define ENOTSUP 4096" >> $config_host_h -fi - if test "$darwin" = "yes" ; then echo "CONFIG_DARWIN=y" >> $config_host_mak echo "#define CONFIG_DARWIN 1" >> $config_host_h
qemu-common.h +3 -2
@@ -38,6 +38,9 @@#ifndef ENOMEDIUM #define ENOMEDIUM ENODEV#endif +#ifndef ENOTSUP +#define ENOTSUP 4096 +#endif #ifndef CONFIG_IOVEC #define CONFIG_IOVEC
@@ -52,11 +55,9 @@ struct iovec {#ifdef _WIN32#define fsync _commit#define lseek _lseeki64 -#define ENOTSUP 4096extern int qemu_ftruncate64 (int ,int64_t );#define ftruncate qemu_ftruncate64 -static inline char *realpath (const char *path,char *resolved_path) {_fullpath (resolved_path, path, _MAX_PATH);
Signature · 1 line
1.6.2.5
PATCH v3 44/47 rename NEEDS_LIBSUNMATH to CONFIG_NEEDS_LIBSUNMATH
In reply to Juan QuintelaOnce there fix a place where it was misspelled
--- Makefile.target | 2 +- configure | 4 ++-- fpu/softfloat-native.h | 2 +- fpu/softfloat.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-)
Makefile.target +1 -1
@@ -60,7 +60,7 @@ LIBS+=-lwinmm -lws2_32 -liphlpapi endif ifdef CONFIG_SOLARIS LIBS+=-lsocket -lnsl -lresolv -ifdef NEEDS_LIBSUNMATH +ifdef CONFIG_NEEDS_LIBSUNMATH LIBS+=-lsunmath LDFLAGS+=-L/opt/SUNWspro/prod/lib -R/opt/SUNWspro/prod/lib CFLAGS+=-I/opt/SUNWspro/prod/include/cc
configure +2 -2
@@ -1558,8 +1558,8 @@ if test "$solaris" = "yes" ; then echo "#define CONFIG_SOLARIS 1" >> $config_host_h echo "#define CONFIG_SOLARIS_VERSION $solarisrev" >> $config_host_h if test "$needs_libsunmath" = "yes" ; then - echo "NEEDS_LIBSUNMATH=yes" >> $config_host_mak - echo "#define NEEDS_LIBSUNMATH 1" >> $config_host_h + echo "CONFIG_NEEDS_LIBSUNMATH=y" >> $config_host_mak + echo "#define CONFIG_NEEDS_LIBSUNMATH 1" >> $config_host_h fi fi if test -n "$sparc_cpu"; then
fpu/softfloat-native.h +1 -1
@@ -62,7 +62,7 @@#define isunordered (x,y) unordered(x, y)#endif -#if defined(__sun__) && !defined(NEED_LIBSUNMATH ) +#if defined(__sun__) && !defined(CONFIG_NEEDS_LIBSUNMATH )#ifndef isnan# define isnan (x) \
fpu/softfloat.h +1 -1
@@ -32,7 +32,7 @@ these four paragraphs for those parts of this code that are retained.#ifndef SOFTFLOAT_H #define SOFTFLOAT_H -#if defined(CONFIG_SOLARIS ) && defined(NEEDS_LIBSUNMATH ) +#if defined(CONFIG_SOLARIS ) && defined(CONFIG_NEEDS_LIBSUNMATH )#include <sunmath.h> #endif
Signature · 1 line
1.6.2.5
PATCH v3 47/47 move on_vcpu inside proper #ifdef
In reply to Juan Quintela--- kvm-all.c | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-)
kvm-all.c +9 -9
@@ -155,15 +155,6 @@ static void kvm_reset_vcpu(void *opaque) } } -static void on_vcpu (CPUState *env,void (*func)(void *data),void *data) -{ -if (env == cpu_single_env) { -func (data); -return ; - } -abort (); -} -int kvm_irqchip_in_kernel (void ) {return kvm_state->irqchip_in_kernel;
@@ -935,6 +926,15 @@ static void kvm_invoke_set_guest_debug(void *data) dbg_data->err =kvm_vcpu_ioctl (dbg_data->env,KVM_SET_GUEST_DEBUG , &dbg_data->dbg); } +static void on_vcpu (CPUState *env,void (*func)(void *data),void *data) +{ +if (env == cpu_single_env) { +func (data); +return ; + } +abort (); +} +int kvm_update_guest_debug (CPUState *env,unsigned long reinject_trap) {struct kvm_set_guest_debug_data data;
Signature · 1 line
1.6.2.5
[Qemu-devel] Re: [PATCH 47/47] move on_vcpu inside proper #ifdef
Quoted 31 lines · Juan Quintela
Signed-off-by Juan Quintela <[email protected]>--- kvm-all.c | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-)kvm-all.c +2
-9@@ -155,15 +155,6 @@ static void kvm_reset_vcpu(void *opaque) } } -static void on_vcpu (CPUState *env,void (*func)(void *data),void *data) -{ -if (env == cpu_single_env) { -func (data); -return ; - } -abort (); -} -int kvm_irqchip_in_kernel (void ) {return kvm_state->irqchip_in_kernel;@@ -935,6 +926,15 @@ static void kvm_invoke_set_guest_debug(void *data) dbg_data->err =kvm_vcpu_ioctl (dbg_data->env,KVM_SET_GUEST_DEBUG , &dbg_data->dbg); } +static void on_vcpu (CPUState *env,void (*func)(void *data),void *data) +{
kvm-all.c static void kvm_invoke_set_guest_debug(void *data) · line 940
Quoted 10 lines
kvm-all.c +7
-0+if (env == cpu_single_env) { +func (data); +return ; + } +abort (); +} +int kvm_update_guest_debug (CPUState *env,unsigned long reinject_trap) {struct kvm_set_guest_debug_data data;
Ooops, this patch don't belong to this series, was there just to get compilation to finish.
Anthony, please ignore it.
Later, Juan.
Re: [Qemu-devel] [PATCH 16/47] O_LARGEFILE is already set in qemu-common.h
In reply to Juan QuintelaStupid observation here, if you renamed 'HOST_BSD' to 'CONFIG_BSD' didn't you miss something below?
Penned by Juan Quintela on 20090727 16:12.55, we have:
| | Signed-off-by: Juan Quintela <[email protected]> | --- | configure | 1 - | 1 files changed, 0 insertions(+), 1 deletions(-) | | diff --git a/configure b/configure | index 3c5fb6e..be00e28 100755 | --- a/configure | +++ b/configure | @@ -1746,7 +1746,6 @@ fi | | # XXX: suppress that | if [ "$bsd" = "yes" ] ; then | - echo "#define O_LARGEFILE 0" >> $config_host_h | echo "#define MAP_ANONYMOUS MAP_ANON" >> $config_host_h | echo "#define HOST_BSD 1" >> $config_host_h | fi | -- | 1.6.2.5 | |
Signature · 12 lines
Todd Fries .. [email protected] _____________________________________________ | \ 1.636.410.0632 (voice) | Free Daemon Consulting, LLC \ 1.405.227.9094 (voice) | http://FreeDaemonConsulting.com \ 1.866.792.3418 (FAX) | "..in support of free software solutions." \ sip:[email protected] | \ sip:[email protected] \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ 37E7 D3EB 74D0 8D66 A68D B866 0326 204E 3F42 004A http://todd.fries.net/pgp.txt
[Qemu-devel] Re: [PATCH 16/47] O_LARGEFILE is already set in qemu-common.h
Quoted 18 lines · Todd T. Fries
Stupid observation here, if you renamed '
HOST_BSD' to 'CONFIG_BSD' didn't you miss something below?Penned by Juan Quintela on 20090727 16:12.55, we have:
| | Signed-off-by: Juan Quintela <[email protected]> | --- | configure | 1 - | 1 files changed, 0 insertions(+), 1 deletions(-) | | diff --git a/configure b/configure | index 3c5fb6e..be00e28 100755 | --- a/configure | +++ b/configure | @@ -1746,7 +1746,6 @@ fi | | # XXX: suppress that | if [ "$bsd" = "yes" ] ; then
Quoted 8 lines
| - echo "#define O_LARGEFILE 0" >> $config_host_h | echo "#define MAP_ANONYMOUS MAP_ANON" >> $config_host_h | echo "#define HOST_BSD 1" >> $config_host_h | fi | -- | 1.6.2.5 | |
It is done later in the series, I saw it as CONFIG_BSD in upstream.
Thanks, Juan.
[Qemu-devel] Re: [PATCH 29/47] Use CONFIG_POSIX to simplify Makefile
In reply to Juan QuintelaQuoted 47 lines · Juan Quintela
Signed-off-by Juan Quintela <[email protected]>---
Makefile| 21 +++++----------------1 files changed, 5 insertions(+), 16 deletions(-)Makefile +0
-0@@ -62,21 +62,13 @@ recurse-all: $(SUBDIR_RULES)block-obj-y = cutils.o cache-utils.o qemu-malloc.o qemu-option.o module.o block-obj-y += nbd.o block.o aio.o aes.o +block-obj-$(CONFIG_AIO) += posix-aio-compat.o
block-nested-y += cow.o qcow.o vmdk.o cloop.o dmg.o bochs.o vpc.o vvfat.o block-nested-y += qcow2.o qcow2-refcount.o qcow2-cluster.o qcow2-snapshot.o block-nested-y += parallels.o nbd.o
Makefile +2
-11- - -ifdef CONFIG_WIN32 -block-nested-y += raw-win32.o -else -ifdef CONFIG_AIO -block-obj-y += posix-aio-compat.o -endif -block-nested-y += raw-posix.o -endif - +block-nested-$(CONFIG_WIN32) += raw-win32.o +block-nested-$(CONFIG_POSIX) += raw-posix.oblock-nested-$(CONFIG_CURL) += curl.o
block-obj-y += $(addprefix
block/, $(block-nested-y))Makefile +0
-0@@ -112,11 +104,8 @@ ifdef CONFIG_BRLAPILIBS+=-lbrlapi
endifMakefile +2
-5-ifdef CONFIG_WIN32 -obj-y += tap-win32.o -else -obj-y += migration-exec.o -endif +obj-$(CONFIG_WIN32) += tap-win32.o +obj-$(CONFIG_POSIX) += migration-exec.o
Quoted 4 lines
ifdef
CONFIG_COREAUDIOAUDIO_PT= ySignature · 1 line
1.6.2.5
I think this patch or a related one breaks MinGW/Win32:
CC posix-aio-compat.o
posix-aio-compat.c:14:23: warning: sys/ioctl.h: No such file or directory posix-aio-compat.c: In function `handle_aiocb_ioctl':
posix-aio-compat.c:90: warning: implicit declaration of function ioctl' posix-aio-compat.c: In function handle_aiocb_rw_linear':
posix-aio-compat.c:182: warning: implicit declaration of function pwrite' posix-aio-compat.c:187: warning: implicit declaration of function pread' posix-aio-compat.c: In function `aio_thread':
posix-aio-compat.c:284: warning: implicit declaration of function sigfillset' posix-aio-compat.c:285: warning: implicit declaration of function sigprocmask' posix-aio-compat.c:332: warning: implicit declaration of function kill' posix-aio-compat.c: In function qemu_paio_submit':
posix-aio-compat.c:367: error: `EINPROGRESS' undeclared (first use in this function) posix-aio-compat.c:367: error: (Each undeclared identifier is reported only once posix-aio-compat.c:367: error: for each function it appears in.) posix-aio-compat.c: In function `qemu_paio_cancel':
posix-aio-compat.c:424: error: ECANCELED' undeclared (first use in this function) posix-aio-compat.c:426: error: EINPROGRESS' undeclared (first use in this function)
make: *** [posix-aio-compat.o] Error 1
v0.11.0-rc0-182-g28e738d on gcc version 3.4.5 (mingw32 special)
- Sebastian
Re: [Qemu-devel] Re: [PATCH 29/47] Use CONFIG_POSIX to simplify Makefile
Quoted 82 lines · Sebastian Herbszt
Quoted 48 lines · Juan Quintela
Signed-off-by Juan Quintela <[email protected]>---
Makefile| 21 +++++----------------1 files changed, 5 insertions(+), 16 deletions(-)Makefile +0
-0@@ -62,21 +62,13 @@ recurse-all: $(SUBDIR_RULES)block-obj-y = cutils.o cache-utils.o qemu-malloc.o qemu-option.o module.o block-obj-y += nbd.o block.o aio.o aes.o +block-obj-$(CONFIG_AIO) += posix-aio-compat.o
block-nested-y += cow.o qcow.o vmdk.o cloop.o dmg.o bochs.o vpc.o vvfat.o block-nested-y += qcow2.o qcow2-refcount.o qcow2-cluster.o qcow2-snapshot.o
block-nested-y += parallels.o nbd.oMakefile +2
-11- - -ifdef CONFIG_WIN32 -block-nested-y += raw-win32.o -else -ifdef CONFIG_AIO -block-obj-y += posix-aio-compat.o -endif -block-nested-y += raw-posix.o -endif - +block-nested-$(CONFIG_WIN32) += raw-win32.o +block-nested-$(CONFIG_POSIX) += raw-posix.oblock-nested-$(CONFIG_CURL) += curl.o
block-obj-y += $(addprefix
block/, $(block-nested-y))Makefile +0
-0@@ -112,11 +104,8 @@ ifdef CONFIG_BRLAPILIBS+=-lbrlapi
endifMakefile +2
-5-ifdef CONFIG_WIN32 -obj-y += tap-win32.o -else -obj-y += migration-exec.o -endif +obj-$(CONFIG_WIN32) += tap-win32.o +obj-$(CONFIG_POSIX) += migration-exec.oQuoted 4 lines
ifdef
CONFIG_COREAUDIOAUDIO_PT= y
--
1.6.2.5I think this patch or a related one breaks MinGW/Win32:
CC posix-aio-compat.o
posix-aio-compat.c:14:23: warning:sys/ioctl.h: No such file or directoryposix-aio-compat.c: In function `handle_aiocb_ioctl':
posix-aio-compat.c:90: warning: implicit declaration of functionioctl' posix-aio-compat.c: In functionhandle_aiocb_rw_linear':
posix-aio-compat.c:182: warning: implicit declaration of functionpwrite' posix-aio-compat.c:187: warning: implicit declaration of functionpread'posix-aio-compat.c: In function `aio_thread':
posix-aio-compat.c:284: warning: implicit declaration of function `sigfillset'
posix-aio-compat.c:285: warning: implicit declaration of function `sigprocmask'
posix-aio-compat.c:332: warning: implicit declaration of functionkill' posix-aio-compat.c: In functionqemu_paio_submit':
posix-aio-compat.c:367: error: `EINPROGRESS' undeclared (first use in this function)
posix-aio-compat.c:367: error: (Each undeclared identifier is reported only once
posix-aio-compat.c:367: error: for each function it appears in.)posix-aio-compat.c: In function `qemu_paio_cancel':
posix-aio-compat.c:424: error: `ECANCELED' undeclared (first use in this function)
posix-aio-compat.c:426: error: `EINPROGRESS' undeclared (first use in this function)
make: *** [posix-aio-compat.o] Error 1
Quoted 3 lines
v0.11.0-rc0-182-g28e738d on gcc version 3.4.5 (mingw32 special)
- Sebastian
Definitely this one breaks it, posix-aio-compat should be included only when both CONFIG_POSIX and CONFIG_AIO are defined. It's good to see that someone cares about the Win32 build.
Best regards,
Filip Navara
[Qemu-devel] Re: [PATCH 29/47] Use CONFIG_POSIX to simplify Makefile
In reply to Sebastian HerbsztQuoted 1 line · Sebastian Herbszt
Juan Quintela wrote:
Hi
Thanks for the report, on my next series, I add this patch that fix the problem:
Quoted 22 lines
I think this patch or a related one breaks MinGW/Win32:
CC posix-aio-compat.o
posix-aio-compat.c:14:23: warning:sys/ioctl.h: No such file or directoryposix-aio-compat.c: In function `handle_aiocb_ioctl':
posix-aio-compat.c:90: warning: implicit declaration of functionioctl' posix-aio-compat.c: In functionhandle_aiocb_rw_linear':
posix-aio-compat.c:182: warning: implicit declaration of functionpwrite' posix-aio-compat.c:187: warning: implicit declaration of functionpread'posix-aio-compat.c: In function `aio_thread':
posix-aio-compat.c:284: warning: implicit declaration of functionsigfillset' posix-aio-compat.c:285: warning: implicit declaration of functionsigprocmask' posix-aio-compat.c:332: warning: implicit declaration of functionkill' posix-aio-compat.c: In functionqemu_paio_submit':
posix-aio-compat.c:367: error: `EINPROGRESS' undeclared (first use in this function) posix-aio-compat.c:367: error: (Each undeclared identifier is reported only once posix-aio-compat.c:367: error: for each function it appears in.)posix-aio-compat.c: In function `qemu_paio_cancel':
posix-aio-compat.c:424: error:ECANCELED' undeclared (first use in this function) posix-aio-compat.c:426: error:EINPROGRESS' undeclared (first use in this function)
make: *** [posix-aio-compat.o] Error 1
Quoted 5 lines
v0.11.0-rc0-182-g28e738d on gcc version 3.4.5 (mingw32 special)
- Sebastian
From
53e6f57abb0534b5f654dd1b18183c18443ecb5bMon Sep 17 00:00:00 2001
From: Juan Quintela <[email protected]>
Date: Mon, 3 Aug 2009 10:36:09 +0200
Subject: [PATCH] disable aio with mingw32
--- configure | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
configure +1 -0
@@ -359,6 +359,7 @@ if test "$mingw32" = "yes" ; then EXESUF=".exe" CFLAGS="-DWIN32_LEAN_AND_MEAN -DWINVER=0x501 $CFLAGS" LIBS="-lwinmm -lws2_32 -liphlpapi $LIBS" + aio=no fi # find source path
Signature · 1 line
1.6.2.5
Re: [Qemu-devel] Re: [PATCH 29/47] Use CONFIG_POSIX to simplify Makefile
Quoted 55 lines · Juan Quintela
Quoted 1 line · Sebastian Herbszt
Juan Quintela wrote:
Hi
Thanks for the report, on my next series, I add this patch that fix the problem:
Quoted 22 lines
I think this patch or a related one breaks MinGW/Win32:
CC posix-aio-compat.o
posix-aio-compat.c:14:23: warning:sys/ioctl.h: No such file or directoryposix-aio-compat.c: In function `handle_aiocb_ioctl':
posix-aio-compat.c:90: warning: implicit declaration of functionioctl' posix-aio-compat.c: In functionhandle_aiocb_rw_linear':
posix-aio-compat.c:182: warning: implicit declaration of functionpwrite' posix-aio-compat.c:187: warning: implicit declaration of functionpread'posix-aio-compat.c: In function `aio_thread':
posix-aio-compat.c:284: warning: implicit declaration of functionsigfillset' posix-aio-compat.c:285: warning: implicit declaration of functionsigprocmask' posix-aio-compat.c:332: warning: implicit declaration of functionkill' posix-aio-compat.c: In functionqemu_paio_submit':
posix-aio-compat.c:367: error: `EINPROGRESS' undeclared (first use in this function) posix-aio-compat.c:367: error: (Each undeclared identifier is reported only once posix-aio-compat.c:367: error: for each function it appears in.)posix-aio-compat.c: In function `qemu_paio_cancel':
posix-aio-compat.c:424: error:ECANCELED' undeclared (first use in this function) posix-aio-compat.c:426: error:EINPROGRESS' undeclared (first use in this function)
make: *** [posix-aio-compat.o] Error 1Quoted 3 lines
v0.11.0-rc0-182-g28e738d on gcc version 3.4.5 (mingw32 special)
- Sebastian
From
53e6f57abb0534b5f654dd1b18183c18443ecb5bMon Sep 17 00:00:00 2001
From: Juan Quintela <[email protected]>
Date: Mon, 3 Aug 2009 10:36:09 +0200
Subject: [PATCH] disable aio with mingw32Signed-off-by Juan Quintela <[email protected]>---
configure | 1 +1 files changed, 1 insertions(+), 0 deletions(-)configure +0
-0@@ -359,6 +359,7 @@ if test "$mingw32" = "yes" ; thenEXESUF=".exe"
CFLAGS="-DWIN32_LEAN_AND_MEAN -DWINVER=0x501 $CFLAGS" LIBS="-lwinmm -lws2_32 -liphlpapi $LIBS"
+ aio=no
fi
Quoted 1 line
# find source path
I don't think this is the correct way to fix it in long term or at least the variables have to be renamed to something like CONFIG_POSIX_AIO / posix_aio. There's no reason why AIO can't be added to Win32 port and it surely won't use the posix-aio-compat file.
Best regards,
Filip Navara
[Qemu-devel] Re: [PATCH 29/47] Use CONFIG_POSIX to simplify Makefile
Quoted 4 lines · Filip Navara
I don't think this is the correct way to fix it in long term or at least the variables have to be renamed to something like
CONFIG_POSIX_AIO/posix_aio. There's no reason why AIO can't be added to Win32 port and it surely won't use the posix-aio-compat file.
If we agree on that, I can change the names in my cleanups. I was just doing with the current names.
/me add another patch to his already very long series.
Later, Juan.