qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable
@ 2009-07-17 19:20 quintela
  2009-07-17 19:20 ` [Qemu-devel] [PATCH 01/37] change HOST_SOLARIS to CONFIG_SOLARIS{_VERSION} quintela
                   ` (39 more replies)
  0 siblings, 40 replies; 59+ messages in thread
From: quintela @ 2009-07-17 19:20 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>

Hi

Instead of having *_LIBS variables, generate a proper LIBS variable in
configure and use it in Makefiles.

- Remove lots of other ifdef in Makefiles.
- s/HOST_SOLARIS/CONFIG_SOLARIS/ for coherence
- s/HAVE_FDT/CONFIG_FDT/
- Patches are very small/trivials to make easy bisect problems in other architectures/SSOOs

ToDo:
- Make the same treatment for CFLAGS, CPPFLAGS and LDFLAGS.
- Once done that, generate the config-host.h from config-host.mak
  (as done in the target directories).

I have compiled it in linux x86_64 and crosscompiled to windows.
Testers wanted for:

- Mac OS X
- Solaris (specially sparc)
- BSD's

It should just work (famous last words)

Thanks in advance, Juan.

Juan Quintela (37):
  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
  generate CPPFLAGS and LIBS on ./configure
  fold PTHREADLIBS and CLOCKLIBS on generic LIBS
  CONFIG_SOLARIS always want -lsockt -lnsl -lresolv
  Add -static in configure if needed
  generate CONFIG_WIN32 libraries in configure
  fold VDE_LIBS on generic LIBS
  fold CURL_LIBS on generic LIBS
  fold BRLAPI_LIBS on generic LIBS
  fold CURSES_LIBS on generic LIBS
  fold XEN_LIBS on generic LIBS
  fold BLUEZ_LIBS on generic LIBS
  fold VNC_TLS_LIBS on generic LIBS
  fold VNC_SASL_LIBS on generic LIBS
  Rename HAVE_FDT to CONFIG_FDT and define it also in Makefile
  Refactor code to remove one #ifdef CONFIG_FDT
  fold FDT_LIBS on generic LIBS
  fold NEEDS_LIBSUNMATH on generic variables
  fold FMOD_LIBS on generic LIBS
  fold OSS_LIBS on generic LIBS
  fold ALSA libs on generic LIBS
  fold DSOUND libs on generic LIBS
  fold Pulse Audio libs on generic LIBS
  fold ESD libs on generic LIBS
  fold COCOA_LIBS on generic LIBS
  fold SDL_LIBS on generic LIBS
  remove rt variable, we can assign directly LIBS

 Makefile                      |   30 +------
 Makefile.hw                   |    2 +-
 Makefile.target               |   80 +------------------
 configure                     |  175 ++++++++++++++++++++++++----------------
 cpu-exec.c                    |   10 +-
 dyngen-exec.h                 |    2 +-
 fpu/softfloat-native.c        |   13 ++-
 fpu/softfloat-native.h        |    9 +-
 fpu/softfloat.h               |    2 +-
 hw/petalogix_s3adsp1800_mmu.c |    8 +-
 hw/ppc440_bamboo.c            |    2 +-
 hw/ppce500_mpc8544ds.c        |    4 +-
 kqemu.c                       |    2 +-
 osdep.c                       |    6 +-
 target-mips/cpu.h             |    2 +-
 target-ppc/kvm_ppc.c          |    2 +-
 tcg/sparc/tcg-target.h        |    2 +-
 17 files changed, 148 insertions(+), 203 deletions(-)

^ permalink raw reply	[flat|nested] 59+ messages in thread

* [Qemu-devel] [PATCH 01/37] change HOST_SOLARIS to CONFIG_SOLARIS{_VERSION}
  2009-07-17 19:20 [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable quintela
@ 2009-07-17 19:20 ` quintela
  2009-07-17 19:20 ` [Qemu-devel] [PATCH 02/37] Remove SP_CFLAGS and SP_LDFLAGS quintela
                   ` (38 subsequent siblings)
  39 siblings, 0 replies; 59+ messages in thread
From: quintela @ 2009-07-17 19:20 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 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(-)

diff --git a/configure b/configure
index 23b1661..1f5b7a4 100755
--- a/configure
+++ b/configure
@@ -1585,7 +1585,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
diff --git a/cpu-exec.c b/cpu-exec.c
index 2385d56..ae2fcd0 100644
--- a/cpu-exec.c
+++ b/cpu-exec.c
@@ -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 ? */
diff --git a/dyngen-exec.h b/dyngen-exec.h
index c007763..c1072cd 100644
--- a/dyngen-exec.h
+++ b/dyngen-exec.h
@@ -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"
diff --git a/fpu/softfloat-native.c b/fpu/softfloat-native.c
index 2af07a3..9576984 100644
--- a/fpu/softfloat-native.c
+++ b/fpu/softfloat-native.c
@@ -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);
diff --git a/fpu/softfloat-native.h b/fpu/softfloat-native.h
index a28c769..839e5b1 100644
--- a/fpu/softfloat-native.h
+++ b/fpu/softfloat-native.h
@@ -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
diff --git a/fpu/softfloat.h b/fpu/softfloat.h
index 850a01f..b9537c1 100644
--- a/fpu/softfloat.h
+++ b/fpu/softfloat.h
@@ -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

diff --git a/kqemu.c b/kqemu.c
index 825c0f1..5611bc8 100644
--- a/kqemu.c
+++ b/kqemu.c
@@ -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>
diff --git a/osdep.c b/osdep.c
index 410e436..b2e3b41 100644
--- a/osdep.c
+++ b/osdep.c
@@ -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
diff --git a/target-mips/cpu.h b/target-mips/cpu.h
index bb9a49b..5115cd6 100644
--- a/target-mips/cpu.h
+++ b/target-mips/cpu.h
@@ -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
diff --git a/tcg/sparc/tcg-target.h b/tcg/sparc/tcg-target.h
index 97f3533..e8f8f65 100644
--- a/tcg/sparc/tcg-target.h
+++ b/tcg/sparc/tcg-target.h
@@ -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
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 59+ messages in thread

* [Qemu-devel] [PATCH 02/37] Remove SP_CFLAGS and SP_LDFLAGS
  2009-07-17 19:20 [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable quintela
  2009-07-17 19:20 ` [Qemu-devel] [PATCH 01/37] change HOST_SOLARIS to CONFIG_SOLARIS{_VERSION} quintela
@ 2009-07-17 19:20 ` quintela
  2009-07-17 19:20 ` [Qemu-devel] [PATCH 03/37] target_arch2 is redefined unconditionally later quintela
                   ` (37 subsequent siblings)
  39 siblings, 0 replies; 59+ messages in thread
From: quintela @ 2009-07-17 19:20 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>

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

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 configure |   35 ++++++++++++++++++++++-------------
 1 files changed, 22 insertions(+), 13 deletions(-)

diff --git a/configure b/configure
index 1f5b7a4..c209419 100755
--- a/configure
+++ b/configure
@@ -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"
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 59+ messages in thread

* [Qemu-devel] [PATCH 03/37] target_arch2 is redefined unconditionally later
  2009-07-17 19:20 [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable quintela
  2009-07-17 19:20 ` [Qemu-devel] [PATCH 01/37] change HOST_SOLARIS to CONFIG_SOLARIS{_VERSION} quintela
  2009-07-17 19:20 ` [Qemu-devel] [PATCH 02/37] Remove SP_CFLAGS and SP_LDFLAGS quintela
@ 2009-07-17 19:20 ` quintela
  2009-07-17 19:20 ` [Qemu-devel] [PATCH 04/37] remove CONFIG_ from VNC_TLS_{LIBS, FLAGS} quintela
                   ` (36 subsequent siblings)
  39 siblings, 0 replies; 59+ messages in thread
From: quintela @ 2009-07-17 19:20 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 configure |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/configure b/configure
index c209419..5f7a9df 100755
--- a/configure
+++ b/configure
@@ -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"
         ;;
         *)
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 59+ messages in thread

* [Qemu-devel] [PATCH 04/37] remove CONFIG_ from VNC_TLS_{LIBS, FLAGS}
  2009-07-17 19:20 [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable quintela
                   ` (2 preceding siblings ...)
  2009-07-17 19:20 ` [Qemu-devel] [PATCH 03/37] target_arch2 is redefined unconditionally later quintela
@ 2009-07-17 19:20 ` quintela
  2009-07-17 19:20 ` [Qemu-devel] [PATCH 05/37] use same algorithm for testing and quintela
                   ` (35 subsequent siblings)
  39 siblings, 0 replies; 59+ messages in thread
From: quintela @ 2009-07-17 19:20 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile        |    2 +-
 Makefile.target |    4 ++--
 configure       |    4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile
index dc95869..a50e868 100644
--- a/Makefile
+++ b/Makefile
@@ -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

diff --git a/Makefile.target b/Makefile.target
index f9cd42a..0b2d885 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -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
diff --git a/configure b/configure
index 5f7a9df..d76aae9 100755
--- a/configure
+++ b/configure
@@ -1646,8 +1646,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
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 59+ messages in thread

* [Qemu-devel] [PATCH 05/37] use same algorithm for testing  and
  2009-07-17 19:20 [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable quintela
                   ` (3 preceding siblings ...)
  2009-07-17 19:20 ` [Qemu-devel] [PATCH 04/37] remove CONFIG_ from VNC_TLS_{LIBS, FLAGS} quintela
@ 2009-07-17 19:20 ` quintela
  2009-07-17 19:20 ` [Qemu-devel] [PATCH 06/37] remove CONFIG_ from VNC_SASL_{LIBS, FLAGS} quintela
                   ` (34 subsequent siblings)
  39 siblings, 0 replies; 59+ messages in thread
From: quintela @ 2009-07-17 19:20 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 configure |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/configure b/configure
index d76aae9..63e4523 100755
--- a/configure
+++ b/configure
@@ -2105,7 +2105,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

-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 59+ messages in thread

* [Qemu-devel] [PATCH 06/37] remove CONFIG_ from VNC_SASL_{LIBS, FLAGS}
  2009-07-17 19:20 [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable quintela
                   ` (4 preceding siblings ...)
  2009-07-17 19:20 ` [Qemu-devel] [PATCH 05/37] use same algorithm for testing and quintela
@ 2009-07-17 19:20 ` quintela
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 07/37] remove CONFIG_ from BLUEZ_{LIBS,FLAGS} quintela
                   ` (33 subsequent siblings)
  39 siblings, 0 replies; 59+ messages in thread
From: quintela @ 2009-07-17 19:20 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile.target |    4 ++--
 configure       |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Makefile.target b/Makefile.target
index 0b2d885..43ad50f 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -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
diff --git a/configure b/configure
index 63e4523..e95f49d 100755
--- a/configure
+++ b/configure
@@ -1652,8 +1652,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
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 59+ messages in thread

* [Qemu-devel] [PATCH 07/37] remove CONFIG_ from BLUEZ_{LIBS,FLAGS}
  2009-07-17 19:20 [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable quintela
                   ` (5 preceding siblings ...)
  2009-07-17 19:20 ` [Qemu-devel] [PATCH 06/37] remove CONFIG_ from VNC_SASL_{LIBS, FLAGS} quintela
@ 2009-07-17 19:21 ` quintela
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 08/37] make fmod also use FMOD_{LIBS,CFLAGS} quintela
                   ` (32 subsequent siblings)
  39 siblings, 0 replies; 59+ messages in thread
From: quintela @ 2009-07-17 19:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile        |    2 +-
 Makefile.target |    2 +-
 configure       |    4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index a50e868..7dc83fd 100644
--- a/Makefile
+++ b/Makefile
@@ -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)

diff --git a/Makefile.target b/Makefile.target
index 43ad50f..f512fd1 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -466,7 +466,7 @@ LIBS += $(VNC_SASL_LIBS)
 endif

 ifdef CONFIG_BLUEZ
-LIBS += $(CONFIG_BLUEZ_LIBS)
+LIBS += $(BLUEZ_LIBS)
 endif

 # xen backend driver support
diff --git a/configure b/configure
index e95f49d..e5c0e46 100755
--- a/configure
+++ b/configure
@@ -1734,8 +1734,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
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 59+ messages in thread

* [Qemu-devel] [PATCH 08/37] make fmod also use FMOD_{LIBS,CFLAGS}
  2009-07-17 19:20 [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable quintela
                   ` (6 preceding siblings ...)
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 07/37] remove CONFIG_ from BLUEZ_{LIBS,FLAGS} quintela
@ 2009-07-17 19:21 ` quintela
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 09/37] make oss use OSS_LIBS quintela
                   ` (31 subsequent siblings)
  39 siblings, 0 replies; 59+ messages in thread
From: quintela @ 2009-07-17 19:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile        |    2 +-
 Makefile.target |    2 +-
 configure       |    4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 7dc83fd..0bdf188 100644
--- a/Makefile
+++ b/Makefile
@@ -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 := -I$(FMOD_CFLAGS) $(CPPFLAGS)
 endif
 ifdef CONFIG_ESD
 AUDIO_PT = y
diff --git a/Makefile.target b/Makefile.target
index f512fd1..bb2885a 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -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)
diff --git a/configure b/configure
index e5c0e46..c069d8a 100755
--- a/configure
+++ b/configure
@@ -1633,8 +1633,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=$fmod_inc" >> $config_host_mak
     elif test "$drv" = "oss"; then
         echo "CONFIG_OSS_LIB=$oss_lib" >> $config_host_mak
     fi
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 59+ messages in thread

* [Qemu-devel] [PATCH 09/37] make oss use OSS_LIBS
  2009-07-17 19:20 [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable quintela
                   ` (7 preceding siblings ...)
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 08/37] make fmod also use FMOD_{LIBS,CFLAGS} quintela
@ 2009-07-17 19:21 ` quintela
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 10/37] move printing of config-host.mak variables to end of generation quintela
                   ` (30 subsequent siblings)
  39 siblings, 0 replies; 59+ messages in thread
From: quintela @ 2009-07-17 19:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile.target |    2 +-
 configure       |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile.target b/Makefile.target
index bb2885a..b7a3f4d 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -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 =
diff --git a/configure b/configure
index c069d8a..c5e5436 100755
--- a/configure
+++ b/configure
@@ -1636,7 +1636,7 @@ for drv in $audio_drv_list; do
         echo "FMOD_LIBS=$fmod_lib" >> $config_host_mak
         echo "FMOD_CFLAGS=$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
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 59+ messages in thread

* [Qemu-devel] [PATCH 10/37] move printing of config-host.mak variables to end of generation
  2009-07-17 19:20 [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable quintela
                   ` (8 preceding siblings ...)
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 09/37] make oss use OSS_LIBS quintela
@ 2009-07-17 19:21 ` quintela
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 11/37] more specific config.mak can overwrote more general config.mak quintela
                   ` (29 subsequent siblings)
  39 siblings, 0 replies; 59+ messages in thread
From: quintela @ 2009-07-17 19:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 configure |   52 +++++++++++++++++++++++++++-------------------------
 1 files changed, 27 insertions(+), 25 deletions(-)

diff --git a/configure b/configure
index c5e5436..f05ace5 100755
--- a/configure
+++ b/configure
@@ -1497,27 +1497,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|microbaze|mips|mips64|ppc|ppc64|s390|sparc|sparc64)
     ARCH=$cpu
@@ -1540,11 +1521,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
@@ -1838,6 +1814,32 @@ if test \( "$cpu" = "i386" -o "$cpu" = "x86_64" \) -a \
 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
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 59+ messages in thread

* [Qemu-devel] [PATCH 11/37] more specific config.mak can overwrote more general config.mak
  2009-07-17 19:20 [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable quintela
                   ` (9 preceding siblings ...)
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 10/37] move printing of config-host.mak variables to end of generation quintela
@ 2009-07-17 19:21 ` quintela
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 12/37] generate CPPFLAGS and LIBS on ./configure quintela
                   ` (28 subsequent siblings)
  39 siblings, 0 replies; 59+ messages in thread
