Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19RfZI-00072w-Jj for qemu-devel@nongnu.org; Sun, 15 Jun 2003 18:01:44 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19RfZ9-0006oU-Nx for qemu-devel@nongnu.org; Sun, 15 Jun 2003 18:01:37 -0400 Received: from mx02.uni-tuebingen.de ([134.2.3.12]) by monty-python.gnu.org with esmtp (Exim 4.20) id 19RfYt-0006Wb-5C for qemu-devel@nongnu.org; Sun, 15 Jun 2003 18:01:19 -0400 Received: from juist (semeai.Informatik.Uni-Tuebingen.De [134.2.15.66]) by mx02.uni-tuebingen.de (8.12.3/8.12.3) with ESMTP id h5FM1E8O023138 for ; Mon, 16 Jun 2003 00:01:15 +0200 Received: from falk by juist with local (Exim 3.36 #1 (Debian)) id 19RfYn-00028W-00 for ; Mon, 16 Jun 2003 00:01:13 +0200 From: Falk Hueffner Date: 16 Jun 2003 00:01:13 +0200 Message-ID: <87adcjngpi.fsf@student.uni-tuebingen.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Subject: [Qemu-devel] Compile fix Reply-To: qemu-devel@nongnu.org List-Id: List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , To: qemu-devel@nongnu.org --=-=-= Hi, string concatenation within #include arguments is not legal. So something like the attached patch is needed. Looking forward to playing with the new ARM support :) -- Falk --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=qemu-include.patch Index: configure =================================================================== RCS file: /cvsroot/qemu/qemu/configure,v retrieving revision 1.14 diff -u -p -r1.14 configure --- configure 15 Jun 2003 20:25:43 -0000 1.14 +++ configure 15 Jun 2003 21:58:14 -0000 @@ -268,11 +268,11 @@ fi if test "$target_cpu" = "x86" ; then echo "TARGET_ARCH=i386" >> config.mak - echo "#define TARGET_ARCH \"i386\"" >> $TMPH + echo "#define TARGET_ARCH i386" >> $TMPH echo "#define TARGET_I386 1" >> $TMPH elif test "$target_cpu" = "arm" ; then echo "TARGET_ARCH=arm" >> config.mak - echo "#define TARGET_ARCH \"arm\"" >> $TMPH + echo "#define TARGET_ARCH arm" >> $TMPH echo "#define TARGET_ARM 1" >> $TMPH else echo "Unsupported target CPU" Index: main.c =================================================================== RCS file: /cvsroot/qemu/qemu/main.c,v retrieving revision 1.30 diff -u -p -r1.30 main.c --- main.c 15 Jun 2003 20:05:50 -0000 1.30 +++ main.c 15 Jun 2003 21:58:21 -0000 @@ -308,7 +308,7 @@ void usage(void) "debug options:\n" "-d activate log (logfile=%s)\n" "-p pagesize set the host page size to 'pagesize'\n", - TARGET_ARCH, + STR(TARGET_ARCH), interp_prefix, x86_stack_size, DEBUG_LOGFILE); Index: qemu.h =================================================================== RCS file: /cvsroot/qemu/qemu/qemu.h,v retrieving revision 1.16 diff -u -p -r1.16 qemu.h --- qemu.h 15 Jun 2003 20:05:50 -0000 1.16 +++ qemu.h 15 Jun 2003 21:58:29 -0000 @@ -2,12 +2,16 @@ #define GEMU_H #include "thunk.h" +#include "config.h" #include #include "syscall_defs.h" -#include "cpu-" TARGET_ARCH ".h" -#include "syscall-" TARGET_ARCH ".h" +#define STR(x) #x +#define XSTR(x) STR(x) + +#include XSTR(cpu-TARGET_ARCH.h) +#include XSTR(syscall-TARGET_ARCH.h) /* This struct is used to hold certain information about the image. * Basically, it replicates in user space what would be certain Index: translate.c =================================================================== RCS file: /cvsroot/qemu/qemu/translate.c,v retrieving revision 1.2 diff -u -p -r1.2 translate.c --- translate.c 15 Jun 2003 20:25:43 -0000 1.2 +++ translate.c 15 Jun 2003 21:58:37 -0000 @@ -23,21 +23,24 @@ #include #include +#define STR(x) #x +#define XSTR(x) STR(x) + #include "config.h" #define IN_OP_I386 -#include "cpu-" TARGET_ARCH ".h" +#include XSTR(cpu-TARGET_ARCH.h) #include "exec.h" #include "disas.h" enum { #define DEF(s, n, copy_size) INDEX_op_ ## s, -#include "opc-" TARGET_ARCH ".h" +#include XSTR(opc-TARGET_ARCH.h) #undef DEF NB_OPS, }; #include "dyngen.h" -#include "op-" TARGET_ARCH ".h" +#include XSTR(op-TARGET_ARCH.h) uint16_t gen_opc_buf[OPC_BUF_SIZE]; uint32_t gen_opparam_buf[OPPARAM_BUF_SIZE]; @@ -48,13 +51,13 @@ uint8_t gen_opc_instr_start[OPC_BUF_SIZE #ifdef DEBUG_DISAS static const char *op_str[] = { #define DEF(s, n, copy_size) #s, -#include "opc-" TARGET_ARCH ".h" +#include XSTR(opc-TARGET_ARCH.h) #undef DEF }; static uint8_t op_nb_args[] = { #define DEF(s, n, copy_size) n, -#include "opc-" TARGET_ARCH ".h" +#include XSTR(opc-TARGET_ARCH.h) #undef DEF }; @@ -123,7 +126,7 @@ int cpu_gen_code(TranslationBlock *tb, static const unsigned short opc_copy_size[] = { #define DEF(s, n, copy_size) copy_size, -#include "opc-" TARGET_ARCH ".h" +#include XSTR(opc-TARGET_ARCH.h) #undef DEF }; --=-=-=--