Skip to contentSkip to conversation

More configure/Makefile cleanups

PATCH Superseded Juan Quintela 8 participants 67 messages Jul 24, 2009 – Jul 27, 2009

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#27 lore raw

PATCH v2 24/46 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
index 1b9d7c0..55883ad 100755
@@ -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
index 0ba1b6a..93066e2 100644
@@ -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
index ad0bd14..35e6aeb 100644
@@ -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
#28 lore raw

PATCH v2 25/46 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
index 55883ad..6627fc9 100755
@@ -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
index ae2fcd0..1718dc4 100644
@@ -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
#29 lore raw

PATCH v2 26/46 rename WORDS_BIGENDIAN to CONFIG_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
index 2955880..a06278f 100644
@@ -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
index 3fb2c8b..fda2af3 100644
@@ -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
index 06de544..4558704 100644
@@ -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
index 6627fc9..a764255 100755
@@ -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
index 52e3e57..d55e0fd 100644
@@ -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
index 96b25fc..26bf492 100644
@@ -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
index d73ec0a..5b80b1b 100644
@@ -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
index af5a9ea..ce342bc 100644
@@ -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
index f262150..bebfefd 100644
@@ -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
index 0ef27d1..42f4e90 100644
@@ -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
index 6a79094..d510d81 100644
@@ -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
index 8915d43..5e73c5a 100644
@@ -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
index 0590e45..2fb96f8 100644
@@ -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
index d7ff8bc..b3c9077 100644
@@ -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
index 35312ec..40f4e4d 100644
@@ -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
index 91a6852..c2e08b9 100644
@@ -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
index 0bc2e80..8f32a77 100644
@@ -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
index b5320c8..655a83d 100644
@@ -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
index 76c6dcf..1c40954 100644
@@ -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
index b5c5914..0cbcf9c 100644
@@ -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
index 6d88cd5..50a4a01 100644
@@ -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
index 574fc01..5074e33 100644
@@ -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
index dbc8dfd..2ee3c9c 100644
@@ -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
index c65ed43..c7e3457 100644
@@ -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
index 35fbaf5..f32ecd6 100644
@@ -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
index 08200ed..6a96e93 100644
@@ -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
index 3e998d2..c59c4e8 100644
@@ -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
index 380009e..ff93985 100644
@@ -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 defined TARGET_X86_64 && defined WORDS_BIGENDIAN
+#if defined TARGET_X86_64 && defined HOST_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
index 5115cd6..789176b 100644
@@ -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
index c352aa7..ad6d8ee 100644
@@ -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
index da3d7de..58818c2 100644
@@ -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
index 3b6e2d5..1731d12 100644
@@ -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
index 739ed9a..fb3ae85 100644
@@ -286,7 +286,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
index 7ef2b89..672373d 100644
@@ -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
index de86262..7f35e4c 100644
@@ -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
index de0ff87..dfcf34c 100644
@@ -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
#32 lore raw

PATCH v2 27/46 Add CONFIG_POSIX

In reply to Juan Quintela

We need a way to define posix-like (a.k.a. no win32)

---
 configure |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
configure +1 -0
index a764255..19e30e3 100755
@@ -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
#33 lore raw

PATCH v2 28/46 Use CONFIG_POSIX to simplify Makefile

In reply to Juan Quintela
---
 Makefile |   21 +++++----------------
 1 files changed, 5 insertions(+), 16 deletions(-)
Makefile +5 -16
index 47e5825..a53b630 100644
@@ -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
#34 lore raw

PATCH v2 29/46 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
index 19e30e3..2dd9e51 100755
@@ -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
#35 lore raw

PATCH v2 30/46 sdl_config value was always sdl-config

In reply to Juan Quintela
---
 configure |   21 ++++++++++-----------
 1 files changed, 10 insertions(+), 11 deletions(-)
configure +10 -11
index 2dd9e51..a51dcf7 100755
@@ -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
#36 lore raw

PATCH v2 31/46 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
index a51dcf7..fa05310 100755
@@ -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
#22 lore raw

PATCH v2 22/46 rename HAVE_MACHINE_BSWAP_H to CONFIG_MACHINE_BSWAP_H

In reply to Juan Quintela
---
 Makefile.target      |   10 +++++-----
 bsd-user/syscall.c   |    6 +++---
 bswap.h              |    4 ++--
 configure            |    6 +++---
 linux-user/syscall.c |    6 +++---
 5 files changed, 16 insertions(+), 16 deletions(-)
Makefile.target +5 -5
index 687648c..2955880 100644
@@ -176,7 +176,7 @@ 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)
 
 ifeq ($(ARCH),i386)
-ifdef TARGET_GPROF
+ifdef CONFIG_GPROF
 USE_I386_LD=y
 endif
 ifdef CONFIG_STATIC
@@ -250,7 +250,7 @@ endif
 endif
 
 # profiling code
-ifdef TARGET_GPROF
+ifdef CONFIG_GPROF
 LDFLAGS+=-p
 CFLAGS+=-p
 endif
@@ -319,7 +319,7 @@ VPATH+=:$(SRC_PATH)/bsd-user
 CPPFLAGS+=-I$(SRC_PATH)/bsd-user -I$(SRC_PATH)/bsd-user/$(TARGET_ARCH)
 
 ifeq ($(ARCH),i386)
-ifdef TARGET_GPROF
+ifdef CONFIG_GPROF
 USE_I386_LD=y
 endif
 ifdef CONFIG_STATIC
@@ -621,7 +621,7 @@ endif
 endif
 endif
 endif
-ifdef TARGET_GPROF
+ifdef CONFIG_GPROF
 vl.o: CFLAGS+=-p
 LDFLAGS+=-p
 endif
@@ -635,7 +635,7 @@ SDL_LIBS := $(filter-out -mwindows, $(SDL_LIBS)) -mconsole
 endif
 
 # profiling code
-ifdef TARGET_GPROF
+ifdef CONFIG_GPROF
 LDFLAGS+=-p
 main.o: CFLAGS+=-p
 endif
bsd-user/syscall.c +3 -3
index 4f713f2..b1ae3c2 100644
@@ -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 CONFIG_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 CONFIG_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 CONFIG_GPROF
         _mcleanup();
 #endif
         gdb_exit(cpu_env, arg1);
bswap.h +2 -2
index 1dd357e..864bbeb 100644
@@ -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 +3 -3
index 7a46c96..bb91fe1 100755
@@ -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
 