From: quintela @ 2009-07-17 19:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile.hw |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Makefile.hw b/Makefile.hw
index 17c73df..131ae51 100644
--- a/Makefile.hw
+++ b/Makefile.hw
@@ -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
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 59+ messages in thread

* [Qemu-devel] [PATCH 12/37] generate CPPFLAGS and LIBS on ./configure
  2009-07-17 19:20 [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable quintela
                   ` (10 preceding siblings ...)
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 11/37] more specific config.mak can overwrote more general config.mak quintela
@ 2009-07-17 19:21 ` quintela
  2009-07-17 20:43   ` Blue Swirl
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 13/37] fold PTHREADLIBS and CLOCKLIBS on generic LIBS quintela
                   ` (27 subsequent siblings)
  39 siblings, 1 reply; 59+ messages in thread
From: quintela @ 2009-07-17 19:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile        |    2 +-
 Makefile.target |    3 +--
 configure       |   11 ++++++++++-
 3 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 0bdf188..5c8c453 100644
--- a/Makefile
+++ b/Makefile
@@ -19,7 +19,7 @@ VPATH=$(SRC_PATH):$(SRC_PATH)/hw
 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
diff --git a/Makefile.target b/Makefile.target
index b7a3f4d..8c07c57 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -3,9 +3,8 @@ include $(SRC_PATH)/rules.mak

 TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH)
 VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw
-CPPFLAGS=-I. -I.. -I$(TARGET_PATH) -I$(SRC_PATH) -MMD -MT $@ -MP -DNEED_CPU_H
+CPPFLAGS+=-I. -I.. -I$(TARGET_PATH) -I$(SRC_PATH) -MMD -MT $@ -MP -DNEED_CPU_H
 #CFLAGS+=-Werror
-LIBS=

 ifdef CONFIG_USER_ONLY
 # user emulator name
diff --git a/configure b/configure
index f05ace5..80bb663 100755
--- a/configure
+++ b/configure
@@ -527,6 +527,11 @@ for opt do
   esac
 done

+# LIBS = libraries that we want to use for linking
+# CPPFFLAGS = flags for cpp, they are passed both to .c and .s files
+# CFLAGS = flags for CC, they are passed to .c files
+# LDFLAGS = flags passed to ld
+
 # default flags for all hosts
 CFLAGS="$CFLAGS -g -fno-strict-aliasing"
 if test "$debug" = "no" ; then
@@ -534,6 +539,8 @@ if test "$debug" = "no" ; then
 fi
 CFLAGS="$CFLAGS -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls"
 LDFLAGS="$LDFLAGS -g"
+CPPFLAGS=
+LIBS=

 # Consult white-list to determine whether to enable werror
 # by default.  Only enable by default for git builds
@@ -1836,6 +1843,8 @@ 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 "CPPFLAGS=$CPPFLAGS" >> $config_host_mak
+echo "LIBS=$LIBS" >> $config_host_mak
 echo "EXESUF=$EXESUF" >> $config_host_mak
 echo "PTHREADLIBS=$PTHREADLIBS" >> $config_host_mak
 echo "CLOCKLIBS=$CLOCKLIBS" >> $config_host_mak
@@ -2140,5 +2149,5 @@ for hwlib in 32 64; do
   rm -f $d/Makefile
   ln -s $source_path/Makefile.hw $d/Makefile
   echo "HWLIB=libqemuhw$hwlib.a" > $d/config.mak
-  echo "CPPFLAGS=-DTARGET_PHYS_ADDR_BITS=$hwlib" >> $d/config.mak
+  echo "CPPFLAGS+=-DTARGET_PHYS_ADDR_BITS=$hwlib" >> $d/config.mak
 done
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 59+ messages in thread

* [Qemu-devel] [PATCH 13/37] fold PTHREADLIBS and CLOCKLIBS on generic LIBS
  2009-07-17 19:20 [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable quintela
                   ` (11 preceding siblings ...)
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 12/37] generate CPPFLAGS and LIBS on ./configure quintela
@ 2009-07-17 19:21 ` quintela
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 14/37] CONFIG_SOLARIS always want -lsockt -lnsl -lresolv quintela
                   ` (26 subsequent siblings)
  39 siblings, 0 replies; 59+ messages in thread
From: quintela @ 2009-07-17 19:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile        |    3 ---
 Makefile.target |    3 ---
 configure       |    8 ++------
 3 files changed, 2 insertions(+), 12 deletions(-)

diff --git a/Makefile b/Makefile
index 5c8c453..17bf2f9 100644
--- a/Makefile
+++ b/Makefile
@@ -29,9 +29,6 @@ else
 DOCS=
 endif

-LIBS+=$(PTHREADLIBS)
-LIBS+=$(CLOCKLIBS)
-
 ifdef CONFIG_SOLARIS
 LIBS+=-lsocket -lnsl -lresolv
 endif
diff --git a/Makefile.target b/Makefile.target
index 8c07c57..5c0b54a 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -286,9 +286,6 @@ signal.o: CFLAGS += $(HELPER_CFLAGS)
 ARLIBS=../libqemu_user.a libqemu.a
 endif #CONFIG_LINUX_USER

-LIBS+= $(PTHREADLIBS)
-LIBS+= $(CLOCKLIBS)
-
 #########################################################
 # Darwin user emulator target

diff --git a/configure b/configure
index 80bb663..93470dc 100755
--- a/configure
+++ b/configure
@@ -1216,7 +1216,6 @@ fi
 ##########################################
 # pthread probe
 PTHREADLIBS_LIST="-lpthread -lpthreadGC2"
-PTHREADLIBS=""

 if test "$pthread" = yes; then
   pthread=no
@@ -1227,7 +1226,7 @@ EOF
   for pthread_lib in $PTHREADLIBS_LIST; do
     if $cc $ARCH_CFLAGS -o $TMPE $TMPC $pthread_lib 2> /dev/null > /dev/null ; then
       pthread=yes
-      PTHREADLIBS="$pthread_lib"
+      LIBS="$LIBS $pthread_lib"
       break
     fi
   done
@@ -1383,7 +1382,6 @@ fi

 ##########################################
 # Do we need librt
-CLOCKLIBS=""
 cat > $TMPC <<EOF
 #include <signal.h>
 #include <time.h>
@@ -1398,7 +1396,7 @@ elif $cc $ARCH_CFLAGS -o $TMPE $TMPC -lrt > /dev/null 2> /dev/null ; then
 fi

 if test "$rt" = "yes" ; then
-  CLOCKLIBS="-lrt"
+  LIBS="$LIBS -lrt"
 fi

 if test "$mingw32" = "yes" ; then
@@ -1846,8 +1844,6 @@ echo "LDFLAGS=$LDFLAGS $OS_LDFLAGS $ARCH_LDFLAGS $EXTRA_LDFLAGS" >> $config_host
 echo "CPPFLAGS=$CPPFLAGS" >> $config_host_mak
 echo "LIBS=$LIBS" >> $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
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 59+ messages in thread

* [Qemu-devel] [PATCH 14/37] CONFIG_SOLARIS always want -lsockt -lnsl -lresolv
  2009-07-17 19:20 [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable quintela
                   ` (12 preceding siblings ...)
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 13/37] fold PTHREADLIBS and CLOCKLIBS on generic LIBS quintela
@ 2009-07-17 19:21 ` quintela
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 15/37] Add -static in configure if needed quintela
                   ` (25 subsequent siblings)
  39 siblings, 0 replies; 59+ messages in thread
From: quintela @ 2009-07-17 19:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile        |    4 ----
 Makefile.target |    1 -
 configure       |    1 +
 3 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile
index 17bf2f9..4cf790d 100644
--- a/Makefile
+++ b/Makefile
@@ -29,10 +29,6 @@ else
 DOCS=
 endif

-ifdef CONFIG_SOLARIS
-LIBS+=-lsocket -lnsl -lresolv
-endif
-
 ifdef CONFIG_WIN32
 LIBS+=-lwinmm -lws2_32 -liphlpapi
 endif
diff --git a/Makefile.target b/Makefile.target
index 5c0b54a..1060c30 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -58,7 +58,6 @@ ifdef CONFIG_WIN32
 LIBS+=-lwinmm -lws2_32 -liphlpapi
 endif
 ifdef CONFIG_SOLARIS
-LIBS+=-lsocket -lnsl -lresolv
 ifdef NEEDS_LIBSUNMATH
 LIBS+=-lsunmath
 LDFLAGS+=-L/opt/SUNWspro/prod/lib -R/opt/SUNWspro/prod/lib
diff --git a/configure b/configure
index 93470dc..06e0af1 100755
--- a/configure
+++ b/configure
@@ -1574,6 +1574,7 @@ 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
+  LIBS="$LIBS -lsocket -lnsl -lresolv"
   if test "$needs_libsunmath" = "yes" ; then
     echo "NEEDS_LIBSUNMATH=yes" >> $config_host_mak
     echo "#define NEEDS_LIBSUNMATH 1" >> $config_host_h
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 59+ messages in thread

