Generate a proper LIBS variable
cover Generate a proper LIBS variable
From: Juan Quintela <[email protected]>
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(-)
PATCH 1/37 change HOST_SOLARIS to CONFIG_SOLARIS{_VERSION}
From: Juan Quintela <[email protected]>
--- configure | 3 ++- cpu-exec.c | 10 +++++----- dyngen-exec.h | 2 +- fpu/softfloat-native.c | 13 ++++++++----- fpu/softfloat-native.h | 9 +++++---- fpu/softfloat.h | 2 +- kqemu.c | 2 +- osdep.c | 6 +++--- target-mips/cpu.h | 2 +- tcg/sparc/tcg-target.h | 2 +- 10 files changed, 28 insertions(+), 23 deletions(-)
configure +2 -1
@@ -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
cpu-exec.c +5 -5
@@ -38,7 +38,7 @@#endif #endif -#if defined(__sparc__) && !defined(HOST_SOLARIS ) +#if defined(__sparc__) && !defined(CONFIG_SOLARIS )// Work around ugly bugs in glibc that mangle global register contents #undef env#define env cpu_single_env
@@ -258,7 +258,7 @@ int cpu_exec(CPUState *env1)/* prepare setjmp context for exception handling */ for (;;) {if (setjmp (env->jmp_env) ==0 ) { -#if defined(__sparc__) && !defined(HOST_SOLARIS ) +#if defined(__sparc__) && !defined(CONFIG_SOLARIS )#undef env env = cpu_single_env;#define env cpu_single_env
@@ -414,7 +414,7 @@ int cpu_exec(CPUState *env1) env->interrupt_request &= ~(CPU_INTERRUPT_HARD |CPU_INTERRUPT_VIRQ ); intno =cpu_get_pic_interrupt (env);qemu_log_mask (CPU_LOG_TB_IN_ASM ,"Servicing hardware INT=0x%02x\n" , intno); -#if defined(__sparc__) && !defined(HOST_SOLARIS ) +#if defined(__sparc__) && !defined(CONFIG_SOLARIS )#undef env env = cpu_single_env;#define env cpu_single_env
@@ -644,7 +644,7 @@ int cpu_exec(CPUState *env1)while (env->current_tb) { tc_ptr = tb->tc_ptr;/* execute the generated code */ -#if defined(__sparc__) && !defined(HOST_SOLARIS ) +#if defined(__sparc__) && !defined(CONFIG_SOLARIS )#undef env env = cpu_single_env;#define env cpu_single_env
@@ -1435,7 +1435,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,siginfo_t *info = pinfo;int is_write;uint32_t insn; -#if !defined(__arch64__) || defined(HOST_SOLARIS ) +#if !defined(__arch64__) || defined(CONFIG_SOLARIS )uint32_t *regs = (uint32_t *)(info +1 );void *sigmask = (regs +20 );/* XXX: is there a standard glibc define ? */
dyngen-exec.h +1 -1
@@ -75,7 +75,7 @@ extern int printf(const char *, ...);#define AREG1 "s0"#define AREG2 "s1"#elif defined(__sparc__) -#ifdef HOST_SOLARIS +#ifdef CONFIG_SOLARIS #define AREG0 "g2"#define AREG1 "g3"#define AREG2 "g4"
fpu/softfloat-native.c +8 -5
@@ -2,7 +2,7 @@context is supported */ #include "softfloat.h" #include <math.h> -#if defined(HOST_SOLARIS ) +#if defined(CONFIG_SOLARIS )#include <fenv.h> #endif
@@ -10,7 +10,7 @@ void set_float_rounding_mode(int val STATUS_PARAM) {STATUS (float_rounding_mode) = val;#if defined(HOST_BSD ) && !defined(__APPLE__) || \ - (defined(HOST_SOLARIS ) &&HOST_SOLARIS <10 ) + (defined(CONFIG_SOLARIS ) &&CONFIG_SOLARIS_VERSION <10 )fpsetround (val);#elif defined(__arm__)/* nothing to do */
@@ -26,7 +26,8 @@ void set_floatx80_rounding_precision(int val STATUS_PARAM) }#endif -#if defined(HOST_BSD ) || (defined(HOST_SOLARIS ) &&HOST_SOLARIS <10 ) +#if defined(HOST_BSD ) || \ + (defined(CONFIG_SOLARIS ) &&CONFIG_SOLARIS_VERSION <10 )#define lrint (d) ((int32_t)rint(d))#define llrint (d) ((int64_t)rint(d))#define lrintf (f) ((int32_t)rint(f))
@@ -34,7 +35,8 @@ void set_floatx80_rounding_precision(int val STATUS_PARAM)#define sqrtf (f) ((float)sqrt(f))#define remainderf (fa, fb) ((float)remainder(fa, fb))#define rintf (f) ((float)rint(f)) -#if !defined(__sparc__) && defined(HOST_SOLARIS ) &&HOST_SOLARIS <10 +#if !defined(__sparc__) && \ + (defined(CONFIG_SOLARIS ) &&CONFIG_SOLARIS_VERSION <10 )extern long double rintl (long double );extern long double scalbnl (long double ,int );
@@ -349,7 +351,8 @@ uint64_t float64_to_uint64_round_to_zero (float64 a STATUS_PARAM)/*---------------------------------------------------------------------------- | Software IEC/IEEE double-precision operations. *----------------------------------------------------------------------------*/ -#if defined(__sun__) && defined(HOST_SOLARIS ) &&HOST_SOLARIS <10 +#if defined(__sun__) && \ + (defined(CONFIG_SOLARIS ) &&CONFIG_SOLARIS_VERSION <10 )static inline float64 trunc (float64 x) {return x <0 ? -floor (-x) :floor (x);
fpu/softfloat-native.h +5 -4
@@ -1,7 +1,7 @@/* Native implementation of soft float functions */ #include <math.h> -#if (defined(HOST_BSD ) && !defined(__APPLE__)) || defined(HOST_SOLARIS ) +#if (defined(HOST_BSD ) && !defined(__APPLE__)) || defined(CONFIG_SOLARIS )#include <ieeefp.h> #define fabsf (f) ((float)fabs(f))#else
@@ -19,8 +19,9 @@* Solaris 10 with GCC4 does not need these macros as they * are defined in <iso/math_c99.h> with a compiler directive */ -#if defined(HOST_SOLARIS ) && ((HOST_SOLARIS <=9 ) || ((HOST_SOLARIS >=10 ) \ - && (__GNUC__ <4 ))) \ +#if defined(CONFIG_SOLARIS ) && \ + ((CONFIG_SOLARIS_VERSION <=9 ) || \ + ((CONFIG_SOLARIS_VERSION >=10 ) && (__GNUC__ <4 ))) \ || (defined(__OpenBSD__) && (OpenBSD <200811 ))/* * C99 7.12.3 classification macros
@@ -111,7 +112,7 @@ typedef union {/*---------------------------------------------------------------------------- | Software IEC/IEEE floating-point rounding mode. *----------------------------------------------------------------------------*/ -#if (defined(HOST_BSD ) && !defined(__APPLE__)) || defined(HOST_SOLARIS ) +#if (defined(HOST_BSD ) && !defined(__APPLE__)) || defined(CONFIG_SOLARIS )#if defined(__OpenBSD__)#define FE_RM FP_RM#define FE_RP FP_RP
fpu/softfloat.h +1 -1
@@ -32,7 +32,7 @@ these four paragraphs for those parts of this code that are retained.#ifndef SOFTFLOAT_H #define SOFTFLOAT_H -#if defined(HOST_SOLARIS ) && defined(NEEDS_LIBSUNMATH ) +#if defined(CONFIG_SOLARIS ) && defined(NEEDS_LIBSUNMATH )#include <sunmath.h> #endif
kqemu.c +1 -1
@@ -25,7 +25,7 @@#include <sys/mman.h> #include <sys/ioctl.h> #endif -#ifdef HOST_SOLARIS +#ifdef CONFIG_SOLARIS #include <sys/ioccom.h> #endif #include <stdlib.h>
osdep.c +3 -3
@@ -28,7 +28,7 @@#include <errno.h> #include <unistd.h> #include <fcntl.h> -#ifdef HOST_SOLARIS +#ifdef CONFIG_SOLARIS #include <sys/types.h> #include <sys/statvfs.h> #endif
@@ -116,7 +116,7 @@ static void *kqemu_vmalloc(size_t size)int map_anon =0 ;const char *tmpdir;char phys_ram_file[1024 ]; -#ifdef HOST_SOLARIS +#ifdef CONFIG_SOLARIS struct statvfs stfs;#else struct statfs stfs;
@@ -129,7 +129,7 @@ static void *kqemu_vmalloc(size_t size)if (phys_ram_fd <0 ) { tmpdir =getenv ("QEMU_TMPDIR" ); if (!tmpdir) -#ifdef HOST_SOLARIS +#ifdef CONFIG_SOLARIS tmpdir ="/tmp" ;if (statvfs (tmpdir, &stfs) ==0 ) {#else
target-mips/cpu.h +1 -1
@@ -14,7 +14,7 @@// uint_fast8_t and uint_fast16_t not in <sys/int_types.h> // XXX: move that elsewhere -#if defined(HOST_SOLARIS ) &&HOST_SOLARIS <10 +#if defined(CONFIG_SOLARIS ) &&CONFIG_SOLARIS_VERSION <10 typedef unsigned char uint_fast8_t ;typedef unsigned int uint_fast16_t ;#endif
tcg/sparc/tcg-target.h +1 -1
@@ -95,7 +95,7 @@ enum {/* Note: must be synced with dyngen-exec.h and Makefile.target */ -#ifdef HOST_SOLARIS +#ifdef CONFIG_SOLARIS #define TCG_AREG0 TCG_REG_G2#define TCG_AREG1 TCG_REG_G3#define TCG_AREG2 TCG_REG_G4
Signature · 1 line
1.6.2.5
PATCH 2/37 Remove SP_CFLAGS and SP_LDFLAGS
In reply to [email protected]From: Juan Quintela <[email protected]>
SP_CFLAGS and SP_LDFLAGS are only used as initial values for ARCH_CFLAGS/ARCH_LDFLAGS. Call it directly ARCH_*. Once there, use the same indentantion that the rest of the file
--- configure | 35 ++++++++++++++++++++++------------- 1 files changed, 22 insertions(+), 13 deletions(-)
configure +22 -13
@@ -475,13 +475,28 @@ for opt do --sparc_cpu=*) sparc_cpu="$optarg" case $sparc_cpu in - v7|v8) SP_CFLAGS="-m32 -mcpu=${sparc_cpu} -D__sparc_${sparc_cpu}__"; SP_LDFLAGS="-m32" - target_arch2="sparc"; cpu="sparc" ;; - v8plus|v8plusa) SP_CFLAGS="-m32 -mcpu=ultrasparc -D__sparc_${sparc_cpu}__"; SP_LDFLAGS="-m32" - target_arch2="sparc"; cpu="sparc" ;; - v9) SP_CFLAGS="-m64 -mcpu=ultrasparc -D__sparc_${sparc_cpu}__"; SP_LDFLAGS="-m64" - target_arch2="sparc64"; cpu="sparc64" ;; - *) echo "undefined SPARC architecture. Exiting";exit 1;; + v7|v8) + ARCH_CFLAGS="-m32 -mcpu=${sparc_cpu} -D__sparc_${sparc_cpu}__" + ARCH_LDFLAGS="-m32" + target_arch2="sparc" + cpu="sparc" + ;; + v8plus|v8plusa) + ARCH_CFLAGS="-m32 -mcpu=ultrasparc -D__sparc_${sparc_cpu}__" + ARCH_LDFLAGS="-m32" + target_arch2="sparc" + cpu="sparc" + ;; + v9) + ARCH_CFLAGS="-m64 -mcpu=ultrasparc -D__sparc_${sparc_cpu}__" + ARCH_LDFLAGS="-m64" + target_arch2="sparc64" + cpu="sparc64" + ;; + *) + echo "undefined SPARC architecture. Exiting"; + exit 1 + ;; esac ;; --enable-werror) werror="yes"
@@ -554,9 +569,6 @@ case "$cpu" in sparc) if test -z "$sparc_cpu" ; then ARCH_CFLAGS="-m32 -mcpu=ultrasparc -D__sparc_v8plus__" ARCH_LDFLAGS="-m32" - else - ARCH_CFLAGS="${SP_CFLAGS}" - ARCH_LDFLAGS="${SP_LDFLAGS}" fi ARCH_CFLAGS="$ARCH_CFLAGS -ffixed-g2 -ffixed-g3" if test "$solaris" = "no" ; then
@@ -566,9 +578,6 @@ case "$cpu" in sparc64) if test -z "$sparc_cpu" ; then ARCH_CFLAGS="-m64 -mcpu=ultrasparc -D__sparc_v9__" ARCH_LDFLAGS="-m64" - else - ARCH_CFLAGS="${SP_CFLAGS}" - ARCH_LDFLAGS="${SP_LDFLAGS}" fi if test "$solaris" = "no" ; then ARCH_CFLAGS="$ARCH_CFLAGS -ffixed-g5 -ffixed-g6 -ffixed-g7"
Signature · 1 line
1.6.2.5
PATCH 3/37 target_arch2 is redefined unconditionally later
In reply to [email protected]From: Juan Quintela <[email protected]>
--- configure | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-)
configure +0 -3
@@ -478,19 +478,16 @@ for opt do v7|v8) ARCH_CFLAGS="-m32 -mcpu=${sparc_cpu} -D__sparc_${sparc_cpu}__" ARCH_LDFLAGS="-m32" - target_arch2="sparc" cpu="sparc" ;; v8plus|v8plusa) ARCH_CFLAGS="-m32 -mcpu=ultrasparc -D__sparc_${sparc_cpu}__" ARCH_LDFLAGS="-m32" - target_arch2="sparc" cpu="sparc" ;; v9) ARCH_CFLAGS="-m64 -mcpu=ultrasparc -D__sparc_${sparc_cpu}__" ARCH_LDFLAGS="-m64" - target_arch2="sparc64" cpu="sparc64" ;; *)
Signature · 1 line
1.6.2.5
PATCH 4/37 remove CONFIG_ from VNC_TLS_{LIBS, FLAGS}
In reply to [email protected]From: Juan Quintela <[email protected]>
--- Makefile | 2 +- Makefile.target | 4 ++-- configure | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-)
Makefile +1 -1
@@ -193,7 +193,7 @@ vnc.h: vnc-tls.h vnc-auth-vencrypt.h vnc-auth-sasl.h keymaps.h vnc.o: vnc.c vnc.h vnc_keysym.h vnchextile.h d3des.c d3des.h acl.h -vnc.o: CFLAGS += $(CONFIG_VNC_TLS_CFLAGS) +vnc.o: CFLAGS += $(VNC_TLS_CFLAGS) vnc-tls.o: vnc-tls.c vnc.h
Makefile.target +2 -2
@@ -456,8 +456,8 @@ adlib.o fmopl.o: CFLAGS := ${CFLAGS} -DBUILD_Y8950=0 endif ifdef CONFIG_VNC_TLS -CPPFLAGS += $(CONFIG_VNC_TLS_CFLAGS) -LIBS += $(CONFIG_VNC_TLS_LIBS) +CPPFLAGS += $(VNC_TLS_CFLAGS) +LIBS += $(VNC_TLS_LIBS) endif ifdef CONFIG_VNC_SASL
configure +2 -2
@@ -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
Signature · 1 line
1.6.2.5
PATCH 5/37 use same algorithm for testing and
In reply to [email protected]From: Juan Quintela <[email protected]>
--- configure | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-)
configure +7 -1
@@ -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
Signature · 1 line
1.6.2.5
PATCH 6/37 remove CONFIG_ from VNC_SASL_{LIBS, FLAGS}
In reply to [email protected]From: Juan Quintela <[email protected]>
--- Makefile.target | 4 ++-- configure | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
Makefile.target +2 -2
@@ -461,8 +461,8 @@ LIBS += $(VNC_TLS_LIBS) endif ifdef CONFIG_VNC_SASL -CPPFLAGS += $(CONFIG_VNC_SASL_CFLAGS) -LIBS += $(CONFIG_VNC_SASL_LIBS) +CPPFLAGS += $(VNC_SASL_CFLAGS) +LIBS += $(VNC_SASL_LIBS) endif ifdef CONFIG_BLUEZ
configure +2 -2
@@ -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
Signature · 1 line
1.6.2.5
PATCH 7/37 remove CONFIG_ from BLUEZ_{LIBS,FLAGS}
In reply to [email protected]From: Juan Quintela <[email protected]>
--- Makefile | 2 +- Makefile.target | 2 +- configure | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)
Makefile +1 -1
@@ -203,7 +203,7 @@ vnc-auth-sasl.o: vnc-auth-sasl.c vnc.h curses.o: curses.c keymaps.h curses_keys.h -bt-host.o: CFLAGS += $(CONFIG_BLUEZ_CFLAGS) +bt-host.o: CFLAGS += $(BLUEZ_CFLAGS) libqemu_common.a: $(obj-y)
Makefile.target +1 -1
@@ -466,7 +466,7 @@ LIBS += $(VNC_SASL_LIBS) endif ifdef CONFIG_BLUEZ -LIBS += $(CONFIG_BLUEZ_LIBS) +LIBS += $(BLUEZ_LIBS) endif # xen backend driver support
configure +2 -2
@@ -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
Signature · 1 line
1.6.2.5
PATCH 8/37 make fmod also use FMOD_{LIBS,CFLAGS}
In reply to [email protected]From: Juan Quintela <[email protected]>
--- Makefile | 2 +- Makefile.target | 2 +- configure | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)
Makefile +1 -1
@@ -124,7 +124,7 @@ ifdef CONFIG_COREAUDIO AUDIO_PT = y endif ifdef CONFIG_FMOD -audio/audio.o audio/fmodaudio.o: CPPFLAGS := -I$(CONFIG_FMOD_INC) $(CPPFLAGS) +audio/audio.o audio/fmodaudio.o: CPPFLAGS := -I$(FMOD_CFLAGS) $(CPPFLAGS) endif ifdef CONFIG_ESD AUDIO_PT = y
Makefile.target +1 -1
@@ -437,7 +437,7 @@ ifdef CONFIG_DSOUND LIBS += -lole32 -ldxguid endif ifdef CONFIG_FMOD -LIBS += $(CONFIG_FMOD_LIB) +LIBS += $(FMOD_LIBS) endif ifdef CONFIG_OSS LIBS += $(CONFIG_OSS_LIB)
configure +2 -2
@@ -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
Signature · 1 line
1.6.2.5
PATCH 9/37 make oss use OSS_LIBS
In reply to [email protected]From: Juan Quintela <[email protected]>
--- Makefile.target | 2 +- configure | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Makefile.target +1 -1
@@ -440,7 +440,7 @@ ifdef CONFIG_FMOD LIBS += $(FMOD_LIBS) endif ifdef CONFIG_OSS -LIBS += $(CONFIG_OSS_LIB) +LIBS += $(OSS_LIBS) endif sound-obj-y =
configure +1 -1
@@ -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
Signature · 1 line
1.6.2.5
PATCH 10/37 move printing of config-host.mak variables to end of generation
In reply to [email protected]From: Juan Quintela <[email protected]>
--- configure | 52 +++++++++++++++++++++++++++------------------------- 1 files changed, 27 insertions(+), 25 deletions(-)
configure +27 -25
@@ -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
Signature · 1 line
1.6.2.5
PATCH 11/37 more specific config.mak can overwrote more general config.mak
In reply to [email protected]From: Juan Quintela <[email protected]>
--- Makefile.hw | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Makefile.hw +1 -1
@@ -1,7 +1,7 @@ # Makefile for qemu target independent devices. -include config.mak include ../config-host.mak +include config.mak include $(SRC_PATH)/rules.mak .PHONY: all
Signature · 1 line
1.6.2.5
PATCH 12/37 generate CPPFLAGS and LIBS on ./configure
In reply to [email protected]From: Juan Quintela <[email protected]>
--- Makefile | 2 +- Makefile.target | 3 +-- configure | 11 ++++++++++- 3 files changed, 12 insertions(+), 4 deletions(-)
Makefile +1 -1
@@ -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
Makefile.target +1 -2
@@ -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
configure +10 -1
@@ -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
Signature · 1 line
1.6.2.5
Re: [Qemu-devel] [PATCH 12/37] generate CPPFLAGS and LIBS on ./configure
configure for opt do · line 531
Quoted 4 lines · On Fri, Jul 17, 2009 at 10:21 PM, <[email protected]> wrote:
From: Juan Quintela <[email protected]>
configure +2
-0+# 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.
PATCH 13/37 fold PTHREADLIBS and CLOCKLIBS on generic LIBS
In reply to [email protected]From: Juan Quintela <[email protected]>
--- Makefile | 3 --- Makefile.target | 3 --- configure | 8 ++------ 3 files changed, 2 insertions(+), 12 deletions(-)
Makefile +0 -3
@@ -29,9 +29,6 @@ else DOCS= endif -LIBS+=$(PTHREADLIBS) -LIBS+=$(CLOCKLIBS) - ifdef CONFIG_SOLARIS LIBS+=-lsocket -lnsl -lresolv endif
Makefile.target +0 -3
@@ -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
configure +2 -6
@@ -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
Signature · 1 line
1.6.2.5
PATCH 14/37 CONFIG_SOLARIS always want -lsockt -lnsl -lresolv
In reply to [email protected]From: Juan Quintela <[email protected]>
--- Makefile | 4 ---- Makefile.target | 1 - configure | 1 + 3 files changed, 1 insertions(+), 5 deletions(-)
Makefile +0 -4
@@ -29,10 +29,6 @@ else DOCS= endif -ifdef CONFIG_SOLARIS -LIBS+=-lsocket -lnsl -lresolv -endif - ifdef CONFIG_WIN32 LIBS+=-lwinmm -lws2_32 -liphlpapi endif
Makefile.target +0 -1
@@ -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
configure +1 -0
@@ -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
Signature · 1 line
1.6.2.5
PATCH 15/37 Add -static in configure if needed
In reply to [email protected]From: Juan Quintela <[email protected]>
--- Makefile | 3 --- Makefile.target | 11 ----------- configure | 1 + 3 files changed, 1 insertions(+), 14 deletions(-)
Makefile +0 -3
@@ -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
Makefile.target +0 -11
@@ -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
configure +1 -0
@@ -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
Signature · 1 line
1.6.2.5
PATCH 16/37 generate CONFIG_WIN32 libraries in configure
In reply to [email protected]From: Juan Quintela <[email protected]>
--- Makefile | 4 ---- Makefile.target | 3 --- configure | 1 + 3 files changed, 1 insertions(+), 7 deletions(-)
Makefile +0 -4
@@ -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
Makefile.target +0 -3
@@ -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
configure +1 -0
@@ -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>
Signature · 1 line
1.6.2.5
PATCH 17/37 fold VDE_LIBS on generic LIBS
In reply to [email protected]From: Juan Quintela <[email protected]>
--- Makefile | 2 -- Makefile.target | 2 +- configure | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-)
Makefile +0 -2
@@ -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
Makefile.target +1 -1
@@ -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
configure +1 -1
@@ -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:]'`
Signature · 1 line
1.6.2.5
PATCH 18/37 fold CURL_LIBS on generic LIBS
In reply to [email protected]From: Juan Quintela <[email protected]>
--- Makefile | 2 -- Makefile.target | 2 +- configure | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-)
Makefile +0 -2
@@ -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
Makefile.target +1 -1
@@ -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
configure +1 -1
@@ -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
Signature · 1 line
1.6.2.5
PATCH 19/37 fold BRLAPI_LIBS on generic LIBS
In reply to [email protected]From: Juan Quintela <[email protected]>
--- Makefile | 4 ---- Makefile.target | 2 +- configure | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-)
Makefile +0 -4
@@ -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
Makefile.target +1 -1
@@ -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
configure +1 -1
@@ -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
Signature · 1 line
1.6.2.5
PATCH 20/37 fold CURSES_LIBS on generic LIBS
In reply to [email protected]From: Juan Quintela <[email protected]>
--- Makefile.target | 2 +- configure | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
Makefile.target +1 -1
@@ -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
configure +2 -2
@@ -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
Signature · 1 line
1.6.2.5
PATCH 21/37 fold XEN_LIBS on generic LIBS
In reply to [email protected]From: Juan Quintela <[email protected]>
--- Makefile.target | 3 --- configure | 2 +- 2 files changed, 1 insertions(+), 4 deletions(-)
Makefile.target +0 -3
@@ -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
configure +1 -1
@@ -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
Signature · 1 line
1.6.2.5
PATCH 22/37 fold BLUEZ_LIBS on generic LIBS
In reply to [email protected]From: Juan Quintela <[email protected]>
--- Makefile.target | 4 ---- configure | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-)
Makefile.target +0 -4
@@ -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
configure +2 -2
@@ -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"
Signature · 1 line
1.6.2.5
PATCH 23/37 fold VNC_TLS_LIBS on generic LIBS
In reply to [email protected]From: Juan Quintela <[email protected]>
--- Makefile.target | 1 - configure | 2 +- 2 files changed, 1 insertions(+), 2 deletions(-)
Makefile.target +0 -1
@@ -441,7 +441,6 @@ endif ifdef CONFIG_VNC_TLS CPPFLAGS += $(VNC_TLS_CFLAGS) -LIBS += $(VNC_TLS_LIBS) endif ifdef CONFIG_VNC_SASL
configure +1 -1
@@ -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
Signature · 1 line
1.6.2.5
PATCH 24/37 fold VNC_SASL_LIBS on generic LIBS
In reply to [email protected]From: Juan Quintela <[email protected]>
--- Makefile.target | 1 - configure | 2 +- 2 files changed, 1 insertions(+), 2 deletions(-)
Makefile.target +0 -1
@@ -445,7 +445,6 @@ endif ifdef CONFIG_VNC_SASL CPPFLAGS += $(VNC_SASL_CFLAGS) -LIBS += $(VNC_SASL_LIBS) endif # xen backend driver support
configure +1 -1
@@ -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
Signature · 1 line
1.6.2.5
PATCH 25/37 Rename HAVE_FDT to CONFIG_FDT and define it also in Makefile
In reply to [email protected]From: Juan Quintela <[email protected]>
--- Makefile.target | 4 ++-- configure | 3 ++- hw/petalogix_s3adsp1800_mmu.c | 4 ++-- hw/ppc440_bamboo.c | 2 +- hw/ppce500_mpc8544ds.c | 4 ++-- target-ppc/kvm_ppc.c | 2 +- 6 files changed, 10 insertions(+), 9 deletions(-)
Makefile.target +2 -2
@@ -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
configure +2 -1
@@ -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
hw/petalogix_s3adsp1800_mmu.c +2 -2
@@ -52,14 +52,14 @@ static int petalogix_load_device_tree(target_phys_addr_t addr,target_phys_addr_t initrd_size, const char *kernel_cmdline) { -#ifdef HAVE_FDT +#ifdef CONFIG_FDT void *fdt;int r;#endif char *path;int fdt_size; -#ifdef HAVE_FDT +#ifdef CONFIG_FDT /* Try the local "mb.dtb" override. */ fdt = load_device_tree("mb.dtb", &fdt_size); if (!fdt) {
hw/ppc440_bamboo.c +1 -1
@@ -32,7 +32,7 @@ static void *bamboo_load_device_tree(target_phys_addr_t addr, const char *kernel_cmdline) {void *fdt =NULL ; -#ifdef HAVE_FDT +#ifdef CONFIG_FDT uint32_t mem_reg_property[] = {0 ,0 , ramsize };char *filename;int fdt_size;
hw/ppce500_mpc8544ds.c +2 -2
@@ -46,7 +46,7 @@#define MPC8544_PCI_IO 0xE1000000#define MPC8544_PCI_IOLEN 0x10000 -#ifdef HAVE_FDT +#ifdef CONFIG_FDT static int mpc8544_copy_soc_cell (void *fdt,const char *node,const char *prop) {uint32_t cell;
@@ -77,7 +77,7 @@ static void *mpc8544_load_device_tree(target_phys_addr_t addr, const char *kernel_cmdline) {void *fdt =NULL ; -#ifdef HAVE_FDT +#ifdef CONFIG_FDT uint32_t mem_reg_property[] = {0 , ramsize};char *filename;int fdt_size;
target-ppc/kvm_ppc.c +1 -1
@@ -21,7 +21,7 @@static QEMUTimer *kvmppc_timer;static unsigned int kvmppc_timer_rate; -#ifdef HAVE_FDT +#ifdef CONFIG_FDT int kvmppc_read_host_property (const char *node_path,const char *prop,void *val,size_t len) {
Signature · 1 line
1.6.2.5
PATCH 26/37 Refactor code to remove one #ifdef CONFIG_FDT
In reply to [email protected]From: Juan Quintela <[email protected]>
--- hw/petalogix_s3adsp1800_mmu.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-)
hw/petalogix_s3adsp1800_mmu.c +2 -4
@@ -52,14 +52,12 @@ static int petalogix_load_device_tree(target_phys_addr_t addr,target_phys_addr_t initrd_size, const char *kernel_cmdline) { + char *path; +int fdt_size; #ifdef CONFIG_FDT void *fdt; int r; -#endif -char *path; -int fdt_size; -#ifdef CONFIG_FDT /* Try the local "mb.dtb" override. */ fdt = load_device_tree("mb.dtb", &fdt_size); if (!fdt) {
Signature · 1 line
1.6.2.5
PATCH 27/37 fold FDT_LIBS on generic LIBS
In reply to [email protected]From: Juan Quintela <[email protected]>
--- Makefile.target | 6 ------ configure | 2 +- 2 files changed, 1 insertions(+), 7 deletions(-)
Makefile.target +0 -6
@@ -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
configure +1 -1
@@ -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
Signature · 1 line
1.6.2.5
PATCH 28/37 fold NEEDS_LIBSUNMATH on generic variables
In reply to [email protected]From: Juan Quintela <[email protected]>
--- Makefile.target | 7 ------- configure | 3 +++ 2 files changed, 3 insertions(+), 7 deletions(-)
Makefile.target +0 -7
@@ -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)
configure +3 -0
@@ -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
Signature · 1 line
1.6.2.5
PATCH 29/37 fold FMOD_LIBS on generic LIBS
In reply to [email protected]From: Juan Quintela <[email protected]>
--- Makefile.target | 3 --- configure | 2 +- 2 files changed, 1 insertions(+), 4 deletions(-)
Makefile.target +0 -3
@@ -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
configure +1 -1
@@ -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
Signature · 1 line
1.6.2.5
PATCH 30/37 fold OSS_LIBS on generic LIBS
In reply to [email protected]From: Juan Quintela <[email protected]>
--- Makefile.target | 3 --- configure | 2 +- 2 files changed, 1 insertions(+), 4 deletions(-)
Makefile.target +0 -3
@@ -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
configure +1 -1
@@ -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
Signature · 1 line
1.6.2.5
PATCH 31/37 fold ALSA libs on generic LIBS
In reply to [email protected]From: Juan Quintela <[email protected]>
--- Makefile.target | 3 --- configure | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-)
Makefile.target +0 -3
@@ -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
configure +2 -0
@@ -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
Signature · 1 line
1.6.2.5
PATCH 32/37 fold DSOUND libs on generic LIBS
In reply to [email protected]From: Juan Quintela <[email protected]>
--- Makefile.target | 3 --- configure | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-)
Makefile.target +0 -3
@@ -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
configure +2 -0
@@ -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
Signature · 1 line
1.6.2.5
PATCH 33/37 fold Pulse Audio libs on generic LIBS
In reply to [email protected]From: Juan Quintela <[email protected]>
--- Makefile.target | 3 --- configure | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-)
Makefile.target +0 -3
@@ -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
configure +2 -0
@@ -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
Signature · 1 line
1.6.2.5
PATCH 34/37 fold ESD libs on generic LIBS
In reply to [email protected]From: Juan Quintela <[email protected]>
--- Makefile.target | 3 --- configure | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-)
Makefile.target +0 -3
@@ -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
configure +2 -0
@@ -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
Signature · 1 line
1.6.2.5
PATCH 35/37 fold COCOA_LIBS on generic LIBS
In reply to [email protected]From: Juan Quintela <[email protected]>
--- Makefile.target | 8 +------- configure | 3 +++ 2 files changed, 4 insertions(+), 7 deletions(-)
Makefile.target +1 -7
@@ -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
configure +3 -0
@@ -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
Signature · 1 line
1.6.2.5
PATCH 36/37 fold SDL_LIBS on generic LIBS
In reply to [email protected]From: Juan Quintela <[email protected]>
--- Makefile.target | 5 ----- configure | 8 +++++--- 2 files changed, 5 insertions(+), 8 deletions(-)
Makefile.target +0 -5
@@ -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
configure +5 -3
@@ -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
Signature · 1 line
1.6.2.5
PATCH 37/37 remove rt variable, we can assign directly LIBS
In reply to [email protected]From: Juan Quintela <[email protected]>
--- configure | 5 ----- 1 files changed, 0 insertions(+), 5 deletions(-)
configure +0 -5
@@ -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
Signature · 1 line
1.6.2.5
Quoted 9 lines · On Fri, Jul 17, 2009 at 10:20 PM, <[email protected]> wrote:
From: Juan Quintela <[email protected]>
Hi
Instead of having
*_LIBSvariables, 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/
Quoted 1 line
- s/HAVE_FDT/CONFIG_FDT/
There's also HAVE_PREADV and HAVE_IOVEC etc.
Quoted 8 lines · Blue Swirl
Quoted 7 lines · On Fri, Jul 17, 2009 at 10:20 PM, <[email protected]> wrote:
From: Juan Quintela <[email protected]>
Hi
Instead of having
*_LIBSvariables, generate a proper LIBS variable in configure and use it in Makefiles.
Quoted 8 lines
Quoted 2 lines
- Remove lots of other ifdef in Makefiles.
- s/HOST_SOLARIS/CONFIG_SOLARIS/ for coherenceBy the same logic, s/HOST_BSD/CONFIG_BSD/
Quoted 1 line
- s/HAVE_FDT/CONFIG_FDT/
There's also
HAVE_PREADVandHAVE_IOVECetc.
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.
Quoted 3 lines · [email protected] wrote:
From: Juan Quintela <[email protected]>
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
Quoted 3 lines
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
Quoted 4 lines · Paolo Bonzini
Quoted 2 lines
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,
Quoted 8 lines · Juan Quintela
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:
x86_64.ld +0 -0
@@ -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
Quoted 4 lines
Later,
Quoted 5 lines · Anthony Liguori
Quoted 4 lines · Juan Quintela
Anthony, what do you think of merging a search path like this:
/usr/local/lib64;/lib64;/usr/lib64;/usr/local/lib;/lib;/usr/lib
Quoted 7 lines
Quoted 4 lines
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_DIRand then do:
Only for x86_64 or all architectures? Once here.
Quoted 20 lines
x86_64.ld +1
-1@@ -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
Quoted 1 line
Later,
Quoted 10 lines · Juan Quintela
Quoted 8 lines · Anthony Liguori
Quoted 6 lines · Juan Quintela
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.
Quoted 9 lines
Quoted 6 lines
Quoted 3 lines
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_DIRand then do:Only for
x86_64or 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
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
I'd rather see the us generate a config-host.ld that contained the output of ld --verbose -v | grep
SEARCH_DIRand then do:Only for
x86_64or 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
Quoted 11 lines · Paul Brook
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
I'd rather see the us generate a config-host.ld that contained the output of ld --verbose -v | grep
SEARCH_DIRand then do:Only for
x86_64or 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
Quoted 3 lines
Paul
Quoted 9 lines · Paul Brook
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
I'd rather see the us generate a config-host.ld that contained the output of ld --verbose -v | grep
SEARCH_DIRand then do:Only for
x86_64or 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.
Quoted 16 lines · Juan Quintela
Quoted 9 lines · Paul Brook
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
I'd rather see the us generate a config-host.ld that contained the output of ld --verbose -v | grep
SEARCH_DIRand then do:Only for
x86_64or 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)
Quoted 8 lines
The reason for changing the
SEARCH_PATHis because:
a- We changed to use a LIBS variable for everything
b- Inx86_64, it is common to have locally compiled libraries in
/usr/local/libnot/usr/local/lib64(case of libvdeplug.so for Anthony.What to do?
a- revert back to use diferent LIBS variable for each binary
a
Quoted 8 lines
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.
Signature · 1 line
mailto:[email protected]
Quoted 24 lines · malc
Quoted 22 lines · Juan Quintela
Quoted 9 lines · Paul Brook
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
I'd rather see the us generate a config-host.ld that contained the output of ld --verbose -v | grep
SEARCH_DIRand then do:Only for
x86_64or 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_PATHis because:
a- We changed to use a LIBS variable for everything
b- Inx86_64, it is common to have locally compiled libraries in
/usr/local/libnot/usr/local/lib64(case of libvdeplug.so for Anthony.
Quoted 4 lines
Quoted 2 lines
What to do?
a- revert back to use diferent LIBS variable for each binarya
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.
Quoted 8 lines
Quoted 8 lines
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.
Quoted 2 lines
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
Quoted 5 lines · Paul Brook
Quoted 2 lines
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 everythinglibs_softmmulibs_linuxlibs_bsdlibs_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.
Quoted 42 lines · Juan Quintela
Quoted 5 lines · Paul Brook
Quoted 2 lines
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_softmmulibs_linuxlibs_bsdlibs_darwinldflags <- 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_CFLAGSand similars)
- CFLAGS for some libs that got compiled all files with
-HELPER_CFLAGS
-SP_FLAGS(already killed on my patches, it is know part ofARCH_FLAGS)
-EXTRA_CFLAGSStarting in configure, which flags are used for each test: random mix of CFLAGS +
EXTRA_CFLAGS+OS_FLAGS+ARCH_FLAGSClearly, 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 +Makefilec- 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=""
Quoted 5 lines
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.
Quoted 18 lines
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 inOS_FLAGS+ CFLAGS +ARCH_CFLAGS
Be careful about what we put into CFLAGS/CPPFLAGSb: is solved with previous approach,if you do
CFLAGS="<somethnig $CFLAGS",EXTRA_CFLAGSis 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)
Quoted 7 lines
d: if we do the
FOO_FLAGSin 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?
Quoted 45 lines · Markus Armbruster
Quoted 42 lines · Juan Quintela
Quoted 5 lines · Paul Brook
Quoted 3 lines
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_softmmulibs_linuxlibs_bsdlibs_darwinldflags <- 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_CFLAGSand similars)
- CFLAGS for some libs that got compiled all files with
-HELPER_CFLAGS
-SP_FLAGS(already killed on my patches, it is know part ofARCH_FLAGS)
-EXTRA_CFLAGSStarting in configure, which flags are used for each test: random mix of CFLAGS +
EXTRA_CFLAGS+OS_FLAGS+ARCH_FLAGSClearly, 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 +Makefilec- 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=""
Quoted 9 lines
Quoted 6 lines
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
Quoted 3 lines
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
Quoted 7 lines · Paolo Bonzini
Quoted 2 lines
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_CFLAGSandQEMU_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.
Quoted 4 lines
--extra-cflags: remove it, we can use:
CFLAGS="foo bar" ./configure
(it is not there yet, but we can do it)
Agreed.
Quoted 9 lines
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).
Quoted 9 lines
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.ocompile 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