@@ -1582,8 +1582,8 @@ if test -n "$sparc_cpu"; then
   echo "#define __sparc_${sparc_cpu}__ 1" >> $config_host_h
 fi
 if test "$gprof" = "yes" ; then
-  echo "TARGET_GPROF=yes" >> $config_host_mak
-  echo "#define HAVE_GPROF 1" >> $config_host_h
+  echo "CONFIG_GPROF=y" >> $config_host_mak
+  echo "#define CONFIG_GPROF 1" >> $config_host_h
 fi
 if test "$static" = "yes" ; then
   echo "CONFIG_STATIC=y" >> $config_host_mak
linux-user/syscall.c +3 -3
index 7b57323..d9c083a 100644
@@ -57,7 +57,7 @@
 #include <netinet/ip.h>
 #include <netinet/tcp.h>
 #include <qemu-common.h>
-#ifdef HAVE_GPROF
+#ifdef CONFIG_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 CONFIG_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 CONFIG_GPROF
         _mcleanup();
 #endif
         gdb_exit(cpu_env, arg1);
Signature · 1 line
1.6.2.5
#37 lore raw

PATCH v2 32/46 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
index fa05310..6a076c5 100755
@@ -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
#38 lore raw

PATCH v2 33/46 target_softmmu is undefined at that point

In reply to Juan Quintela
---
 configure |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
configure +1 -1
index 6a076c5..8b3e0f9 100755
@@ -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
#39 lore raw

PATCH v2 34/46 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
index 8b3e0f9..565ae54 100755
@@ -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
#40 lore raw

PATCH v2 35/46 indent with 2 spaces sdl tests

In reply to Juan Quintela
---
 configure |   65 +++++++++++++++++++++++++++++-------------------------------
 1 files changed, 31 insertions(+), 34 deletions(-)
configure +31 -34
index 565ae54..c69862d 100755
@@ -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
#41 lore raw

PATCH v2 36/46 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
index c69862d..8b8e186 100755
@@ -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
#42 lore raw

PATCH v2 37/46 simplify curses library selection

In reply to Juan Quintela
---
 configure |   15 +++++----------
 1 files changed, 5 insertions(+), 10 deletions(-)
configure +5 -10
index 8b8e186..3b0fb72 100755
@@ -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
#43 lore raw

PATCH v2 38/46 simplify brlapi selection

In reply to Juan Quintela

Use same style that everythnig else

---
 Makefile  |    4 +---
 configure |   18 ++++++++++--------
 2 files changed, 11 insertions(+), 11 deletions(-)
Makefile +1 -3
index a53b630..ed9a08d 100644
@@ -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
index 3b0fb72..32ed1ec 100755
@@ -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
#44 lore raw

PATCH v2 39/46 simplify vde libs selection

In reply to Juan Quintela
---
 configure |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
configure +6 -6
index 32ed1ec..3f586cc 100755
@@ -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
#45 lore raw

PATCH v2 40/46 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
index a06278f..e23a2c6 100644
@@ -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
index 3f586cc..7d7ef74 100755
@@ -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
#46 lore raw

PATCH v2 41/46 test if xen is enabled only once

In reply to Juan Quintela
---
 configure |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
configure +1 -4
index 7d7ef74..e490edc 100755
@@ -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
#47 lore raw

PATCH v2 42/46 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
index e490edc..d84cec9 100755
@@ -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
index 3cf7f4e..eb905b7 100644
@@ -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 4096
 extern 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
#48 lore raw

PATCH v2 43/46 rename NEEDS_LIBSUNMATH to CONFIG_NEEDS_LIBSUNMATH

In reply to Juan Quintela

Once 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
index e23a2c6..8042ac0 100644
@@ -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
index d84cec9..2b5b815 100755
@@ -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
index 0bba084..0893ce3 100644
@@ -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
index bebfefd..789179a 100644
@@ -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
#49 lore raw

PATCH v2 44/46 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
index 26f981a..ff207cd 100644
@@ -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
index d411bbb..822a214 100644
@@ -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
index 2b5b815..f80fc5c 100755
@@ -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
index cac0edb..8b7b365 100755
@@ -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
index 7d3eb1a..408b7b4 100644
@@ -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
index bb38971..ff4c86c 100644
@@ -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
index 4388c04..20a2576 100644
@@ -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
index e05caa0..3d2c8b3 100644
@@ -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
index 8e728a3..f0e410b 100644
@@ -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
index d9c083a..6d89f69 100644
@@ -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
index 49e2203..9a3e6ac 100644
@@ -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
#66 lore raw

PATCH v2 46/46 Generate config-host.h from config-host.mak

In reply to Juan Quintela
---
 configure     |   78 +++++++++++++++++++-------------------------------------
 create_config |   45 ++++++++++++++++++++++++++++++--
 2 files changed, 69 insertions(+), 54 deletions(-)
configure +27 -51
index 1aa9d05..aa53703 100755
@@ -1486,9 +1486,8 @@ echo "# Automatically generated by configure - do not modify" > $config_host_mak
 printf "# Configured with:" >> $config_host_mak
 printf " '%s'" "$0" "$@" >> $config_host_mak
 echo >> $config_host_mak
-echo "/* Automatically generated by configure - do not modify */" > $config_host_h
 
-echo "#define CONFIG_QEMU_SHAREDIR \"$prefix$datasuffix\"" >> $config_host_h
+echo "CONFIG_QEMU_SHAREDIR=\"$prefix$datasuffix\"" >> $config_host_mak
 
 case "$cpu" in
   i386|x86_64|alpha|cris|hppa|ia64|m68k|microblaze|mips|mips64|ppc|ppc64|s390|sparc|sparc64)
@@ -1503,26 +1502,21 @@ case "$cpu" in
   ;;
 esac
 echo "ARCH=$ARCH" >> $config_host_mak
-arch_name=`echo $ARCH | tr '[:lower:]' '[:upper:]'`
-echo "#define HOST_$arch_name 1" >> $config_host_h
-
 if test "$debug_tcg" = "yes" ; then
-  echo "#define CONFIG_DEBUG_TCG 1" >> $config_host_h
+  echo "CONFIG_DEBUG_TCG=y" >> $config_host_mak
 fi
 if test "$debug" = "yes" ; then
-  echo "#define CONFIG_DEBUG_EXEC 1" >> $config_host_h
+  echo "CONFIG_DEBUG_EXEC=y" >> $config_host_mak
 fi
 if test "$strip_opt" = "yes" ; then
   echo "STRIP_OPT=-s" >> $config_host_mak
 fi
 if test "$bigendian" = "yes" ; then
   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
