Commit 3a4739d651cb69acfb23f7f8ec83784c24bc6e48

Authored by bellard
1 parent 76b62fd0

static link


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@423 c046a42c-6fe2-441c-8c8c-71466251a162
Makefile.target
@@ -39,7 +39,14 @@ OP_CFLAGS+= -falign-functions=0 @@ -39,7 +39,14 @@ OP_CFLAGS+= -falign-functions=0
39 else 39 else
40 OP_CFLAGS+= -malign-functions=0 40 OP_CFLAGS+= -malign-functions=0
41 endif 41 endif
  42 +
42 ifdef TARGET_GPROF 43 ifdef TARGET_GPROF
  44 +USE_I386_LD=y
  45 +endif
  46 +ifdef CONFIG_STATIC
  47 +USE_I386_LD=y
  48 +endif
  49 +ifdef USE_I386_LD
43 LDFLAGS+=-Wl,-T,$(SRC_PATH)/i386.ld 50 LDFLAGS+=-Wl,-T,$(SRC_PATH)/i386.ld
44 else 51 else
45 # WARNING: this LDFLAGS is _very_ tricky : qemu is an ELF shared object 52 # WARNING: this LDFLAGS is _very_ tricky : qemu is an ELF shared object
linux-user/main.c
@@ -30,7 +30,7 @@ @@ -30,7 +30,7 @@
30 30
31 static const char *interp_prefix = CONFIG_QEMU_PREFIX; 31 static const char *interp_prefix = CONFIG_QEMU_PREFIX;
32 32
33 -#ifdef __i386__ 33 +#if defined(__i386__) && !defined(CONFIG_STATIC)
34 /* Force usage of an ELF interpreter even if it is an ELF shared 34 /* Force usage of an ELF interpreter even if it is an ELF shared
35 object ! */ 35 object ! */
36 const char interp[] __attribute__((section(".interp"))) = "/lib/ld-linux.so.2"; 36 const char interp[] __attribute__((section(".interp"))) = "/lib/ld-linux.so.2";