* [Qemu-devel] [PATCH 15/37] Add -static in configure if needed
  2009-07-17 19:20 [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable quintela
                   ` (13 preceding siblings ...)
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 14/37] CONFIG_SOLARIS always want -lsockt -lnsl -lresolv quintela
@ 2009-07-17 19:21 ` quintela
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 16/37] generate CONFIG_WIN32 libraries in configure quintela
                   ` (24 subsequent siblings)
  39 siblings, 0 replies; 59+ messages in thread
From: quintela @ 2009-07-17 19:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile        |    3 ---
 Makefile.target |   11 -----------
 configure       |    1 +
 3 files changed, 1 insertions(+), 14 deletions(-)

diff --git a/Makefile b/Makefile
index 4cf790d..a50158b 100644
--- a/Makefile
+++ b/Makefile
@@ -20,9 +20,6 @@ CPPFLAGS += -I. -I$(SRC_PATH) -MMD -MP -MT $@
 CPPFLAGS += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
 CPPFLAGS += -U_FORTIFY_SOURCE

-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
diff --git a/Makefile.target b/Makefile.target
index 1060c30..78f6f19 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -173,10 +173,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
@@ -317,10 +313,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
@@ -615,9 +607,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
diff --git a/configure b/configure
index 06e0af1..d3fb000 100755
--- a/configure
+++ b/configure
@@ -1591,6 +1591,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
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 59+ messages in thread

* [Qemu-devel] [PATCH 16/37] generate CONFIG_WIN32 libraries in configure
  2009-07-17 19:20 [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable quintela
                   ` (14 preceding siblings ...)
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 15/37] Add -static in configure if needed quintela
@ 2009-07-17 19:21 ` quintela
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 17/37] fold VDE_LIBS on generic LIBS quintela
                   ` (23 subsequent siblings)
  39 siblings, 0 replies; 59+ messages in thread
From: quintela @ 2009-07-17 19:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile        |    4 ----
 Makefile.target |    3 ---
 configure       |    1 +
 3 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/Makefile b/Makefile
index a50158b..a317a37 100644
--- a/Makefile
+++ b/Makefile
@@ -26,10 +26,6 @@ else
 DOCS=
 endif

-ifdef CONFIG_WIN32
-LIBS+=-lwinmm -lws2_32 -liphlpapi
-endif
-
 build-all: $(TOOLS) $(DOCS) roms recurse-all

 config-host.mak: configure
diff --git a/Makefile.target b/Makefile.target
index 78f6f19..209db45 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -54,9 +54,6 @@ endif
 CPPFLAGS+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
 CPPFLAGS+=-U_FORTIFY_SOURCE
 LIBS+=-lm
-ifdef CONFIG_WIN32
-LIBS+=-lwinmm -lws2_32 -liphlpapi
-endif
 ifdef CONFIG_SOLARIS
 ifdef NEEDS_LIBSUNMATH
 LIBS+=-lsunmath
diff --git a/configure b/configure
index d3fb000..b7a8222 100755
--- a/configure
+++ b/configure
@@ -1537,6 +1537,7 @@ echo "#define HOST_LONG_BITS $hostlongbits" >> $config_host_h
 if test "$mingw32" = "yes" ; then
   echo "CONFIG_WIN32=y" >> $config_host_mak
   echo "#define CONFIG_WIN32 1" >> $config_host_h
+  LIBS="$LIBS -lwinmm -lws2_32 -liphlpapi"
 else
   cat > $TMPC << EOF
 #include <byteswap.h>
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 59+ messages in thread

* [Qemu-devel] [PATCH 17/37] fold VDE_LIBS on generic LIBS
  2009-07-17 19:20 [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable quintela
                   ` (15 preceding siblings ...)
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 16/37] generate CONFIG_WIN32 libraries in configure quintela
@ 2009-07-17 19:21 ` quintela
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 18/37] fold CURL_LIBS " quintela
                   ` (22 subsequent siblings)
  39 siblings, 0 replies; 59+ messages in thread
From: quintela @ 2009-07-17 19:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile        |    2 --
 Makefile.target |    2 +-
 configure       |    2 +-
 3 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index a317a37..1d8dd0e 100644
--- a/Makefile
+++ b/Makefile
@@ -155,8 +155,6 @@ slirp-obj-y += slirp.o mbuf.o misc.o sbuf.o socket.o tcp_input.o tcp_output.o
 slirp-obj-y += tcp_subr.o tcp_timer.o udp.o bootp.o tftp.o
 obj-$(CONFIG_SLIRP) += $(addprefix slirp/, $(slirp-obj-y))

-LIBS+=$(VDE_LIBS)
-
 # xen backend driver support
 obj-$(CONFIG_XEN) += xen_backend.o xen_devconfig.o
 obj-$(CONFIG_XEN) += xen_console.o xenfb.o xen_disk.o xen_nic.o
diff --git a/Makefile.target b/Makefile.target
index 209db45..bd88887 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -638,7 +638,7 @@ vl.o: qemu-options.h

 monitor.o: qemu-monitor.h

-LIBS += $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS) $(VDE_LIBS) $(CURL_LIBS)
+LIBS += $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS) $(CURL_LIBS)
 ARLIBS=../libqemu_common.a libqemu.a $(HWLIB)

 endif # !CONFIG_USER_ONLY
diff --git a/configure b/configure
index b7a8222..51a9be5 100755
--- a/configure
+++ b/configure
@@ -1604,7 +1604,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
+  LIBS="$LIBS -lvdeplug"
 fi
 for card in $audio_card_list; do
     def=CONFIG_`echo $card | tr '[:lower:]' '[:upper:]'`
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 59+ messages in thread

* [Qemu-devel] [PATCH 18/37] fold CURL_LIBS on generic LIBS
  2009-07-17 19:20 [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable quintela
                   ` (16 preceding siblings ...)
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 17/37] fold VDE_LIBS on generic LIBS quintela
@ 2009-07-17 19:21 ` quintela
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 19/37] fold BRLAPI_LIBS " quintela
                   ` (21 subsequent siblings)
  39 siblings, 0 replies; 59+ messages in thread
From: quintela @ 2009-07-17 19:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile        |    2 --
 Makefile.target |    2 +-
 configure       |    2 +-
 3 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 1d8dd0e..ff333a5 100644
--- a/Makefile
+++ b/Makefile
@@ -159,8 +159,6 @@ obj-$(CONFIG_SLIRP) += $(addprefix slirp/, $(slirp-obj-y))
 obj-$(CONFIG_XEN) += xen_backend.o xen_devconfig.o
 obj-$(CONFIG_XEN) += xen_console.o xenfb.o xen_disk.o xen_nic.o

-LIBS+=$(CURL_LIBS)
-
 cocoa.o: cocoa.m

 keymaps.o: keymaps.c keymaps.h
diff --git a/Makefile.target b/Makefile.target
index bd88887..420be27 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -638,7 +638,7 @@ vl.o: qemu-options.h

 monitor.o: qemu-monitor.h

-LIBS += $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS) $(CURL_LIBS)
+LIBS += $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS)
 ARLIBS=../libqemu_common.a libqemu.a $(HWLIB)

 endif # !CONFIG_USER_ONLY
diff --git a/configure b/configure
index 51a9be5..595eaaa 100755
--- a/configure
+++ b/configure
@@ -1708,8 +1708,8 @@ if test "$inotify" = "yes" ; then
 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
+  LIBS="$LIBS $curl_libs"
 fi
 if test "$brlapi" = "yes" ; then
   echo "CONFIG_BRLAPI=y" >> $config_host_mak
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 59+ messages in thread

* [Qemu-devel] [PATCH 19/37] fold BRLAPI_LIBS on generic LIBS
  2009-07-17 19:20 [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable quintela
                   ` (17 preceding siblings ...)
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 18/37] fold CURL_LIBS " quintela
@ 2009-07-17 19:21 ` quintela
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 20/37] fold CURSES_LIBS " quintela
                   ` (20 subsequent siblings)
  39 siblings, 0 replies; 59+ messages in thread
From: quintela @ 2009-07-17 19:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile        |    4 ----
 Makefile.target |    2 +-
 configure       |    2 +-
 3 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile
index ff333a5..b62d8a0 100644
--- a/Makefile
+++ b/Makefile
@@ -96,10 +96,6 @@ obj-y += qdev.o qdev-properties.o ssi.o

 obj-$(CONFIG_BRLAPI) += baum.o

-ifdef CONFIG_BRLAPI
-LIBS+=-lbrlapi
-endif
-
 ifdef CONFIG_WIN32
 obj-y += tap-win32.o
 else
diff --git a/Makefile.target b/Makefile.target
index 420be27..9748736 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -638,7 +638,7 @@ vl.o: qemu-options.h

 monitor.o: qemu-monitor.h

-LIBS += $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS)
+LIBS += $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS)
 ARLIBS=../libqemu_common.a libqemu.a $(HWLIB)

 endif # !CONFIG_USER_ONLY
diff --git a/configure b/configure
index 595eaaa..a26c5c3 100755
--- a/configure
+++ b/configure
@@ -1714,7 +1714,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
+  LIBS="$LIBS -lbrlapi"
 fi
 if test "$bluez" = "yes" ; then
   echo "CONFIG_BLUEZ=y" >> $config_host_mak
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 59+ messages in thread

* [Qemu-devel] [PATCH 20/37] fold CURSES_LIBS on generic LIBS
  2009-07-17 19:20 [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable quintela
                   ` (18 preceding siblings ...)
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 19/37] fold BRLAPI_LIBS " quintela
@ 2009-07-17 19:21 ` quintela
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 21/37] fold XEN_LIBS " quintela
                   ` (19 subsequent siblings)
  39 siblings, 0 replies; 59+ messages in thread
From: quintela @ 2009-07-17 19:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile.target |    2 +-
 configure       |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Makefile.target b/Makefile.target
index 9748736..7992d4a 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -638,7 +638,7 @@ vl.o: qemu-options.h

 monitor.o: qemu-monitor.h

-LIBS += $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS)
+LIBS += $(SDL_LIBS) $(COCOA_LIBS)
 ARLIBS=../libqemu_common.a libqemu.a $(HWLIB)

 endif # !CONFIG_USER_ONLY
diff --git a/configure b/configure
index a26c5c3..39ab06c 100755
--- a/configure
+++ b/configure
@@ -1686,9 +1686,9 @@ 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
+    LIBS="$LIBS -lncurses"
   else
-    echo "CURSES_LIBS=-lcurses" >> $config_host_mak
+    LIBS="$LIBS -lcurses"
   fi
 fi
 if test "$atfile" = "yes" ; then
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 59+ messages in thread

* [Qemu-devel] [PATCH 21/37] fold XEN_LIBS on generic LIBS
  2009-07-17 19:20 [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable quintela
                   ` (19 preceding siblings ...)
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 20/37] fold CURSES_LIBS " quintela
@ 2009-07-17 19:21 ` quintela
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 22/37] fold BLUEZ_LIBS " quintela
                   ` (18 subsequent siblings)
  39 siblings, 0 replies; 59+ messages in thread
From: quintela @ 2009-07-17 19:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile.target |    3 ---
 configure       |    2 +-
 2 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/Makefile.target b/Makefile.target
index 7992d4a..7163d24 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -455,9 +455,6 @@ endif

 # xen backend driver support
 obj-$(CONFIG_XEN) += xen_machine_pv.o xen_domainbuild.o
-ifeq ($(CONFIG_XEN), y)
-  LIBS += $(XEN_LIBS)
-endif

 # USB layer
 obj-y += usb-ohci.o
diff --git a/configure b/configure
index 39ab06c..c3e8a3b 100755
--- a/configure
+++ b/configure
@@ -1723,7 +1723,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
+  LIBS="$LIBS -lxenstore -lxenctrl -lxenguest"
 fi
 if test "$aio" = "yes" ; then
   echo "#define CONFIG_AIO 1" >> $config_host_h
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 59+ messages in thread

* [Qemu-devel] [PATCH 22/37] fold BLUEZ_LIBS on generic LIBS
  2009-07-17 19:20 [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable quintela
                   ` (20 preceding siblings ...)
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 21/37] fold XEN_LIBS " quintela
@ 2009-07-17 19:21 ` quintela
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 23/37] fold VNC_TLS_LIBS " quintela
                   ` (17 subsequent siblings)
  39 siblings, 0 replies; 59+ messages in thread