+echo "HOST_LONG_BITS=$hostlongbits" >> $config_host_mak
 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
@@ -1530,7 +1524,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 CONFIG_BYTESWAP_H 1" >> $config_host_h
+    echo "CONFIG_BYTESWAP_H=y" >> $config_host_mak
   fi
   cat > $TMPC << EOF
 #include <sys/endian.h>
@@ -1539,58 +1533,48 @@ EOF
 int main(void) { return bswap32(0); }
 EOF
   if $cc $ARCH_CFLAGS -o $TMPE $TMPC >/dev/null 2> /dev/null ; then
-    echo "#define CONFIG_MACHINE_BSWAP_H 1" >> $config_host_h
+    echo "CONFIG_MACHINE_BSWAP_H=y" >> $config_host_mak
   fi
 fi
 
 if test "$darwin" = "yes" ; then
   echo "CONFIG_DARWIN=y" >> $config_host_mak
-  echo "#define CONFIG_DARWIN 1" >> $config_host_h
 fi
 
 if test "$aix" = "yes" ; then
   echo "CONFIG_AIX=y" >> $config_host_mak
-  echo "#define CONFIG_AIX 1" >> $config_host_h
 fi
 
 if test "$solaris" = "yes" ; then
   echo "CONFIG_SOLARIS=y" >> $config_host_mak
-  echo "#define CONFIG_SOLARIS 1" >> $config_host_h
-  echo "#define CONFIG_SOLARIS_VERSION $solarisrev" >> $config_host_h
+  echo "CONFIG_SOLARIS_VERSION=$solarisrev" >> $config_host_mak
   if test "$needs_libsunmath" = "yes" ; then
     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
   echo "CONFIG__sparc_${sparc_cpu}__=y" >> $config_host_mak
-  echo "#define __sparc_${sparc_cpu}__ 1" >> $config_host_h
 fi
 if test "$gprof" = "yes" ; then
   echo "CONFIG_GPROF=y" >> $config_host_mak
-  echo "#define CONFIG_GPROF 1" >> $config_host_h
 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
+  echo "CONFIG_PROFILER=y" >> $config_host_mak
 fi
 if test "$slirp" = "yes" ; then
   echo "CONFIG_SLIRP=y" >> $config_host_mak
-  echo "#define CONFIG_SLIRP 1" >> $config_host_h
 fi
 if test "$vde" = "yes" ; then
   echo "CONFIG_VDE=y" >> $config_host_mak
-  echo "#define CONFIG_VDE 1" >> $config_host_h
   echo "VDE_LIBS=$vde_libs" >> $config_host_mak
 fi
 for card in $audio_card_list; do
     def=CONFIG_`echo $card | tr '[:lower:]' '[:upper:]'`
     echo "$def=y" >> $config_host_mak
-    echo "#define $def 1" >> $config_host_h
 done
 for drv in $audio_drv_list; do
     def=CONFIG_`echo $drv | tr '[:lower:]' '[:upper:]'`
@@ -1604,29 +1588,23 @@ for drv in $audio_drv_list; do
 done
 if test "$mixemu" = "yes" ; then
   echo "CONFIG_MIXEMU=y" >> $config_host_mak
-  echo "#define CONFIG_MIXEMU 1" >> $config_host_h
 fi
 if test "$vnc_tls" = "yes" ; then
   echo "CONFIG_VNC_TLS=y" >> $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
   echo "CONFIG_VNC_SASL=y" >> $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
-  echo "#define CONFIG_FNMATCH 1" >> $config_host_h
+  echo "CONFIG_FNMATCH=y" >> $config_host_mak
 fi
 qemu_version=`head $source_path/VERSION`
 echo "VERSION=$qemu_version" >>$config_host_mak
-echo "#define QEMU_VERSION \"$qemu_version\"" >> $config_host_h
-
-echo "#define QEMU_PKGVERSION \"$pkgversion\"" >> $config_host_h
-
+echo "PKGVERSION=$pkgversion" >>$config_host_mak
 echo "SRC_PATH=$source_path" >> $config_host_mak
 if [ "$source_path_used" = "yes" ]; then
   echo "VPATH=$source_path" >> $config_host_mak
@@ -1636,84 +1614,75 @@ if [ "$build_docs" = "yes" ] ; then
   echo "BUILD_DOCS=yes" >> $config_host_mak
 fi
 if test "$sdl" = "yes" ; then
-  echo "#define CONFIG_SDL 1" >> $config_host_h
   echo "CONFIG_SDL=y" >> $config_host_mak
   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
   echo "CONFIG_COCOA=y" >> $config_host_mak
 fi
 if test "$curses" = "yes" ; then
-  echo "#define CONFIG_CURSES 1" >> $config_host_h
   echo "CONFIG_CURSES=y" >> $config_host_mak
   echo "CURSES_LIBS=$curses_libs" >> $config_host_mak
 fi
 if test "$atfile" = "yes" ; then
-  echo "#define CONFIG_ATFILE 1" >> $config_host_h
+  echo "CONFIG_ATFILE=y" >> $config_host_mak
 fi
 if test "$utimens" = "yes" ; then
-  echo "#define CONFIG_UTIMENSAT 1" >> $config_host_h
+  echo "CONFIG_UTIMENSAT=y" >> $config_host_mak
 fi
 if test "$pipe2" = "yes" ; then
-  echo "#define CONFIG_PIPE2 1" >> $config_host_h
+  echo "CONFIG_PIPE2=y" >> $config_host_mak
 fi
 if test "$splice" = "yes" ; then
-  echo "#define CONFIG_SPLICE 1" >> $config_host_h
+  echo "CONFIG_SPLICE=y" >> $config_host_mak
 fi
 if test "$inotify" = "yes" ; then
-  echo "#define CONFIG_INOTIFY 1" >> $config_host_h
+  echo "CONFIG_INOTIFY=y" >> $config_host_mak
 fi
 if test "$curl" = "yes" ; then
   echo "CONFIG_CURL=y" >> $config_host_mak
   echo "CURL_LIBS=$curl_libs" >> $config_host_mak
-  echo "#define CONFIG_CURL 1" >> $config_host_h
 fi
 if test "$brlapi" = "yes" ; then
   echo "CONFIG_BRLAPI=y" >> $config_host_mak
-  echo "#define CONFIG_BRLAPI 1" >> $config_host_h
   echo "BRLAPI_LIBS=$brlapi_libs" >> $config_host_mak
 fi
 if test "$bluez" = "yes" ; then
   echo "CONFIG_BLUEZ=y" >> $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
   echo "CONFIG_XEN=y" >> $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
   echo "CONFIG_AIO=y" >> $config_host_mak
 fi
 if test "$io_thread" = "yes" ; then
   echo "CONFIG_IOTHREAD=y" >> $config_host_mak
