From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:50809) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QEUCd-0001MS-Fx for qemu-devel@nongnu.org; Mon, 25 Apr 2011 18:24:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QEUCc-0006zt-99 for qemu-devel@nongnu.org; Mon, 25 Apr 2011 18:24:23 -0400 Received: from mail.serverraum.org ([78.47.150.89]:56739) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QEUCb-0006zj-W5 for qemu-devel@nongnu.org; Mon, 25 Apr 2011 18:24:22 -0400 From: Michael Walle Date: Tue, 26 Apr 2011 00:24:07 +0200 Message-Id: <1303770247-22598-2-git-send-email-michael@walle.cc> In-Reply-To: <20110426053925.GA12998@laped.novotelcn.inacsistemas.com.br> References: <20110426053925.GA12998@laped.novotelcn.inacsistemas.com.br> Subject: [Qemu-devel] [PATCH] configure: support target dependent linking List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: "Edgar E. Iglesias" , Michael Walle , Alexander Graf , Aurelien Jarno This patch is the first attempt to make configure more intelligent with regard to how it links to libraries. It divides the softmmu libraries into two lists, a general one and a list which depends on the target architecture. Signed-off-by: Michael Walle Reviewed-by: Aurelien Jarno --- configure | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/configure b/configure index da2da04..ca675f6 100755 --- a/configure +++ b/configure @@ -1946,11 +1946,11 @@ int main(void) { return 0; } EOF if compile_prog "" "$fdt_libs" ; then fdt=yes - libs_softmmu="$fdt_libs $libs_softmmu" else if test "$fdt" = "yes" ; then feature_not_found "fdt" fi + fdt_libs= fdt=no fi fi @@ -1967,11 +1967,11 @@ int main(void) { GL_VERSION; return 0; } EOF if compile_prog "" "-lGL" ; then opengl=yes - libs_softmmu="$opengl_libs $libs_softmmu" else if test "$opengl" = "yes" ; then feature_not_found "opengl" fi + opengl_libs= opengl=no fi fi @@ -3071,6 +3071,7 @@ target_short_alignment=2 target_int_alignment=4 target_long_alignment=4 target_llong_alignment=8 +target_libs_softmmu= TARGET_ARCH="$target_arch2" TARGET_BASE_ARCH="" @@ -3104,6 +3105,7 @@ case "$target_arch2" in ;; lm32) target_phys_bits=32 + target_libs_softmmu="$opengl_libs" ;; m68k) bflt="yes" @@ -3118,6 +3120,7 @@ case "$target_arch2" in bflt="yes" target_nptl="yes" target_phys_bits=32 + target_libs_softmmu="$fdt_libs" ;; mips|mipsel) TARGET_ARCH=mips @@ -3142,6 +3145,7 @@ case "$target_arch2" in gdb_xml_files="power-core.xml power-fpu.xml power-altivec.xml power-spe.xml" target_phys_bits=32 target_nptl="yes" + target_libs_softmmu="$fdt_libs" ;; ppcemb) TARGET_BASE_ARCH=ppc @@ -3149,6 +3153,7 @@ case "$target_arch2" in gdb_xml_files="power-core.xml power-fpu.xml power-altivec.xml power-spe.xml" target_phys_bits=64 target_nptl="yes" + target_libs_softmmu="$fdt_libs" ;; ppc64) TARGET_BASE_ARCH=ppc @@ -3156,6 +3161,7 @@ case "$target_arch2" in gdb_xml_files="power64-core.xml power-fpu.xml power-altivec.xml power-spe.xml" target_phys_bits=64 target_long_alignment=8 + target_libs_softmmu="$fdt_libs" ;; ppc64abi32) TARGET_ARCH=ppc64 @@ -3164,6 +3170,7 @@ case "$target_arch2" in echo "TARGET_ABI32=y" >> $config_target_mak gdb_xml_files="power64-core.xml power-fpu.xml power-altivec.xml power-spe.xml" target_phys_bits=64 + target_libs_softmmu="$fdt_libs" ;; sh4|sh4eb) TARGET_ARCH=sh4 @@ -3249,7 +3256,7 @@ fi if test "$target_softmmu" = "yes" ; then echo "TARGET_PHYS_ADDR_BITS=$target_phys_bits" >> $config_target_mak echo "CONFIG_SOFTMMU=y" >> $config_target_mak - echo "LIBS+=$libs_softmmu" >> $config_target_mak + echo "LIBS+=$libs_softmmu $target_libs_softmmu" >> $config_target_mak echo "HWDIR=../libhw$target_phys_bits" >> $config_target_mak echo "subdir-$target: subdir-libhw$target_phys_bits" >> $config_host_mak fi -- 1.7.2.3