From: quintela @ 2009-07-17 19:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile.target |    4 ----
 configure       |    4 ++--
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/Makefile.target b/Makefile.target
index 7163d24..86afea3 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -449,10 +449,6 @@ CPPFLAGS += $(VNC_SASL_CFLAGS)
 LIBS += $(VNC_SASL_LIBS)
 endif

-ifdef CONFIG_BLUEZ
-LIBS += $(BLUEZ_LIBS)
-endif
-
 # xen backend driver support
 obj-$(CONFIG_XEN) += xen_machine_pv.o xen_domainbuild.o

diff --git a/configure b/configure
index c3e8a3b..344ebb1 100755
--- a/configure
+++ b/configure
@@ -1718,9 +1718,9 @@ if test "$brlapi" = "yes" ; then
 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
+  echo "BLUEZ_CFLAGS=$bluez_cflags" >> $config_host_mak
+  LIBS="$LIBS $bluez_libs"
 fi
 if test "$xen" = "yes" ; then
   LIBS="$LIBS -lxenstore -lxenctrl -lxenguest"
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 59+ messages in thread

* [Qemu-devel] [PATCH 23/37] fold VNC_TLS_LIBS on generic LIBS
  2009-07-17 19:20 [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable quintela
                   ` (21 preceding siblings ...)
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 22/37] fold BLUEZ_LIBS " quintela
@ 2009-07-17 19:21 ` quintela
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 24/37] fold VNC_SASL_LIBS " quintela
                   ` (16 subsequent siblings)
  39 siblings, 0 replies; 59+ messages in thread
From: quintela @ 2009-07-17 19:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile.target |    1 -
 configure       |    2 +-
 2 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/Makefile.target b/Makefile.target
index 86afea3..98dc8b0 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -441,7 +441,6 @@ endif

 ifdef CONFIG_VNC_TLS
 CPPFLAGS += $(VNC_TLS_CFLAGS)
-LIBS += $(VNC_TLS_LIBS)
 endif

 ifdef CONFIG_VNC_SASL
diff --git a/configure b/configure
index 344ebb1..196757b 100755
--- a/configure
+++ b/configure
@@ -1631,8 +1631,8 @@ 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
+ LIBS="$LIBS $vnc_tls_libs"
 fi
 if test "$vnc_sasl" = "yes" ; then
   echo "CONFIG_VNC_SASL=y" >> $config_host_mak
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 59+ messages in thread

* [Qemu-devel] [PATCH 24/37] fold VNC_SASL_LIBS on generic LIBS
  2009-07-17 19:20 [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable quintela
                   ` (22 preceding siblings ...)
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 23/37] fold VNC_TLS_LIBS " quintela
@ 2009-07-17 19:21 ` quintela
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 25/37] Rename HAVE_FDT to CONFIG_FDT and define it also in Makefile quintela
                   ` (15 subsequent siblings)
  39 siblings, 0 replies; 59+ messages in thread
From: quintela @ 2009-07-17 19:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile.target |    1 -
 configure       |    2 +-
 2 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/Makefile.target b/Makefile.target
index 98dc8b0..f7536af 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -445,7 +445,6 @@ endif

 ifdef CONFIG_VNC_SASL
 CPPFLAGS += $(VNC_SASL_CFLAGS)
-LIBS += $(VNC_SASL_LIBS)
 endif

 # xen backend driver support
diff --git a/configure b/configure
index 196757b..cac1711 100755
--- a/configure
+++ b/configure
@@ -1637,8 +1637,8 @@ 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
+  LIBS="$LIBS $vnc_sasl_libs"
 fi
 if test "$fnmatch" = "yes" ; then
   echo "#define HAVE_FNMATCH_H 1" >> $config_host_h
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 59+ messages in thread

* [Qemu-devel] [PATCH 25/37] Rename HAVE_FDT to CONFIG_FDT and define it also in Makefile
  2009-07-17 19:20 [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable quintela
                   ` (23 preceding siblings ...)
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 24/37] fold VNC_SASL_LIBS " quintela
@ 2009-07-17 19:21 ` quintela
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 26/37] Refactor code to remove one #ifdef CONFIG_FDT quintela
                   ` (14 subsequent siblings)
  39 siblings, 0 replies; 59+ messages in thread
From: quintela @ 2009-07-17 19:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 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(-)

diff --git a/Makefile.target b/Makefile.target
index f7536af..36222f2 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -496,8 +496,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

@@ -524,8 +524,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

diff --git a/configure b/configure
index cac1711..7e2cca1 100755
--- a/configure
+++ b/configure
@@ -1743,7 +1743,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

diff --git a/hw/petalogix_s3adsp1800_mmu.c b/hw/petalogix_s3adsp1800_mmu.c
index c2a196f..63f8655 100644
--- a/hw/petalogix_s3adsp1800_mmu.c
+++ b/hw/petalogix_s3adsp1800_mmu.c
@@ -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) {
diff --git a/hw/ppc440_bamboo.c b/hw/ppc440_bamboo.c
index d9ef3ec..bc85646 100644
--- a/hw/ppc440_bamboo.c
+++ b/hw/ppc440_bamboo.c
@@ -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;
diff --git a/hw/ppce500_mpc8544ds.c b/hw/ppce500_mpc8544ds.c
index c0e367d..5937dac 100644
--- a/hw/ppce500_mpc8544ds.c
+++ b/hw/ppce500_mpc8544ds.c
@@ -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;
diff --git a/target-ppc/kvm_ppc.c b/target-ppc/kvm_ppc.c
index 10cfdb3..6b7f411 100644
--- a/target-ppc/kvm_ppc.c
+++ b/target-ppc/kvm_ppc.c
@@ -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)
 {
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 59+ messages in thread

* [Qemu-devel] [PATCH 26/37] Refactor code to remove one #ifdef CONFIG_FDT
  2009-07-17 19:20 [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable quintela
                   ` (24 preceding siblings ...)
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 25/37] Rename HAVE_FDT to CONFIG_FDT and define it also in Makefile quintela
@ 2009-07-17 19:21 ` quintela
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 27/37] fold FDT_LIBS on generic LIBS quintela
                   ` (13 subsequent siblings)
  39 siblings, 0 replies; 59+ messages in thread
From: quintela @ 2009-07-17 19:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 hw/petalogix_s3adsp1800_mmu.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/hw/petalogix_s3adsp1800_mmu.c b/hw/petalogix_s3adsp1800_mmu.c
index 63f8655..56b8c45 100644
--- a/hw/petalogix_s3adsp1800_mmu.c
+++ b/hw/petalogix_s3adsp1800_mmu.c
@@ -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) {
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 59+ messages in thread

* [Qemu-devel] [PATCH 27/37] fold FDT_LIBS on generic LIBS
  2009-07-17 19:20 [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable quintela
                   ` (25 preceding siblings ...)
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 26/37] Refactor code to remove one #ifdef CONFIG_FDT quintela
@ 2009-07-17 19:21 ` quintela
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 28/37] fold NEEDS_LIBSUNMATH on generic variables quintela
                   ` (12 subsequent siblings)
  39 siblings, 0 replies; 59+ messages in thread
From: quintela @ 2009-07-17 19:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile.target |    6 ------
 configure       |    2 +-
 2 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/Makefile.target b/Makefile.target
index 36222f2..c80abf3 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -497,9 +497,6 @@ 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
@@ -525,9 +522,6 @@ 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
diff --git a/configure b/configure
index 7e2cca1..bc208b2 100755
--- a/configure
+++ b/configure
@@ -1745,7 +1745,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
+  LIBS="$LIBS -lfdt"
 fi

 # XXX: suppress that
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 59+ messages in thread

* [Qemu-devel] [PATCH 28/37] fold NEEDS_LIBSUNMATH on generic variables
  2009-07-17 19:20 [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable quintela
                   ` (26 preceding siblings ...)
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 27/37] fold FDT_LIBS on generic LIBS quintela
@ 2009-07-17 19:21 ` quintela
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 29/37] fold FMOD_LIBS on generic LIBS quintela
                   ` (11 subsequent siblings)
  39 siblings, 0 replies; 59+ messages in thread
From: quintela @ 2009-07-17 19:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile.target |    7 -------
 configure       |    3 +++
 2 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/Makefile.target b/Makefile.target
index c80abf3..b79ae93 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -54,13 +54,6 @@ endif
 CPPFLAGS+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
 CPPFLAGS+=-U_FORTIFY_SOURCE
 LIBS+=-lm
-ifdef CONFIG_SOLARIS
-ifdef NEEDS_LIBSUNMATH
-LIBS+=-lsunmath
-LDFLAGS+=-L/opt/SUNWspro/prod/lib -R/opt/SUNWspro/prod/lib
-CFLAGS+=-I/opt/SUNWspro/prod/include/cc
-endif
-endif

 kvm.o: CFLAGS+=$(KVM_CFLAGS)
 kvm-all.o: CFLAGS+=$(KVM_CFLAGS)
diff --git a/configure b/configure
index bc208b2..c627ebb 100755
--- a/configure
+++ b/configure
@@ -1579,6 +1579,9 @@ if test "$solaris" = "yes" ; then
   if test "$needs_libsunmath" = "yes" ; then
     echo "NEEDS_LIBSUNMATH=yes" >> $config_host_mak
     echo "#define NEEDS_LIBSUNMATH 1" >> $config_host_h
+    LIBS="$LIBS -lsunmath"
+    LDFLAGS="$LDFLAGS -L/opt/SUNWspro/prod/lib -R/opt/SUNWspro/prod/lib"
+    CFLAGS="$CFLAGS -I/opt/SUNWspro/prod/include/cc"
   fi
 fi
 if test -n "$sparc_cpu"; then
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 59+ messages in thread

* [Qemu-devel] [PATCH 29/37] fold FMOD_LIBS on generic LIBS
  2009-07-17 19:20 [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable quintela
                   ` (27 preceding siblings ...)
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 28/37] fold NEEDS_LIBSUNMATH on generic variables quintela
@ 2009-07-17 19:21 ` quintela
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 30/37] fold OSS_LIBS " quintela
                   ` (10 subsequent siblings)
  39 siblings, 0 replies; 59+ messages in thread
From: quintela @ 2009-07-17 19:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile.target |    3 ---
 configure       |    2 +-
 2 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/Makefile.target b/Makefile.target
index b79ae93..a9605b5 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -413,9 +413,6 @@ endif
 ifdef CONFIG_DSOUND
 LIBS += -lole32 -ldxguid
 endif
-ifdef CONFIG_FMOD
-LIBS += $(FMOD_LIBS)
-endif
 ifdef CONFIG_OSS
 LIBS += $(OSS_LIBS)
 endif
diff --git a/configure b/configure
index c627ebb..440f793 100755
--- a/configure
+++ b/configure
@@ -1620,7 +1620,7 @@ 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 "FMOD_LIBS=$fmod_lib" >> $config_host_mak
+        LIBS="$LIBS $fmod_lib"
         echo "FMOD_CFLAGS=$fmod_inc" >> $config_host_mak
     elif test "$drv" = "oss"; then
         echo "OSS_LIBS=$oss_lib" >> $config_host_mak
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 59+ messages in thread

* [Qemu-devel] [PATCH 30/37] fold OSS_LIBS on generic LIBS
  2009-07-17 19:20 [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable quintela
                   ` (28 preceding siblings ...)
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 29/37] fold FMOD_LIBS on generic LIBS quintela
@ 2009-07-17 19:21 ` quintela
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 31/37] fold ALSA libs " quintela
                   ` (9 subsequent siblings)
  39 siblings, 0 replies; 59+ messages in thread
From: quintela @ 2009-07-17 19:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile.target |    3 ---
 configure       |    2 +-
 2 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/Makefile.target b/Makefile.target
index a9605b5..0b86979 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -413,9 +413,6 @@ endif
 ifdef CONFIG_DSOUND
 LIBS += -lole32 -ldxguid
 endif
-ifdef CONFIG_OSS
-LIBS += $(OSS_LIBS)
-endif

 sound-obj-y =
 sound-obj-$(CONFIG_SB16) += sb16.o
diff --git a/configure b/configure
index 440f793..4d50f19 100755
--- a/configure
+++ b/configure
@@ -1623,7 +1623,7 @@ for drv in $audio_drv_list; do
         LIBS="$LIBS $fmod_lib"
         echo "FMOD_CFLAGS=$fmod_inc" >> $config_host_mak
     elif test "$drv" = "oss"; then
-        echo "OSS_LIBS=$oss_lib" >> $config_host_mak
+        LIBS="$LIBS $oss_lib"
     fi
 done
 echo "" >>$config_host_h
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 59+ messages in thread