-  echo "#define CONFIG_IOTHREAD 1" >> $config_host_h
 fi
 if test "$blobs" = "yes" ; then
   echo "INSTALL_BLOBS=yes" >> $config_host_mak
 fi
 if test "$iovec" = "yes" ; then
-  echo "#define CONFIG_IOVEC 1" >> $config_host_h
+  echo "CONFIG_IOVEC=y" >> $config_host_mak
 fi
 if test "$preadv" = "yes" ; then
-  echo "#define CONFIG_PREADV 1" >> $config_host_h
+  echo "CONFIG_PREADV=y" >> $config_host_mak
 fi
 if test "$fdt" = "yes" ; then
   echo "CONFIG_FDT=y" >> $config_host_mak
-  echo "#define CONFIG_FDT 1" >> $config_host_h
   echo "FDT_LIBS=$fdt_libs" >> $config_host_mak
 fi
 
 # XXX: suppress that
 if [ "$bsd" = "yes" ] ; then
-  echo "#define CONFIG_BSD 1" >> $config_host_h
+  echo "CONFIG_BSD=y" >> $config_host_mak
 fi
 
-echo "#define CONFIG_UNAME_RELEASE \"$uname_release\"" >> $config_host_h
+echo "CONFIG_UNAME_RELEASE=\"$uname_release\"" >> $config_host_mak
 
 # USB host support
 case "$usb" in
@@ -1800,6 +1769,10 @@ echo "EXESUF=$EXESUF" >> $config_host_mak
 echo "PTHREADLIBS=$PTHREADLIBS" >> $config_host_mak
 echo "CLOCKLIBS=$CLOCKLIBS" >> $config_host_mak
 
+echo "/* Automatically generated by configure - do not modify */" > $config_host_h
+
+$source_path/create_config < $config_host_mak >> $config_host_h
+
 if test -f ${config_host_h}~ ; then
   if cmp -s $config_host_h ${config_host_h}~ ; then
     mv ${config_host_h}~ $config_host_h
@@ -2066,7 +2039,10 @@ if test "$target_bsd_user" = "yes" ; then
   echo "CONFIG_BSD_USER=y" >> $config_mak
 fi
 
-$source_path/create_config < $config_mak > $config_h
+echo "/* Automatically generated by configure - do not modify */" > $config_h
+echo "#include \"../config-host.h\"" >> $config_h
+
+$source_path/create_config < $config_mak >> $config_h
 
 if test -f ${config_h}~ ; then
   if cmp -s $config_h ${config_h}~ ; then
create_config +42 -3

65 lines not on this page · raw message

Signature · 1 line
1.6.2.5
#50 lore raw

PATCH v2 45/46 Remove AUDIO_DRIVERS define

In reply to Juan Quintela
---
 audio/audio.c |   25 ++++++++++++++++++++++++-
 configure     |    3 ---
 2 files changed, 24 insertions(+), 4 deletions(-)
audio/audio.c +24 -1
index 694a83e..00b0c9c 100644
@@ -38,7 +38,30 @@
 #define SW_NAME(sw) (sw)->name ? (sw)->name : "unknown"
 
 static struct audio_driver *drvtab[] = {
-    AUDIO_DRIVERS
+#ifdef CONFIG_ALSA
+    &alsa_audio_driver,
+#endif
+#ifdef CONFIG_COREAUDIO
+    &coreaudio_audio_driver,
+#endif
+#ifdef CONFIG_DSOUND
+    &dsound_audio_driver,
+#endif
+#ifdef CONFIG_ESD
+    &esd_audio_driver,
+#endif
+#ifdef CONFIG_FMOD
+    &fmod_audio_driver,
+#endif
+#ifdef CONFIG_OSS
+    &oss_audio_driver,
+#endif
+#ifdef CONFIG_PA
+    &pa_audio_driver,
+#endif
+#ifdef CONFIG_SDL
+    &sdl_audio_driver,
+#endif
     &no_audio_driver,
     &wav_audio_driver
 };
configure +0 -3
index f80fc5c..1aa9d05 100755
@@ -1592,9 +1592,7 @@ for card in $audio_card_list; do
     echo "$def=y" >> $config_host_mak
     echo "#define $def 1" >> $config_host_h
 done
-echo "#define AUDIO_DRIVERS \\" >> $config_host_h
 for drv in $audio_drv_list; do
-    echo "    &${drv}_audio_driver, \\" >>$config_host_h
     def=CONFIG_`echo $drv | tr '[:lower:]' '[:upper:]'`
     echo "$def=y" >> $config_host_mak
     if test "$drv" = "fmod"; then
@@ -1604,7 +1602,6 @@ for drv in $audio_drv_list; do
         echo "OSS_LIBS=$oss_lib" >> $config_host_mak
     fi
 done
-echo "" >>$config_host_h
 if test "$mixemu" = "yes" ; then
   echo "CONFIG_MIXEMU=y" >> $config_host_mak
   echo "#define CONFIG_MIXEMU 1" >> $config_host_h
Signature · 1 line
1.6.2.5
#21 lore raw

PATCH v2 21/46 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
index f69db25..1a11a61 100644
@@ -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
index 99a5337..7a46c96 100755
@@ -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
#2 lore raw

PATCH v2 2/46 Remove SP_CFLAGS and SP_LDFLAGS

In reply to Juan Quintela

SP_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
index 2600728..041d30e 100755
@@ -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
#0 lore raw

v2 cover More configure/Makefile cleanups

Hi

Changes from previous version:
- 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.

Comments?

Later, Juan.

Juan Quintela (46):
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_BYTESWAP_H to CONFIG_BYTESWAP_H
rename DEBUG_TCG to CONFIG_DEBUG_TCG
rename DEBUG_EXEC to CONFIG_DEBUG_EXEC
rename WORDS_BIGENDIAN to CONFIG_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
Remove AUDIO_DRIVERS define
Generate config-host.h from config-host.mak

 Makefile                           |   35 +---
 Makefile.hw                        |    2 +-
 Makefile.target                    |   53 ++----
 acl.c                              |    4 +-
 audio/audio.c                      |   25 +++-
 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                          |  382 ++++++++++++++++--------------------
 console.c                          |    8 +-
 cpu-all.h                          |   12 +-
 cpu-defs.h                         |    2 +-
 cpu-exec.c                         |   16 +-
 create_config                      |   49 ++++-
 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 +-
 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 +-
 71 files changed, 442 insertions(+), 459 deletions(-)