* [Qemu-devel] [PATCH 31/37] fold ALSA libs on generic LIBS
  2009-07-17 19:20 [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable quintela
                   ` (29 preceding siblings ...)
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 30/37] fold OSS_LIBS " quintela
@ 2009-07-17 19:21 ` quintela
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 32/37] fold DSOUND " quintela
                   ` (8 subsequent siblings)
  39 siblings, 0 replies; 59+ messages in thread
From: quintela @ 2009-07-17 19:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile.target |    3 ---
 configure       |    2 ++
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/Makefile.target b/Makefile.target
index 0b86979..ac4ccdb 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -401,9 +401,6 @@ obj-y += virtio-blk.o virtio-balloon.o virtio-net.o virtio-console.o
 obj-$(CONFIG_KVM) += kvm.o kvm-all.o

 LIBS+=-lz
-ifdef CONFIG_ALSA
-LIBS += -lasound
-endif
 ifdef CONFIG_ESD
 LIBS += -lesd
 endif
diff --git a/configure b/configure
index 4d50f19..0c55ffc 100755
--- a/configure
+++ b/configure
@@ -1624,6 +1624,8 @@ for drv in $audio_drv_list; do
         echo "FMOD_CFLAGS=$fmod_inc" >> $config_host_mak
     elif test "$drv" = "oss"; then
         LIBS="$LIBS $oss_lib"
+    elif test "$drv" = "alsa"; then
+        LIBS="$LIBS -lasound"
     fi
 done
 echo "" >>$config_host_h
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 59+ messages in thread

* [Qemu-devel] [PATCH 32/37] fold DSOUND libs on generic LIBS
  2009-07-17 19:20 [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable quintela
                   ` (30 preceding siblings ...)
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 31/37] fold ALSA libs " quintela
@ 2009-07-17 19:21 ` quintela
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 33/37] fold Pulse Audio " quintela
                   ` (7 subsequent siblings)
  39 siblings, 0 replies; 59+ messages in thread
From: quintela @ 2009-07-17 19:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile.target |    3 ---
 configure       |    2 ++
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/Makefile.target b/Makefile.target
index ac4ccdb..42516d4 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -407,9 +407,6 @@ endif
 ifdef CONFIG_PA
 LIBS += -lpulse-simple
 endif
-ifdef CONFIG_DSOUND
-LIBS += -lole32 -ldxguid
-endif

 sound-obj-y =
 sound-obj-$(CONFIG_SB16) += sb16.o
diff --git a/configure b/configure
index 0c55ffc..1fbd35a 100755
--- a/configure
+++ b/configure
@@ -1626,6 +1626,8 @@ for drv in $audio_drv_list; do
         LIBS="$LIBS $oss_lib"
     elif test "$drv" = "alsa"; then
         LIBS="$LIBS -lasound"
+    elif test "$drv" = "dsound"; then
+        LIBS="$LIBS -lole32 -ldxguid"
     fi
 done
 echo "" >>$config_host_h
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 59+ messages in thread

* [Qemu-devel] [PATCH 33/37] fold Pulse Audio libs on generic LIBS
  2009-07-17 19:20 [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable quintela
                   ` (31 preceding siblings ...)
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 32/37] fold DSOUND " quintela
@ 2009-07-17 19:21 ` quintela
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 34/37] fold ESD " quintela
                   ` (6 subsequent siblings)
  39 siblings, 0 replies; 59+ messages in thread
From: quintela @ 2009-07-17 19:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile.target |    3 ---
 configure       |    2 ++
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/Makefile.target b/Makefile.target
index 42516d4..5fe4082 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -404,9 +404,6 @@ LIBS+=-lz
 ifdef CONFIG_ESD
 LIBS += -lesd
 endif
-ifdef CONFIG_PA
-LIBS += -lpulse-simple
-endif

 sound-obj-y =
 sound-obj-$(CONFIG_SB16) += sb16.o
diff --git a/configure b/configure
index 1fbd35a..3e010bc 100755
--- a/configure
+++ b/configure
@@ -1628,6 +1628,8 @@ for drv in $audio_drv_list; do
         LIBS="$LIBS -lasound"
     elif test "$drv" = "dsound"; then
         LIBS="$LIBS -lole32 -ldxguid"
+    elif test "$drv" = "pa"; then
+        LIBS="$LIBS -lpulse-simple"
     fi
 done
 echo "" >>$config_host_h
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 59+ messages in thread

* [Qemu-devel] [PATCH 34/37] fold ESD libs on generic LIBS
  2009-07-17 19:20 [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable quintela
                   ` (32 preceding siblings ...)
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 33/37] fold Pulse Audio " quintela
@ 2009-07-17 19:21 ` quintela
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 35/37] fold COCOA_LIBS " quintela
                   ` (5 subsequent siblings)
  39 siblings, 0 replies; 59+ messages in thread
From: quintela @ 2009-07-17 19:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile.target |    3 ---
 configure       |    2 ++
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/Makefile.target b/Makefile.target
index 5fe4082..0cac1cc 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -401,9 +401,6 @@ obj-y += virtio-blk.o virtio-balloon.o virtio-net.o virtio-console.o
 obj-$(CONFIG_KVM) += kvm.o kvm-all.o

 LIBS+=-lz
-ifdef CONFIG_ESD
-LIBS += -lesd
-endif

 sound-obj-y =
 sound-obj-$(CONFIG_SB16) += sb16.o
diff --git a/configure b/configure
index 3e010bc..4970215 100755
--- a/configure
+++ b/configure
@@ -1630,6 +1630,8 @@ for drv in $audio_drv_list; do
         LIBS="$LIBS -lole32 -ldxguid"
     elif test "$drv" = "pa"; then
         LIBS="$LIBS -lpulse-simple"
+    elif test "$drv" = "esd"; then
+        LIBS="$LIBS -lesd"
     fi
 done
 echo "" >>$config_host_h
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 59+ messages in thread

* [Qemu-devel] [PATCH 35/37] fold COCOA_LIBS on generic LIBS
  2009-07-17 19:20 [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable quintela
                   ` (33 preceding siblings ...)
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 34/37] fold ESD " quintela
@ 2009-07-17 19:21 ` quintela
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 36/37] fold SDL_LIBS " quintela
                   ` (4 subsequent siblings)
  39 siblings, 0 replies; 59+ messages in thread
From: quintela @ 2009-07-17 19:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile.target |    8 +-------
 configure       |    3 +++
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/Makefile.target b/Makefile.target
index 0cac1cc..8883ab9 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -553,12 +553,6 @@ obj-sh4-y += ide.o
 obj-m68k-y = an5206.o mcf5206.o mcf_uart.o mcf_intc.o mcf5208.o mcf_fec.o
 obj-m68k-y += m68k-semi.o dummy_m68k.o

-ifdef CONFIG_COCOA
-COCOA_LIBS=-F/System/Library/Frameworks -framework Cocoa -framework IOKit
-ifdef CONFIG_COREAUDIO
-COCOA_LIBS+=-framework CoreAudio
-endif
-endif
 ifdef CONFIG_SLIRP
 CPPFLAGS+=-I$(SRC_PATH)/slirp
 endif
@@ -598,7 +592,7 @@ vl.o: qemu-options.h

 monitor.o: qemu-monitor.h

-LIBS += $(SDL_LIBS) $(COCOA_LIBS)
+LIBS += $(SDL_LIBS)
 ARLIBS=../libqemu_common.a libqemu.a $(HWLIB)

 endif # !CONFIG_USER_ONLY
diff --git a/configure b/configure
index 4970215..d95054f 100755
--- a/configure
+++ b/configure
@@ -1692,6 +1692,9 @@ fi
 if test "$cocoa" = "yes" ; then
   echo "#define CONFIG_COCOA 1" >> $config_host_h
   echo "CONFIG_COCOA=y" >> $config_host_mak
+  LIBS="$LIBS -F/System/Library/Frameworks -framework Cocoa -framework IOKit"
+  # You can't configure coreaudio out for cocoa at this moment
+  LIBS="$LIBS -framework CoreAudio"
 fi
 if test "$curses" = "yes" ; then
   echo "#define CONFIG_CURSES 1" >> $config_host_h
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 59+ messages in thread

* [Qemu-devel] [PATCH 36/37] fold SDL_LIBS on generic LIBS
  2009-07-17 19:20 [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable quintela
                   ` (34 preceding siblings ...)
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 35/37] fold COCOA_LIBS " quintela
@ 2009-07-17 19:21 ` quintela
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 37/37] remove rt variable, we can assign directly LIBS quintela
                   ` (3 subsequent siblings)
  39 siblings, 0 replies; 59+ messages in thread
From: quintela @ 2009-07-17 19:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile.target |    5 -----
 configure       |    8 +++++---
 2 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/Makefile.target b/Makefile.target
index 8883ab9..8621c76 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -576,10 +576,6 @@ ifeq ($(ARCH),ia64)
 LDFLAGS+=-Wl,-G0 -Wl,-T,$(SRC_PATH)/ia64.ld
 endif

-ifdef CONFIG_WIN32
-SDL_LIBS := $(filter-out -mwindows, $(SDL_LIBS)) -mconsole
-endif
-
 # profiling code
 ifdef TARGET_GPROF
 LDFLAGS+=-p
@@ -592,7 +588,6 @@ vl.o: qemu-options.h

 monitor.o: qemu-monitor.h

-LIBS += $(SDL_LIBS)
 ARLIBS=../libqemu_common.a libqemu.a $(HWLIB)

 endif # !CONFIG_USER_ONLY
diff --git a/configure b/configure
index d95054f..6f8abb0 100755
--- a/configure
+++ b/configure
@@ -1677,11 +1677,13 @@ 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
-    echo "SDL_LIBS=$sdl_static_libs" >> $config_host_mak
+    LIBS="$LIBS $sdl_static_libs"
   elif test "$sdl_x11" = "yes" ; then
-    echo "SDL_LIBS=`$sdl_config --libs` -lX11" >> $config_host_mak
+    LIBS="$LIBS `$sdl_config --libs` -lX11"
+  elif test "$mingw32" = "yes" ; then
+    LIBS="$LIBS `$sdl_config --libs | sed s/-mwindows//g` -mconsole"
   else
-    echo "SDL_LIBS=`$sdl_config --libs`" >> $config_host_mak
+    LIBS="$LIBS `$sdl_config --libs`"
   fi
   if [ "${aa}" = "yes" ] ; then
     echo "SDL_CFLAGS=`$sdl_config --cflags` `aalib-config --cflags`" >> $config_host_mak
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 59+ messages in thread