#4 lore raw

PATCH v2 4/46 remove CONFIG_ from VNC_TLS_{LIBS, FLAGS}

---
 Makefile        |    2 +-
 Makefile.target |    4 ++--
 configure       |    4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)
Makefile +1 -1
index dc95869..a50e868 100644
@@ -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
index f9cd42a..0b2d885 100644
@@ -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
index 0145d53..736ccdd 100755
@@ -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
#5 lore raw

PATCH v2 5/46 use same algorithm for testing and

In reply to Juan Quintela
---
 configure |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
configure +7 -1
index 736ccdd..42519d2 100755
@@ -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
#7 lore raw

PATCH v2 7/46 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
index a50e868..7dc83fd 100644
@@ -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
index 43ad50f..f512fd1 100644
@@ -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
index 2528b2c..227a8c7 100755
@@ -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
#1 lore raw

PATCH v2 1/46 change HOST_SOLARIS to CONFIG_SOLARIS{_VERSION}

In reply to Juan Quintela
---
 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
index e9ed09d..2600728 100755
@@ -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
index 2385d56..ae2fcd0 100644
@@ -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
index c007763..c1072cd 100644
@@ -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
index 2af07a3..9576984 100644
@@ -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
index a28c769..839e5b1 100644
@@ -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
index 850a01f..b9537c1 100644
@@ -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
index 825c0f1..5611bc8 100644
@@ -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
index 410e436..b2e3b41 100644
@@ -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
index bb9a49b..5115cd6 100644
@@ -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
index 97f3533..e8f8f65 100644
@@ -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
#9 lore raw

PATCH v2 9/46 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
index bb2885a..b7a3f4d 100644
@@ -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
index ce9ec30..42dee87 100755
@@ -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
#6 lore raw

PATCH v2 6/46 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
index 0b2d885..43ad50f 100644
@@ -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
index 42519d2..2528b2c 100755
@@ -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
#10 lore raw

PATCH v2 10/46 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
index 42dee87..25fd453 100755
@@ -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
#8 lore raw

PATCH v2 8/46 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
index 7dc83fd..c176aa2 100644
@@ -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
index f512fd1..bb2885a 100644
@@ -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
index 227a8c7..ce9ec30 100755
@@ -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
#15 lore raw

PATCH v2 15/46 fix indententation

In reply to Juan Quintela
---
 configure |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
configure +2 -3
index deb62af..3c5fb6e 100755
@@ -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
#20 lore raw

PATCH v2 20/46 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
index 41889f7..99a5337 100755
@@ -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
index 671c0fc..3cf7f4e 100644
@@ -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
#3 lore raw

PATCH v2 3/46 target_arch2 is redefined unconditionally later

In reply to Juan Quintela
---
 configure |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
configure +0 -3
index 041d30e..0145d53 100755
@@ -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
#16 lore raw

PATCH v2 16/46 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
index 3c5fb6e..be00e28 100755
@@ -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
#13 lore raw

PATCH v2 13/46 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
index b2237dd..687648c 100644
@@ -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
index df9ade2..deb62af 100755
@@ -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
index c2a196f..63f8655 100644
@@ -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
index d9ef3ec..bc85646 100644
@@ -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
index c0e367d..5937dac 100644
@@ -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
index 10cfdb3..6b7f411 100644
@@ -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
#14 lore raw

PATCH v2 14/46 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
index 63f8655..56b8c45 100644
@@ -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
#19 lore raw

PATCH v2 19/46 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
index c9f6ac9..41889f7 100755
@@ -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
index e9fc9fa..3d79f59 100644
@@ -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
#18 lore raw

PATCH v2 18/46 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
index 62605a7..c9f6ac9 100755
@@ -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
index 6a15f89..671c0fc 100644
@@ -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
#17 lore raw

PATCH v2 17/46 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
index 39f726c..82ffea8 100644
@@ -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
index 3e1a875..bdee07f 100644
@@ -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
index be00e28..62605a7 100755
@@ -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
index c1072cd..18819e4 100644
@@ -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
index 9576984..4c70b6c 100644
@@ -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
index 839e5b1..0bba084 100644
@@ -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
index b9537c1..f262150 100644
@@ -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
index 90cf912..520de1d 100644
@@ -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
index b2e3b41..bbfa976 100644
@@ -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
index 287e0cd..37f50a9 100644
@@ -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
index 181c088..053e033 100644
@@ -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
index ce213c2..de86262 100644
@@ -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
#26 lore raw

PATCH v2 23/46 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
index 864bbeb..06de544 100644
@@ -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
index bb91fe1..1b9d7c0 100755
@@ -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
#11 lore raw

PATCH v2 11/46 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
index 17c73df..131ae51 100644
@@ -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
#12 lore raw

PATCH v2 12/46 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
index c176aa2..47e5825 100644
@@ -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
index b7a3f4d..b2237dd 100644
@@ -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
index 25fd453..df9ade2 100755
@@ -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
#23 lore raw

Re: [Qemu-devel] [PATCH 22/46] rename HAVE_MACHINE_BSWAP_H to CONFIG_MACHINE_BSWAP_H

In reply to Juan Quintela

Makefile.target VPATH+=:$(SRC_PATH)/linux-user:$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR) · line 182

Quoted 9 lines · Juan Quintela
Makefile.target +1 -1
@@ -176,7 +176,7 @@ 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)
 
 ifeq ($(ARCH),i386)
-ifdef TARGET_GPROF
+ifdef CONFIG_GPROF
 USE_I386_LD=y
 endif
 ifdef CONFIG_STATIC

I don't see anything obviously wrong with the rest of the patch, but this hunk and others make it look like you forgot to split out a patch in your patch series.

-Nathan

#24 lore raw

[Qemu-devel] Re: [PATCH 22/46] rename HAVE_MACHINE_BSWAP_H to CONFIG_MACHINE_BSWAP_H

Quoted 4 lines · Nathan Froyd
Quoted 3 lines · Juan Quintela
Makefile.target +0 -0
@@ -176,7 +176,7 @@ 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)
 
Quoted 10 lines

Makefile.target VPATH+=:$(SRC_PATH)/linux-user:$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR) · line 182

Quoted 6 lines
Makefile.target +1 -1
 ifeq ($(ARCH),i386)
-ifdef TARGET_GPROF
+ifdef CONFIG_GPROF
 USE_I386_LD=y
 endif
 ifdef CONFIG_STATIC

I don't see anything obviously wrong with the rest of the patch, but this hunk and others make it look like you forgot to split out a patch in your patch series.

You are right. Nice catch. If Anthony asks for one split, will re-split.

Later, Juan.

PD. This is one of my few problems with git-rebase, when I am rebasing,
something do a
git commit --amend
when it should be
git rebase --continue
And obviously, didn't catch this one.

#52 lore raw

[Qemu-devel] Re: [PATCH 45/46] Remove AUDIO_DRIVERS define

Quoted 10 lines · malc
Quoted 5 lines · Juan Quintela
---
  audio/audio.c |   25 ++++++++++++++++++++++++-
  configure     |    3 ---
  2 files changed, 24 insertions(+), 4 deletions(-)

That's how it used to be before, i see no reason of going back to this style.

Personally I prefer Juan's. It makes things more uniform; even though for example I disagree on changing autoconfy HAVE_* defines to CONFIG_*, it wouldn't be a problem at all to have CONFIG_* in qemu.

Paolo

#53 lore raw

[Qemu-devel] Re: [PATCH 45/46] Remove AUDIO_DRIVERS define

Quoted 9 lines · Paolo Bonzini
Quoted 8 lines · malc
Quoted 5 lines · Juan Quintela
---
  audio/audio.c |   25 ++++++++++++++++++++++++-
  configure     |    3 ---
  2 files changed, 24 insertions(+), 4 deletions(-)
Quoted 6 lines
Quoted 2 lines

That's how it used to be before, i see no reason of going back to this style.

Personally I prefer Juan's. It makes things more uniform; even though for example I disagree on changing autoconfy HAVE_* defines to CONFIG_*, it wouldn't be a problem at all to have CONFIG_* in qemu.

For starters this is not a functional equivalent of the things currently in place, please read the commit message of: 0c58ac1c7

Signature · 1 line
mailto:[email protected]
#54 lore raw

[Qemu-devel] Re: [PATCH 45/46] Remove AUDIO_DRIVERS define

Quoted 10 lines · malc
Quoted 8 lines · Paolo Bonzini
Quoted 7 lines · malc
Quoted 5 lines · Juan Quintela
---
   audio/audio.c |   25 ++++++++++++++++++++++++-
   configure     |    3 ---
   2 files changed, 24 insertions(+), 4 deletions(-)
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

That's how it used to be before, i see no reason of going back to this style.

Personally I prefer Juan's. It makes things more uniform; even though for example I disagree on changing autoconfy HAVE_* defines to CONFIG_*, it wouldn't be a problem at all to have CONFIG_* in qemu.

For starters this is not a functional equivalent of the things currently in place, please read the commit message of: 0c58ac1c7

You're right.

Paolo

#30 lore raw

Re: [Qemu-devel] [PATCH 26/46] rename WORDS_BIGENDIAN to CONFIG_WORDS_BIGENDIAN

In reply to Juan Quintela

Review

Quoted 2 lines · Juan Quintela
(quoted diff) +1 -1
-ifeq ($(WORDS_BIGENDIAN),yes)
+ifeq ($(HOST_WORDS_BIGENDIAN),y)

The subject speaks about CONFIG_WORDS_BIGENDIAN, not HOST_WORDS_BIGENDIAN. In the end, there can be only one.

#55 lore raw

[Qemu-devel] Re: [PATCH 45/46] Remove AUDIO_DRIVERS define

In reply to malc
Quoted 14 lines · malc
Quoted 12 lines · Paolo Bonzini
Quoted 10 lines · malc
Quoted 5 lines · Juan Quintela
---
  audio/audio.c |   25 ++++++++++++++++++++++++-
  configure     |    3 ---
  2 files changed, 24 insertions(+), 4 deletions(-)

That's how it used to be before, i see no reason of going back to this style.

Quoted 6 lines
Quoted 3 lines

Personally I prefer Juan's. It makes things more uniform; even though for example I disagree on changing autoconfy HAVE_* defines to CONFIG_*, it wouldn't be a problem at all to have CONFIG_* in qemu.

For starters this is not a functional equivalent of the things currently in place, please read the commit message of: 0c58ac1c7

Thanks very much for the review. I understand now why it was done the way it is, searching for a solution.

Will try to think a better way of being able to autogenerate config-host.h and maintaining the functionality of AUDIO_DRIVERS.

Later, Juan.

#56 lore raw

Re: [Qemu-devel] [PATCH 45/46] Remove AUDIO_DRIVERS define

In reply to malc
Quoted 10 lines · malc
Quoted 6 lines · Juan Quintela
---
 audio/audio.c |   25 ++++++++++++++++++++++++-
 configure     |    3 ---
 2 files changed, 24 insertions(+), 4 deletions(-)
Quoted 3 lines

That's how it used to be before, i see no reason of going back to this style.

Right. The way to get rid of AUDIO_DRIVERS is to convert drvtab[] to be a list with an appropriate audio driver registration function.

Each .c file should have an audio_init() method that then registers the audio_driver structure. Individual audio drivers can be added/removed by simply building or not building the file.

Just like how the block infrastructure works.

Regards,

Anthony Liguori

Quoted 3 lines

[..snip..]

#57 lore raw

[Qemu-devel] Re: [PATCH 45/46] Remove AUDIO_DRIVERS define

Quoted 22 lines · Anthony Liguori
Quoted 10 lines · malc
Quoted 6 lines · Juan Quintela
---
 audio/audio.c |   25 ++++++++++++++++++++++++-
 configure     |    3 ---
 2 files changed, 24 insertions(+), 4 deletions(-)
Quoted 3 lines

That's how it used to be before, i see no reason of going back to this style.

Right. The way to get rid of AUDIO_DRIVERS is to convert drvtab[] to be a list with an appropriate audio driver registration function.

Each .c file should have an audio_init() method that then registers the audio_driver structure. Individual audio drivers can be added/removed by simply building or not building the file.

Quoted 5 lines

Just like how the block infrastructure works.

Regards,

Anthony Liguori

Not enough. See malc hint (g show 0c58ac1c7)

The order in audio_drivers is important, that means you can have a different default sound driver.

After some thinking, my current plan is exporting audio_drv_list to the Makefile, and then generating something similar to AUDIO_DRIVERS.

Notice that the "ordering" problems not only happens with sound drivers, we have the same problems with graphics console, which one is the default one? It depends on what you have configured, and changing the default order is far from trivial.

Later, Juan.

#58 lore raw