* [Qemu-devel] [PATCH 37/37] remove rt variable, we can assign directly LIBS
  2009-07-17 19:20 [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable quintela
                   ` (35 preceding siblings ...)
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 36/37] fold SDL_LIBS " quintela
@ 2009-07-17 19:21 ` quintela
  2009-07-17 19:35 ` [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable Blue Swirl
                   ` (2 subsequent siblings)
  39 siblings, 0 replies; 59+ messages in thread
From: quintela @ 2009-07-17 19:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

From: Juan Quintela <quintela@redhat.com>


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 configure |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/configure b/configure
index 6f8abb0..d467c57 100755
--- a/configure
+++ b/configure
@@ -1388,14 +1388,9 @@ cat > $TMPC <<EOF
 int main(void) { clockid_t id; return clock_gettime(id, NULL); }
 EOF

-rt=no
 if $cc $ARCH_CFLAGS -o $TMPE $TMPC > /dev/null 2> /dev/null ; then
   :
 elif $cc $ARCH_CFLAGS -o $TMPE $TMPC -lrt > /dev/null 2> /dev/null ; then
-  rt=yes
-fi
-
-if test "$rt" = "yes" ; then
   LIBS="$LIBS -lrt"
 fi

-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 59+ messages in thread

* Re: [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable
  2009-07-17 19:20 [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable quintela
                   ` (36 preceding siblings ...)
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 37/37] remove rt variable, we can assign directly LIBS quintela
@ 2009-07-17 19:35 ` Blue Swirl
  2009-07-17 19:41   ` [Qemu-devel] " Juan Quintela
  2009-07-22 12:57 ` [Qemu-devel] " Anthony Liguori
  2009-07-22 16:35 ` Paolo Bonzini
  39 siblings, 1 reply; 59+ messages in thread
From: Blue Swirl @ 2009-07-17 19:35 UTC (permalink / raw)
  To: quintela, qemu-devel

On Fri, Jul 17, 2009 at 10:20 PM, <quintela@redhat.com> wrote:
> From: Juan Quintela <quintela@redhat.com>
>
> Hi
>
> Instead of having *_LIBS variables, generate a proper LIBS variable in
> configure and use it in Makefiles.
>
> - Remove lots of other ifdef in Makefiles.
> - s/HOST_SOLARIS/CONFIG_SOLARIS/ for coherence

By the same logic, s/HOST_BSD/CONFIG_BSD/

> - s/HAVE_FDT/CONFIG_FDT/

There's also HAVE_PREADV and HAVE_IOVEC etc.

^ permalink raw reply	[flat|nested] 59+ messages in thread

* [Qemu-devel] Re: [PATCH 00/37] Generate a proper LIBS variable
  2009-07-17 19:35 ` [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable Blue Swirl
@ 2009-07-17 19:41   ` Juan Quintela
  0 siblings, 0 replies; 59+ messages in thread
From: Juan Quintela @ 2009-07-17 19:41 UTC (permalink / raw)
  To: Blue Swirl; +Cc: qemu-devel

Blue Swirl <blauwirbel@gmail.com> wrote:
> On Fri, Jul 17, 2009 at 10:20 PM, <quintela@redhat.com> wrote:
>> From: Juan Quintela <quintela@redhat.com>
>>
>> Hi
>>
>> Instead of having *_LIBS variables, generate a proper LIBS variable in
>> configure and use it in Makefiles.
>>
>> - Remove lots of other ifdef in Makefiles.
>> - s/HOST_SOLARIS/CONFIG_SOLARIS/ for coherence
>
> By the same logic, s/HOST_BSD/CONFIG_BSD/
>
>> - s/HAVE_FDT/CONFIG_FDT/
>
> There's also HAVE_PREADV and HAVE_IOVEC etc.

Yeap, but I haven't reached there yet (that is in the ToDo part).
Basically I did everything that I needed to move *_LIBS into only LIBS.

I need to do all this ones for being easier to generate later
config-host.h.  Once there is when the "nice" configuration starts :)

Later, Juan.

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Qemu-devel] [PATCH 12/37] generate CPPFLAGS and LIBS on ./configure
  2009-07-17 19:21 ` [Qemu-devel] [PATCH 12/37] generate CPPFLAGS and LIBS on ./configure quintela
@ 2009-07-17 20:43   ` Blue Swirl
  0 siblings, 0 replies; 59+ messages in thread
From: Blue Swirl @ 2009-07-17 20:43 UTC (permalink / raw)
  To: quintela; +Cc: qemu-devel

On Fri, Jul 17, 2009 at 10:21 PM, <quintela@redhat.com> wrote:
> From: Juan Quintela <quintela@redhat.com>

> +# LIBS = libraries that we want to use for linking
> +# CPPFFLAGS = flags for cpp, they are passed both to .c and .s files

CPP_F_FLAGS? Flags that are used for passing Fortran through CPP? :-)

Nice work, by the way. Can't wait to see the finished product.

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable
  2009-07-17 19:20 [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable quintela
                   ` (37 preceding siblings ...)
  2009-07-17 19:35 ` [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable Blue Swirl
@ 2009-07-22 12:57 ` Anthony Liguori
  2009-07-22 16:38   ` [Qemu-devel] " Paolo Bonzini
  2009-07-22 16:35 ` Paolo Bonzini
  39 siblings, 1 reply; 59+ messages in thread
From: Anthony Liguori @ 2009-07-22 12:57 UTC (permalink / raw)
  To: quintela; +Cc: qemu-devel

quintela@redhat.com wrote:
> From: Juan Quintela <quintela@redhat.com>
>
>   
A consequence of this patch series is that LIBS becomes unified for 
-softmmu and for -linux-user.  While this isn't necessarily a bad thing, 
linux-user uses a special ld script that has the following (at least for 
x86_64.ld):

SEARCH_DIR("/lib64"); SEARCH_DIR("/usr/lib64"); 
SEARCH_DIR("/usr/local/lib64");

I use Fedora which doesn't package vde, so as a consequence, I have 
libvdeplug.so installed in /usr/local/lib.  When not explicitly 
specifying search paths, things link quite happily which leads me to 
believe that this is a valid thing for me to do.

I think you need to make one of the following changes:

1) Build separate LIBS variables for -softmmu and -linux-user to restore 
the behavior from default
2) Figure out how to set the search dirs in the ld script to what ld 
normally defaults to
3) Figure out a way to use an ld script while still using the default 
search path

In the interim, if you rebase your other series I can push those while 
you work out the LIBS issues.

Regards,

Anthony Liguori

^ permalink raw reply	[flat|nested] 59+ messages in thread

* [Qemu-devel] Re: [PATCH 00/37] Generate a proper LIBS variable
  2009-07-17 19:20 [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable quintela
                   ` (38 preceding siblings ...)
  2009-07-22 12:57 ` [Qemu-devel] " Anthony Liguori
@ 2009-07-22 16:35 ` Paolo Bonzini
  2009-07-22 16:51   ` Juan Quintela
  39 siblings, 1 reply; 59+ messages in thread
From: Paolo Bonzini @ 2009-07-22 16:35 UTC (permalink / raw)
  To: quintela; +Cc: qemu-devel


> ToDo:
> - Make the same treatment for CFLAGS, CPPFLAGS and LDFLAGS.

Cool!  For CFLAGS and CPPFLAGS, however, I'd suggest moving all flags 
that are necessary to build (such as -I as opposed to just -O, -g and 
the like) to QEMU_CFLAGS and QEMU_CPPFLAGS.  This way rebuilding without 
optimization can be done very easily.

Paolo

^ permalink raw reply	[flat|nested] 59+ messages in thread

* [Qemu-devel] Re: [PATCH 00/37] Generate a proper LIBS variable
  2009-07-22 12:57 ` [Qemu-devel] " Anthony Liguori
@ 2009-07-22 16:38   ` Paolo Bonzini
  2009-07-22 16:59     ` Juan Quintela
  0 siblings, 1 reply; 59+ messages in thread
From: Paolo Bonzini @ 2009-07-22 16:38 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: qemu-devel, quintela


> 2) Figure out how to set the search dirs in the ld script to what ld
> normally defaults to

ld --verbose -v | grep SEARCH_DIR

Paolo

^ permalink raw reply	[flat|nested] 59+ messages in thread

* [Qemu-devel] Re: [PATCH 00/37] Generate a proper LIBS variable
  2009-07-22 16:35 ` Paolo Bonzini
@ 2009-07-22 16:51   ` Juan Quintela
  2009-07-22 18:08     ` Paolo Bonzini
  0 siblings, 1 reply; 59+ messages in thread
From: Juan Quintela @ 2009-07-22 16:51 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel

Paolo Bonzini <bonzini@gnu.org> wrote:
>> ToDo:
>> - Make the same treatment for CFLAGS, CPPFLAGS and LDFLAGS.
>
> Cool!  For CFLAGS and CPPFLAGS, however, I'd suggest moving all flags
> that are necessary to build (such as -I as opposed to just -O, -g and
> the like) to QEMU_CFLAGS and QEMU_CPPFLAGS.  This way rebuilding
> without optimization can be done very easily.

My idea hera is to do diferently.  Actually he have a very confusing use
of CFLAGS.  My idea is:

--extra-cflags: remove it, we can use:

CFLAGS="foo bar" ./configure
(it is not there yet, but we can do it)

And we can use in each place that we modify CFLAGS:

CFLAGS="more stuff $CFLAGS"

Notice that the stuff that we invoked ./configure with comes last, as
we wanted for EXTRA_CFLAGS.

As an added bonus, we can compile all the tests in ./configure with that
variable set.

As for compiling a file with different options, we want something like
that for Makefile, i.e.

make all
rm foo.o
make CFLAGS=-O0 foo.o

compile with -O0 as last option, that way we can "overwrite" the -O2
that came from the config-hosts.mak

Doing the configure bits are easy (just work), as for the Makefile
stuff, instead of having

CFLAGS+=foo

printed on config-hosts.mak

just print:

CFLAGS=foo $(CFLAGS)

should make the trick.

We got more functionality that we have today, and we can:
- remove extra-cflags
- we don't need to OPT= variable that Blue Swirl wanted

What do you think?

Later, Juan.

^ permalink raw reply	[flat|nested] 59+ messages in thread

* [Qemu-devel] Re: [PATCH 00/37] Generate a proper LIBS variable
  2009-07-22 16:38   ` [Qemu-devel] " Paolo Bonzini
@ 2009-07-22 16:59     ` Juan Quintela
  2009-07-22 18:09       ` Anthony Liguori
  0 siblings, 1 reply; 59+ messages in thread
From: Juan Quintela @ 2009-07-22 16:59 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel

Paolo Bonzini <bonzini@gnu.org> wrote:
>> 2) Figure out how to set the search dirs in the ld script to what ld
>> normally defaults to
>
> ld --verbose -v | grep SEARCH_DIR


(master)$ ld --verbose -v | grep SEARCH_DIR

SEARCH_DIR("/usr/x86_64-redhat-linux/lib64");
SEARCH_DIR("/usr/local/lib64"); SEARCH_DIR("/lib64");
SEARCH_DIR("/usr/lib64"); SEARCH_DIR("/usr/x86_64-redhat-linux/lib");
SEARCH_DIR("/usr/lib64"); SEARCH_DIR("/usr/local/lib");
SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib"); (master)$

This one is very Fedora specific.

Anthony, what do you think of merging a search path like this:

/usr/local/lib64;/lib64;/usr/lib64;/usr/local/lib;/lib;/usr/lib

This seems more similar to the one that my linker has.

Patch sent as new thread.

Later,

^ permalink raw reply	[flat|nested] 59+ messages in thread

* [Qemu-devel] Re: [PATCH 00/37] Generate a proper LIBS variable
  2009-07-22 16:51   ` Juan Quintela
@ 2009-07-22 18:08     ` Paolo Bonzini
  0 siblings, 0 replies; 59+ messages in thread
From: Paolo Bonzini @ 2009-07-22 18:08 UTC (permalink / raw)
  To: Juan Quintela; +Cc: qemu-devel

> --extra-cflags: remove it, we can use:
>
> CFLAGS="foo bar" ./configure
> (it is not there yet, but we can do it)

Agreed.

> And we can use in each place that we modify CFLAGS:
>
> CFLAGS="more stuff $CFLAGS"
>
> Notice that the stuff that we invoked ./configure with comes last, as
> we wanted for EXTRA_CFLAGS.
>
> As an added bonus, we can compile all the tests in ./configure with that
> variable set.

Which is good (e.g. if you have incompatible include files that cannot 
be included together).

> As for compiling a file with different options, we want something like
> that for Makefile, i.e.
>
> make all
> rm foo.o
> make CFLAGS=-O0 foo.o
>
> compile with -O0 as last option, that way we can "overwrite" the -O2
> that came from the config-hosts.mak

Yes, that would work even though it's not the way Autoconf/Automake 
packages usually support CFLAGS (the idea there is that the user can put 
all crazy -f/-m options on configure's CFLAGS and disable them with 
"make CFLAGS=-g"; each way has opposite advantages and disadvantages).

Paolo

^ permalink raw reply	[flat|nested] 59+ messages in thread

* [Qemu-devel] Re: [PATCH 00/37] Generate a proper LIBS variable
  2009-07-22 16:59     ` Juan Quintela
@ 2009-07-22 18:09       ` Anthony Liguori
  2009-07-22 18:19         ` Juan Quintela
  0 siblings, 1 reply; 59+ messages in thread
From: Anthony Liguori @ 2009-07-22 18:09 UTC (permalink / raw)
  To: Juan Quintela; +Cc: Paolo Bonzini, qemu-devel

Juan Quintela wrote:
> Anthony, what do you think of merging a search path like this:
>
> /usr/local/lib64;/lib64;/usr/lib64;/usr/local/lib;/lib;/usr/lib
>
> This seems more similar to the one that my linker has.
>
> Patch sent as new thread.
>   

I'd rather see the us generate a config-host.ld that contained the 
output of ld --verbose -v | grep SEARCH_DIR and then do:

diff --git a/x86_64.ld b/x86_64.ld
index 878dafb..7920bdd 100644
--- a/x86_64.ld
+++ b/x86_64.ld
@@ -2,7 +2,7 @@
 OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64")
 OUTPUT_ARCH(i386:x86-64)
 ENTRY(_start)
-SEARCH_DIR("/lib64"); SEARCH_DIR("/usr/lib64"); 
SEARCH_DIR("/usr/local/lib64");
+INCLUDE "config-host.ld"
 SECTIONS
 {
   /* Read-only sections, merged into text segment: */

Regards,

Anthony Liguori

> Later,
>
>
>   

^ permalink raw reply related	[flat|nested] 59+ messages in thread

* [Qemu-devel] Re: [PATCH 00/37] Generate a proper LIBS variable
  2009-07-22 18:09       ` Anthony Liguori
@ 2009-07-22 18:19         ` Juan Quintela
  2009-07-22 18:24           ` Anthony Liguori
  0 siblings, 1 reply; 59+ messages in thread
From: Juan Quintela @ 2009-07-22 18:19 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: Paolo Bonzini, qemu-devel

Anthony Liguori <anthony@codemonkey.ws> wrote:
> Juan Quintela wrote:
>> Anthony, what do you think of merging a search path like this:
>>
>> /usr/local/lib64;/lib64;/usr/lib64;/usr/local/lib;/lib;/usr/lib
>>
>> This seems more similar to the one that my linker has.
>>
>> Patch sent as new thread.
>>   
>
> I'd rather see the us generate a config-host.ld that contained the
> output of ld --verbose -v | grep SEARCH_DIR and then do:

Only for x86_64 or all architectures?  Once here.

> diff --git a/x86_64.ld b/x86_64.ld
> index 878dafb..7920bdd 100644
> --- a/x86_64.ld
> +++ b/x86_64.ld
> @@ -2,7 +2,7 @@
> OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64")
> OUTPUT_ARCH(i386:x86-64)
> ENTRY(_start)
> -SEARCH_DIR("/lib64"); SEARCH_DIR("/usr/lib64");
> SEARCH_DIR("/usr/local/lib64");
> +INCLUDE "config-host.ld"
> SECTIONS
> {
>   /* Read-only sections, merged into text segment: */
>
> Regards,
>
> Anthony Liguori
>
>> Later,

^ permalink raw reply	[flat|nested] 59+ messages in thread

* [Qemu-devel] Re: [PATCH 00/37] Generate a proper LIBS variable
  2009-07-22 18:19         ` Juan Quintela
@ 2009-07-22 18:24           ` Anthony Liguori
  2009-07-22 22:33             ` Paul Brook
  0 siblings, 1 reply; 59+ messages in thread
From: Anthony Liguori @ 2009-07-22 18:24 UTC (permalink / raw)
  To: Juan Quintela; +Cc: Paolo Bonzini, qemu-devel

Juan Quintela wrote:
> Anthony Liguori <anthony@codemonkey.ws> wrote:
>   
>> Juan Quintela wrote:
>>     
>>> Anthony, what do you think of merging a search path like this:
>>>
>>> /usr/local/lib64;/lib64;/usr/lib64;/usr/local/lib;/lib;/usr/lib
>>>
>>> This seems more similar to the one that my linker has.
>>>
>>> Patch sent as new thread.
>>>   
>>>       
>> I'd rather see the us generate a config-host.ld that contained the
>> output of ld --verbose -v | grep SEARCH_DIR and then do:
>>     
>
> Only for x86_64 or all architectures?  Once here.
>   

For all I would think.  My only concern is that we'll break non-GNU ld's 
but we'll cross that bridge when we come to it.

Regards,

Anthony Liguori

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Qemu-devel] Re: [PATCH 00/37] Generate a proper LIBS variable
  2009-07-22 18:24           ` Anthony Liguori
@ 2009-07-22 22:33             ` Paul Brook
  2009-07-22 22:57               ` Anthony Liguori
  2009-07-23  3:19               ` Juan Quintela
  0 siblings, 2 replies; 59+ messages in thread
From: Paul Brook @ 2009-07-22 22:33 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, Juan Quintela

> >> I'd rather see the us generate a config-host.ld that contained the
> >> output of ld --verbose -v | grep SEARCH_DIR and then do:
> >
> > Only for x86_64 or all architectures?  Once here.
>
> For all I would think.  My only concern is that we'll break non-GNU ld's
> but we'll cross that bridge when we come to it.

We should only be using linker scripts for the userspace emulation.

Paul

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Qemu-devel] Re: [PATCH 00/37] Generate a proper LIBS variable
  2009-07-22 22:33             ` Paul Brook
@ 2009-07-22 22:57               ` Anthony Liguori
  2009-07-23  3:19               ` Juan Quintela
  1 sibling, 0 replies; 59+ messages in thread
From: Anthony Liguori @ 2009-07-22 22:57 UTC (permalink / raw)
  To: Paul Brook; +Cc: Paolo Bonzini, qemu-devel, Juan Quintela

Paul Brook wrote:
>>>> I'd rather see the us generate a config-host.ld that contained the
>>>> output of ld --verbose -v | grep SEARCH_DIR and then do:
>>>>         
>>> Only for x86_64 or all architectures?  Once here.
>>>       
>> For all I would think.  My only concern is that we'll break non-GNU ld's
>> but we'll cross that bridge when we come to it.
>>     
>
> We should only be using linker scripts for the userspace emulation.
>   

Well that raises the question of whether we should have separate LIB 
variables for linux-user and softmmu.

If we ever have to deal with linux-user linking against user-supplied 
libraries, then we have to solve the linker script problem.

Regards,

Anthony Liguori

> Paul
>
>   

^ permalink raw reply	[flat|nested] 59+ messages in thread

* [Qemu-devel] Re: [PATCH 00/37] Generate a proper LIBS variable
  2009-07-22 22:33             ` Paul Brook
  2009-07-22 22:57               ` Anthony Liguori
@ 2009-07-23  3:19               ` Juan Quintela
  2009-07-23  3:28                 ` malc
  1 sibling, 1 reply; 59+ messages in thread
From: Juan Quintela @ 2009-07-23  3:19 UTC (permalink / raw)
  To: Paul Brook; +Cc: Paolo Bonzini, qemu-devel

Paul Brook <paul@codesourcery.com> wrote:
>> >> I'd rather see the us generate a config-host.ld that contained the
>> >> output of ld --verbose -v | grep SEARCH_DIR and then do:
>> >
>> > Only for x86_64 or all architectures?  Once here.
>>
>> For all I would think.  My only concern is that we'll break non-GNU ld's
>> but we'll cross that bridge when we come to it.
>
> We should only be using linker scripts for the userspace emulation.

State of afairs:
a- we use linker scripts for linux-user and bsd-user
b- we don't use linker script on darwin-user
c- ia64 uses linker script for target-softmmu (only arch at all)

The reason for changing the SEARCH_PATH is because:
a- We changed to use a LIBS variable for everything
b- In x86_64, it is common to have locally compiled libraries in
   /usr/local/lib not /usr/local/lib64 (case of libvdeplug.so
   for Anthony.

What to do?
a- revert back to use diferent LIBS variable for each binary
b- change the linker scripts search path, and don't allow ever
   user compiled libraries when using a linker-script.

Thanks for the input about the liker scripts use.

Later, Juan.

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Qemu-devel] Re: [PATCH 00/37] Generate a proper LIBS variable
  2009-07-23  3:19               ` Juan Quintela
@ 2009-07-23  3:28                 ` malc
  2009-07-23  6:10                   ` Juan Quintela
  0 siblings, 1 reply; 59+ messages in thread
From: malc @ 2009-07-23  3:28 UTC (permalink / raw)
  To: Juan Quintela; +Cc: Paolo Bonzini, Paul Brook, qemu-devel

On Thu, 23 Jul 2009, Juan Quintela wrote:

> Paul Brook <paul@codesourcery.com> wrote:
> >> >> I'd rather see the us generate a config-host.ld that contained the
> >> >> output of ld --verbose -v | grep SEARCH_DIR and then do:
> >> >
> >> > Only for x86_64 or all architectures?  Once here.
> >>
> >> For all I would think.  My only concern is that we'll break non-GNU ld's
> >> but we'll cross that bridge when we come to it.
> >
> > We should only be using linker scripts for the userspace emulation.
> 
> State of afairs:
> a- we use linker scripts for linux-user and bsd-user
> b- we don't use linker script on darwin-user
> c- ia64 uses linker script for target-softmmu (only arch at all)
> 
> The reason for changing the SEARCH_PATH is because:
> a- We changed to use a LIBS variable for everything
> b- In x86_64, it is common to have locally compiled libraries in
>    /usr/local/lib not /usr/local/lib64 (case of libvdeplug.so
>    for Anthony.
> 
> What to do?
> a- revert back to use diferent LIBS variable for each binary

a

> b- change the linker scripts search path, and don't allow ever
>    user compiled libraries when using a linker-script.
> 
> Thanks for the input about the liker scripts use.
> 
> Later, Juan.
> 
> 

-- 
mailto:av1474@comtv.ru

^ permalink raw reply	[flat|nested] 59+ messages in thread

* [Qemu-devel] Re: [PATCH 00/37] Generate a proper LIBS variable
  2009-07-23  3:28                 ` malc
@ 2009-07-23  6:10                   ` Juan Quintela
  2009-07-23  9:36                     ` Paul Brook
  0 siblings, 1 reply; 59+ messages in thread
From: Juan Quintela @ 2009-07-23  6:10 UTC (permalink / raw)
  To: malc; +Cc: Paolo Bonzini, Paul Brook, qemu-devel

malc <av1474@comtv.ru> wrote:
> On Thu, 23 Jul 2009, Juan Quintela wrote:
>
>> Paul Brook <paul@codesourcery.com> wrote:
>> >> >> I'd rather see the us generate a config-host.ld that contained the
>> >> >> output of ld --verbose -v | grep SEARCH_DIR and then do:
>> >> >
>> >> > Only for x86_64 or all architectures?  Once here.
>> >>
>> >> For all I would think.  My only concern is that we'll break non-GNU ld's
>> >> but we'll cross that bridge when we come to it.
>> >
>> > We should only be using linker scripts for the userspace emulation.
>> 
>> State of afairs:
>> a- we use linker scripts for linux-user and bsd-user
>> b- we don't use linker script on darwin-user
>> c- ia64 uses linker script for target-softmmu (only arch at all)
>> 
>> The reason for changing the SEARCH_PATH is because:
>> a- We changed to use a LIBS variable for everything
>> b- In x86_64, it is common to have locally compiled libraries in
>>    /usr/local/lib not /usr/local/lib64 (case of libvdeplug.so
>>    for Anthony.
>> 
>> What to do?
>> a- revert back to use diferent LIBS variable for each binary
>
> a

Ok, we have to questions here:
a- should we support other SEARCH_PATHS in linker scripts
b- should we use a diffrente LIBS variable for target-softmmu and *-user

I think that we definitely want "a".  I tend to think that using the
same libraries for all binaries is a good idea, but I think we shouldn't
confuse the isues.

Please comment in my series to use the default SEARCH_PATH of the linker
on the linker script.

Otherwise, is there any reason to have that different SEARCH_PATH?

Later, Juan.


>> b- change the linker scripts search path, and don't allow ever
>>    user compiled libraries when using a linker-script.
>> 
>> Thanks for the input about the liker scripts use.
>> 
>> Later, Juan.
>> 
>> 

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Qemu-devel] Re: [PATCH 00/37] Generate a proper LIBS variable
  2009-07-23  6:10                   ` Juan Quintela
@ 2009-07-23  9:36                     ` Paul Brook
  2009-07-23 15:45                       ` Juan Quintela
  0 siblings, 1 reply; 59+ messages in thread
From: Paul Brook @ 2009-07-23  9:36 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, Juan Quintela

> I tend to think that using the same libraries for all binaries is a good
> idea, but I think we shouldn't confuse the isues.

Usermode and full system emulation are completely different applications. It 
makes no sense to use the same set of libraries.

Paul

^ permalink raw reply	[flat|nested] 59+ messages in thread

* [Qemu-devel] Re: [PATCH 00/37] Generate a proper LIBS variable
  2009-07-23  9:36                     ` Paul Brook
@ 2009-07-23 15:45                       ` Juan Quintela
  2009-07-23 16:54                         ` Markus Armbruster
  0 siblings, 1 reply; 59+ messages in thread
From: Juan Quintela @ 2009-07-23 15:45 UTC (permalink / raw)
  To: Paul Brook; +Cc: Paolo Bonzini, qemu-devel

Paul Brook <paul@codesourcery.com> wrote:
>> I tend to think that using the same libraries for all binaries is a good
>> idea, but I think we shouldn't confuse the isues.
>
> Usermode and full system emulation are completely different applications. It 
> makes no sense to use the same set of libraries.

Ok, switching to:

libs : for everything
libs_softmmu
libs_linux
libs_bsd
libs_darwin

ldflags <- similar, not a big problem

CFLAGS/CPPFLAGS, this is a whole different can of worms

As of know, we have:
- OS_FLAGS
- ARCH_FLAGS
- CFLAGS
- CPPFLAGS
- CFLAGS for specific files (KVM_CFLAGS and similars)
- CFLAGS for some libs that got compiled all files with
- HELPER_CFLAGS
- SP_FLAGS (already killed on my patches, it is know part of ARCH_FLAGS)
- EXTRA_CFLAGS

Starting in configure, which flags are used for each test: random mix of
CFLAGS + EXTRA_CFLAGS + OS_FLAGS + ARCH_FLAGS

Clearly, not an ideal solution.

What we want to be able to do:
a- let the user add CFLAGS to all the tests and build
b- let the user overwrote CFLAGS generated by ./configure + Makefile
c- the several files be compiled with diffrent CFLAGS
d- let the user change the CFLAGS for a specific file from command line
   make; rm foo.o; make CFLAGS=""

Solution so far:

CPPFLAGS is for stuff that you "really" need, i.e. include paths and
         Defines
CFLAGS is for the rest of options, that can be "removed"

My proposal:

To fix the issues:

a: CFLAGS="-Dfoo -Ivar" ./configure
   Do what you expect, basically be carefull in configure to allways do
   CFLAGS="<something> $CFLAGS" for things that used to go in OS_FLAGS +
   CFLAGS + ARCH_CFLAGS
   Be careful about what we put into CFLAGS/CPPFLAGS

b: is solved with previous approach,if you do
   CFLAGS="<somethnig $CFLAGS", EXTRA_CFLAGS is not needed, you can
   remove it.
c: use one of the current approach,
     foo.o: CFLAGS := $(CFLAGS) $(FOO_CFLAGS) (only one case of this one)
     foo.o: CFLAGS += $(FOO_FLAGS)


d: if we do the FOO_FLAGS in CPPFLAGS, now
   make CFLAGS="-O0"
   or other changes work as expected.

WHat do you think?

Later, Juan.

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Qemu-devel] Re: [PATCH 00/37] Generate a proper LIBS variable
  2009-07-23 15:45                       ` Juan Quintela
@ 2009-07-23 16:54                         ` Markus Armbruster
  2009-07-23 17:04                           ` Anthony Liguori
  0 siblings, 1 reply; 59+ messages in thread
From: Markus Armbruster @ 2009-07-23 16:54 UTC (permalink / raw)
  To: Juan Quintela; +Cc: Paolo Bonzini, Paul Brook, qemu-devel

Juan Quintela <quintela@redhat.com> writes:

> Paul Brook <paul@codesourcery.com> wrote:
>>> I tend to think that using the same libraries for all binaries is a good
>>> idea, but I think we shouldn't confuse the isues.
>>
>> Usermode and full system emulation are completely different applications. It 
>> makes no sense to use the same set of libraries.
>
> Ok, switching to:
>
> libs : for everything
> libs_softmmu
> libs_linux
> libs_bsd
> libs_darwin
>
> ldflags <- similar, not a big problem
>
> CFLAGS/CPPFLAGS, this is a whole different can of worms
>
> As of know, we have:
> - OS_FLAGS
> - ARCH_FLAGS
> - CFLAGS
> - CPPFLAGS
> - CFLAGS for specific files (KVM_CFLAGS and similars)
> - CFLAGS for some libs that got compiled all files with
> - HELPER_CFLAGS
> - SP_FLAGS (already killed on my patches, it is know part of ARCH_FLAGS)
> - EXTRA_CFLAGS
>
> Starting in configure, which flags are used for each test: random mix of
> CFLAGS + EXTRA_CFLAGS + OS_FLAGS + ARCH_FLAGS
>
> Clearly, not an ideal solution.
>
> What we want to be able to do:
> a- let the user add CFLAGS to all the tests and build
> b- let the user overwrote CFLAGS generated by ./configure + Makefile
> c- the several files be compiled with diffrent CFLAGS
> d- let the user change the CFLAGS for a specific file from command line
>    make; rm foo.o; make CFLAGS=""
>
> Solution so far:
>
> CPPFLAGS is for stuff that you "really" need, i.e. include paths and
>          Defines
> CFLAGS is for the rest of options, that can be "removed"

Actually, CPPFLAGS is for preprocessor stuff, and CFLAGS for the rest.

> My proposal:
>
> To fix the issues:
>
> a: CFLAGS="-Dfoo -Ivar" ./configure
>    Do what you expect, basically be carefull in configure to allways do
>    CFLAGS="<something> $CFLAGS" for things that used to go in OS_FLAGS +
>    CFLAGS + ARCH_CFLAGS
>    Be careful about what we put into CFLAGS/CPPFLAGS
>
> b: is solved with previous approach,if you do
>    CFLAGS="<somethnig $CFLAGS", EXTRA_CFLAGS is not needed, you can
>    remove it.
> c: use one of the current approach,
>      foo.o: CFLAGS := $(CFLAGS) $(FOO_CFLAGS) (only one case of this one)
>      foo.o: CFLAGS += $(FOO_FLAGS)
>
>
> d: if we do the FOO_FLAGS in CPPFLAGS, now
>    make CFLAGS="-O0"
>    or other changes work as expected.
>
> WHat do you think?
>
> Later, Juan.

If that means putting non-preprocessing stuff into CPPFLAGS, then it's
unusual use of common make variables, and a such a trap for the unwary.
Do we care?

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Qemu-devel] Re: [PATCH 00/37] Generate a proper LIBS variable
  2009-07-23 16:54                         ` Markus Armbruster
@ 2009-07-23 17:04                           ` Anthony Liguori
  0 siblings, 0 replies; 59+ messages in thread
From: Anthony Liguori @ 2009-07-23 17:04 UTC (permalink / raw)
  To: Markus Armbruster; +Cc: qemu-devel, Paolo Bonzini, Paul Brook, Juan Quintela

Markus Armbruster wrote:
> Juan Quintela <quintela@redhat.com> writes:
>
>   
>> Paul Brook <paul@codesourcery.com> wrote:
>>     
>>>> I tend to think that using the same libraries for all binaries is a good
>>>> idea, but I think we shouldn't confuse the isues.
>>>>         
>>> Usermode and full system emulation are completely different applications. It 
>>> makes no sense to use the same set of libraries.
>>>       
>> Ok, switching to:
>>
>> libs : for everything
>> libs_softmmu
>> libs_linux
>> libs_bsd
>> libs_darwin
>>
>> ldflags <- similar, not a big problem
>>
>> CFLAGS/CPPFLAGS, this is a whole different can of worms
>>
>> As of know, we have:
>> - OS_FLAGS
>> - ARCH_FLAGS
>> - CFLAGS
>> - CPPFLAGS
>> - CFLAGS for specific files (KVM_CFLAGS and similars)
>> - CFLAGS for some libs that got compiled all files with
>> - HELPER_CFLAGS
>> - SP_FLAGS (already killed on my patches, it is know part of ARCH_FLAGS)
>> - EXTRA_CFLAGS
>>
>> Starting in configure, which flags are used for each test: random mix of
>> CFLAGS + EXTRA_CFLAGS + OS_FLAGS + ARCH_FLAGS
>>
>> Clearly, not an ideal solution.
>>
>> What we want to be able to do:
>> a- let the user add CFLAGS to all the tests and build
>> b- let the user overwrote CFLAGS generated by ./configure + Makefile
>> c- the several files be compiled with diffrent CFLAGS
>> d- let the user change the CFLAGS for a specific file from command line
>>    make; rm foo.o; make CFLAGS=""
>>
>> Solution so far:
>>
>> CPPFLAGS is for stuff that you "really" need, i.e. include paths and
>>          Defines
>> CFLAGS is for the rest of options, that can be "removed"
>>     
>
> Actually, CPPFLAGS is for preprocessor stuff, and CFLAGS for the rest.
>   

It's never followed verbatim though and we'll likely invoke CPP is 
usually just gcc -E.  We can't enforce a hard split between CPPFLAGS and 
CFLAGS when we use things like pkg-config, --cflags only gives us one 
set of flags.

Likewise, it's hard to separate LDFLAGS from LDLIBS too for the same reason.

Regards,

Anthony Liguori

^ permalink raw reply	[flat|nested] 59+ messages in thread

end of thread, other threads:[~2009-07-23 17:04 UTC | newest]

Thread overview: 59+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-17 19:20 [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable quintela
2009-07-17 19:20 ` [Qemu-devel] [PATCH 01/37] change HOST_SOLARIS to CONFIG_SOLARIS{_VERSION} quintela
2009-07-17 19:20 ` [Qemu-devel] [PATCH 02/37] Remove SP_CFLAGS and SP_LDFLAGS quintela
2009-07-17 19:20 ` [Qemu-devel] [PATCH 03/37] target_arch2 is redefined unconditionally later quintela
2009-07-17 19:20 ` [Qemu-devel] [PATCH 04/37] remove CONFIG_ from VNC_TLS_{LIBS, FLAGS} quintela
2009-07-17 19:20 ` [Qemu-devel] [PATCH 05/37] use same algorithm for testing and quintela
2009-07-17 19:20 ` [Qemu-devel] [PATCH 06/37] remove CONFIG_ from VNC_SASL_{LIBS, FLAGS} quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 07/37] remove CONFIG_ from BLUEZ_{LIBS,FLAGS} quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 08/37] make fmod also use FMOD_{LIBS,CFLAGS} quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 09/37] make oss use OSS_LIBS quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 10/37] move printing of config-host.mak variables to end of generation quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 11/37] more specific config.mak can overwrote more general config.mak quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 12/37] generate CPPFLAGS and LIBS on ./configure quintela
2009-07-17 20:43   ` Blue Swirl
2009-07-17 19:21 ` [Qemu-devel] [PATCH 13/37] fold PTHREADLIBS and CLOCKLIBS on generic LIBS quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 14/37] CONFIG_SOLARIS always want -lsockt -lnsl -lresolv quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 15/37] Add -static in configure if needed quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 16/37] generate CONFIG_WIN32 libraries in configure quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 17/37] fold VDE_LIBS on generic LIBS quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 18/37] fold CURL_LIBS " quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 19/37] fold BRLAPI_LIBS " quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 20/37] fold CURSES_LIBS " quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 21/37] fold XEN_LIBS " quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 22/37] fold BLUEZ_LIBS " quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 23/37] fold VNC_TLS_LIBS " quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 24/37] fold VNC_SASL_LIBS " quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 25/37] Rename HAVE_FDT to CONFIG_FDT and define it also in Makefile quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 26/37] Refactor code to remove one #ifdef CONFIG_FDT quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 27/37] fold FDT_LIBS on generic LIBS quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 28/37] fold NEEDS_LIBSUNMATH on generic variables quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 29/37] fold FMOD_LIBS on generic LIBS quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 30/37] fold OSS_LIBS " quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 31/37] fold ALSA libs " quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 32/37] fold DSOUND " quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 33/37] fold Pulse Audio " quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 34/37] fold ESD " quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 35/37] fold COCOA_LIBS " quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 36/37] fold SDL_LIBS " quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 37/37] remove rt variable, we can assign directly LIBS quintela
2009-07-17 19:35 ` [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable Blue Swirl
2009-07-17 19:41   ` [Qemu-devel] " Juan Quintela
2009-07-22 12:57 ` [Qemu-devel] " Anthony Liguori
2009-07-22 16:38   ` [Qemu-devel] " Paolo Bonzini
2009-07-22 16:59     ` Juan Quintela
2009-07-22 18:09       ` Anthony Liguori
2009-07-22 18:19         ` Juan Quintela
2009-07-22 18:24           ` Anthony Liguori
2009-07-22 22:33             ` Paul Brook
2009-07-22 22:57               ` Anthony Liguori
2009-07-23  3:19               ` Juan Quintela
2009-07-23  3:28                 ` malc
2009-07-23  6:10                   ` Juan Quintela
2009-07-23  9:36                     ` Paul Brook
2009-07-23 15:45                       ` Juan Quintela
2009-07-23 16:54                         ` Markus Armbruster
2009-07-23 17:04                           ` Anthony Liguori
2009-07-22 16:35 ` Paolo Bonzini
2009-07-22 16:51   ` Juan Quintela
2009-07-22 18:08     ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).