Re: [Qemu-devel] Re: [PATCH 45/46] Remove AUDIO_DRIVERS define

Quoted 11 lines · Juan Quintela

The order in audio_drivers is important, that means you can have a different default sound driver.

After some thinking, my current plan is exporting audio_drv_list to the Makefile, and then generating something similar to AUDIO_DRIVERS.

Notice that the "ordering" problems not only happens with sound drivers, we have the same problems with graphics console, which one is the default one? It depends on what you have configured, and changing the default order is far from trivial.

You could pass a goodness value to the registration function, reflecting what we think the best driver is. Then at runtime select the best driver that is supported on the system.

Signature · 1 line
error compiling committee.c: too many arguments to function
#59 lore raw

[Qemu-devel] Re: [PATCH 45/46] Remove AUDIO_DRIVERS define

Quoted 13 lines · Avi Kivity
Quoted 11 lines · Juan Quintela

The order in audio_drivers is important, that means you can have a different default sound driver.

After some thinking, my current plan is exporting audio_drv_list to the Makefile, and then generating something similar to AUDIO_DRIVERS.

Notice that the "ordering" problems not only happens with sound drivers, we have the same problems with graphics console, which one is the default one? It depends on what you have configured, and changing the default order is far from trivial.

Quoted 4 lines

You could pass a goodness value to the registration function, reflecting what we think the best driver is. Then at runtime select the best driver that is supported on the system.

I think the easiest way is to forward the sorted driver list as string to the audio layer and let it be processed there. Given such an extension, we could also allow passing a list of drivers via QEMU_AUDIO_DRV.

BTW, I still wonder why we have OSS and only OSS as the default driver list under Linux. Most distros I came across kicked it out or pushed it to the end of their list (as it requires exclusive access). Would be a chance to improve the default. At least we should extend the list by all available drivers.

Jan

#60 lore raw

[Qemu-devel] Re: [PATCH 45/46] Remove AUDIO_DRIVERS define

Quoted 22 lines · Jan Kiszka
Quoted 14 lines · Avi Kivity
Quoted 12 lines · Juan Quintela

The order in audio_drivers is important, that means you can have a different default sound driver.

After some thinking, my current plan is exporting audio_drv_list to the Makefile, and then generating something similar to AUDIO_DRIVERS.

Notice that the "ordering" problems not only happens with sound drivers, we have the same problems with graphics console, which one is the default one? It depends on what you have configured, and changing the default order is far from trivial.

Quoted 5 lines

You could pass a goodness value to the registration function, reflecting what we think the best driver is. Then at runtime select the best driver that is supported on the system.

Quoted 4 lines

I think the easiest way is to forward the sorted driver list as string to the audio layer and let it be processed there. Given such an extension, we could also allow passing a list of drivers via QEMU_AUDIO_DRV.

Yes, that is better. Decouple the goodness from the driver, and allow the user to override it.

Quoted 7 lines

BTW, I still wonder why we have OSS and only OSS as the default driver list under Linux. Most distros I came across kicked it out or pushed it to the end of their list (as it requires exclusive access). Would be a chance to improve the default. At least we should extend the list by all available drivers.

I have some secondhand memories of pulse and alsa generating very bad output.

Signature · 1 line
error compiling committee.c: too many arguments to function
#61 lore raw

[Qemu-devel] Re: [PATCH 45/46] Remove AUDIO_DRIVERS define

Quoted 23 lines · Avi Kivity
Quoted 22 lines · Jan Kiszka
Quoted 19 lines · Avi Kivity
Quoted 12 lines · Juan Quintela

The order in audio_drivers is important, that means you can have a different default sound driver.

After some thinking, my current plan is exporting audio_drv_list to the Makefile, and then generating something similar to AUDIO_DRIVERS.

Notice that the "ordering" problems not only happens with sound drivers, we have the same problems with graphics console, which one is the default one? It depends on what you have configured, and changing the default order is far from trivial.

You could pass a goodness value to the registration function, reflecting what we think the best driver is. Then at runtime select the best driver that is supported on the system.

Quoted 13 lines
Quoted 4 lines

I think the easiest way is to forward the sorted driver list as string to the audio layer and let it be processed there. Given such an extension, we could also allow passing a list of drivers via QEMU_AUDIO_DRV.

Yes, that is better. Decouple the goodness from the driver, and allow the user to override it.

Quoted 5 lines

BTW, I still wonder why we have OSS and only OSS as the default driver list under Linux. Most distros I came across kicked it out or pushed it to the end of their list (as it requires exclusive access). Would be a chance to improve the default. At least we should extend the list by all available drivers.

Nothing has changed since we had our private e-mail exchange on the subject a while ago. As for 'OSS and only OSS as the default' i'm not sure what that really means, maybe this is an answer though - OSS is the only thing that doesn't require additional headers and libraries, and just works.

Quoted 4 lines
Quoted 2 lines

I have some secondhand memories of pulse and alsa generating very bad output.

I have some firsthand memories of this.

Signature · 1 line
mailto:[email protected]
#62 lore raw

[Qemu-devel] Re: [PATCH 45/46] Remove AUDIO_DRIVERS define

In reply to Avi Kivity
Quoted 42 lines · Avi Kivity
Quoted 24 lines · Jan Kiszka
Quoted 16 lines · Avi Kivity
Quoted 7 lines · Juan Quintela

The order in audio_drivers is important, that means you can have a different default sound driver.

After some thinking, my current plan is exporting audio_drv_list to the Makefile, and then generating something similar to AUDIO_DRIVERS.

Quoted 7 lines

Notice that the "ordering" problems not only happens with sound drivers,
we have the same problems with graphics console, which one is the default one? It depends on what you have configured, and changing the default order is far from trivial.

Quoted 5 lines

You could pass a goodness value to the registration function, reflecting what we think the best driver is. Then at runtime select the best driver that is supported on the system.

Quoted 5 lines

I think the easiest way is to forward the sorted driver list as string to the audio layer and let it be processed there. Given such an extension, we could also allow passing a list of drivers via QEMU_AUDIO_DRV.

Yes, that is better. Decouple the goodness from the driver, and allow the user to override it.

Quoted 7 lines

BTW, I still wonder why we have OSS and only OSS as the default driver list under Linux. Most distros I came across kicked it out or pushed it to the end of their list (as it requires exclusive access). Would be a chance to improve the default. At least we should extend the list by all available drivers.

Quoted 3 lines

I have some secondhand memories of pulse and alsa generating very bad output.

I have fresh memories that pulse still suffers on my Suse while alsa works smoothly (and that with default settings since malc's last major fixes).

Fedora prefers pulse over alsa today (but keeps
OSS in the list). Suse only provides alsa for qemu-0.10. Ubuntu keeps OSS as #1, but at least adds alsa and pulse to the list.

Jan

#65 lore raw

[Qemu-devel] Re: [PATCH 45/46] Remove AUDIO_DRIVERS define

In reply to Juan Quintela
Quoted 30 lines · Juan Quintela
Quoted 28 lines · Anthony Liguori
Quoted 11 lines · malc
Quoted 7 lines · Juan Quintela
---
 audio/audio.c |   25 ++++++++++++++++++++++++-
 configure     |    3 ---
 2 files changed, 24 insertions(+), 4 deletions(-)
Quoted 4 lines

That's how it used to be before, i see no reason of going back to this style.

Right. The way to get rid of AUDIO_DRIVERS is to convert drvtab[] to be a list with an appropriate audio driver registration function.

Each .c file should have an audio_init() method that then registers the audio_driver structure. Individual audio drivers can be added/removed by simply building or not building the file.

Just like how the block infrastructure works.

Regards,

Quoted 8 lines
Quoted 2 lines

Anthony Liguori

Not enough. See malc hint (g show 0c58ac1c7)

The order in audio_drivers is important, that means you can have a different default sound driver.

Block drivers have the same problem and they get around it by having a priority that's explicit in the registration structure. Well, it's sort of implicit as it's based on the return value of probe().

For audio, a static integer priority system should handle things.

Quoted 8 lines

After some thinking, my current plan is exporting audio_drv_list to the Makefile, and then generating something similar to AUDIO_DRIVERS.

Notice that the "ordering" problems not only happens with sound drivers, we have the same problems with graphics console, which one is the default one? It depends on what you have configured, and changing the default order is far from trivial.

For all subsystems, we can address this problem through priorities. Ideally, priorities are abstract enough that to set one priority doesn't require knowledge of other drivers but you can certainly also use priorities to set a fixed order.

Regards,

Anthony Liguori

#64 lore raw

Re: [Qemu-devel] Re: [PATCH 45/46] Remove AUDIO_DRIVERS define

In reply to Jan Kiszka
Quoted 22 lines · Jan Kiszka
Quoted 14 lines · Avi Kivity
Quoted 12 lines · Juan Quintela

The order in audio_drivers is important, that means you can have a different default sound driver.

After some thinking, my current plan is exporting audio_drv_list to the Makefile, and then generating something similar to AUDIO_DRIVERS.

Notice that the "ordering" problems not only happens with sound drivers, we have the same problems with graphics console, which one is the default one? It depends on what you have configured, and changing the default order is far from trivial.

Quoted 5 lines

You could pass a goodness value to the registration function, reflecting what we think the best driver is. Then at runtime select the best driver that is supported on the system.

Quoted 4 lines

I think the easiest way is to forward the sorted driver list as string to the audio layer and let it be processed there. Given such an extension, we could also allow passing a list of drivers via QEMU_AUDIO_DRV.

Sure. Just make audio_init() take an array of strings, have it try and initialize each in that order, then initialize the remaining ones.

I'd say get rid of the compile time ordering entirely. This is the sort of thing that begs for a global configuration file.

Regards,

Anthony Liguori

#63 lore raw

[Qemu-devel] Re: [PATCH 45/46] Remove AUDIO_DRIVERS define

In reply to Jan Kiszka
Quoted 1 line · Jan Kiszka

Avi Kivity wrote:

[..snip..]

Quoted 12 lines
Quoted 12 lines

Yes, that is better. Decouple the goodness from the driver, and allow the user to override it.

Quoted 7 lines

BTW, I still wonder why we have OSS and only OSS as the default driver list under Linux. Most distros I came across kicked it out or pushed it to the end of their list (as it requires exclusive access). Would be a chance to improve the default. At least we should extend the list by all available drivers.

Quoted 7 lines
Quoted 3 lines

I have some secondhand memories of pulse and alsa generating very bad output.

I have fresh memories that pulse still suffers on my Suse while alsa works smoothly (and that with default settings since malc's last major fixes).

Please note that pulseaudio driver is such a hack it's not even funny, i've spent about 10x more time trying to install the thing than actually writing the code and then, after confirming that something is beeping, i removed pulseaudio vowing never to touch it with a ten foot pole again.

Someone, who cares, should probably write something more decent.

Quoted 8 lines

Fedora prefers pulse over alsa today (but keeps
OSS in the list). Suse only provides alsa for qemu-0.10. Ubuntu keeps OSS as #1, but at least adds alsa and pulse to the list.

Jan

Signature · 1 line
mailto:[email protected]
#31 lore raw

[Qemu-devel] Re: [PATCH 26/46] rename WORDS_BIGENDIAN to CONFIG_WORDS_BIGENDIAN

In reply to Blue Swirl
Quoted 7 lines · Blue Swirl

Review

Quoted 2 lines · Juan Quintela
(quoted diff) +1 -1
-ifeq ($(WORDS_BIGENDIAN),yes)
+ifeq ($(HOST_WORDS_BIGENDIAN),y)

The subject speaks about CONFIG_WORDS_BIGENDIAN, not HOST_WORDS_BIGENDIAN. In the end, there can be only one.

Fixed thanks. Patch is correct, subject is wrong.

CONFIG_WORDS_BIGENDIAN -> target
HOST_WORDS_BIGENDIAN -> host

Later, Juan.

#25 lore raw

[Qemu-devel] Re: [PATCH 22/46] rename HAVE_MACHINE_BSWAP_H to CONFIG_MACHINE_BSWAP_H

In reply to Nathan Froyd
Quoted 4 lines · Nathan Froyd
Quoted 3 lines · Juan Quintela
Makefile.target +0 -0
@@ -176,7 +176,7 @@ 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)
 
Quoted 10 lines

Makefile.target VPATH+=:$(SRC_PATH)/linux-user:$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR) · line 182

Quoted 6 lines
Makefile.target +1 -1
 ifeq ($(ARCH),i386)
-ifdef TARGET_GPROF
+ifdef CONFIG_GPROF
 USE_I386_LD=y
 endif
 ifdef CONFIG_STATIC

I don't see anything obviously wrong with the rest of the patch, but this hunk and others make it look like you forgot to split out a patch in your patch series.

Split in two patches. thanks.

Once there, thought it again, and decided that TARGET_GPROF was a better name than CONFIG_GPROF.

Later, Juan.