diff mbox

[28/39] rename interp_prefix to sysroot

Message ID 1286888457-5033-29-git-send-email-pbonzini@redhat.com
State New
Headers show

Commit Message

Paolo Bonzini Oct. 12, 2010, 1 p.m. UTC
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 bsd-user/main.c        |   10 +++++-----
 configure              |   14 +++++++-------
 darwin-user/machload.c |   12 ++++++------
 darwin-user/main.c     |    6 +++---
 darwin-user/syscall.c  |    2 +-
 linux-user/main.c      |   10 +++++-----
 6 files changed, 27 insertions(+), 27 deletions(-)
diff mbox

Patch

diff --git a/bsd-user/main.c b/bsd-user/main.c
index 6b12f8b..f5d22c9 100644
--- a/bsd-user/main.c
+++ b/bsd-user/main.c
@@ -43,7 +43,7 @@  unsigned long guest_base;
 int have_guest_base;
 #endif
 
-static const char *interp_prefix = CONFIG_QEMU_INTERP_PREFIX;
+static const char *sysroot = CONFIG_QEMU_SYSROOT;
 const char *qemu_uname_release = CONFIG_UNAME_RELEASE;
 extern char **environ;
 enum BSDType bsd_type;
@@ -706,7 +706,7 @@  static void usage(void)
            "last change will stay in effect.\n"
            ,
            TARGET_ARCH,
-           interp_prefix,
+           sysroot,
            x86_stack_size,
            DEBUG_LOGFILE);
     exit(1);
@@ -815,7 +815,7 @@  int main(int argc, char **argv)
             else if (*r == 'k' || *r == 'K')
                 x86_stack_size *= 1024;
         } else if (!strcmp(r, "L")) {
-            interp_prefix = argv[optind++];
+            sysroot = argv[optind++];
         } else if (!strcmp(r, "p")) {
             qemu_host_page_size = atoi(argv[optind++]);
             if (qemu_host_page_size == 0 ||
@@ -873,8 +873,8 @@  int main(int argc, char **argv)
     /* Zero out image_info */
     memset(info, 0, sizeof(struct image_info));
 
-    /* Scan interp_prefix dir for replacement files. */
-    init_paths(interp_prefix);
+    /* Scan sysroot dir for replacement files. */
+    init_paths(sysroot);
 
     if (cpu_model == NULL) {
 #if defined(TARGET_I386)
diff --git a/configure b/configure
index 581b91e..b439bc2 100755
--- a/configure
+++ b/configure
@@ -80,7 +80,7 @@  path_of() {
 
 # default parameters
 cpu=""
-interp_prefix="/usr/gnemul/qemu-%M"
+sysroot="/usr/gnemul/qemu-%M"
 static="no"
 sparc_cpu=""
 cross_prefix=""
@@ -514,7 +514,7 @@  for opt do
   ;;
   --prefix=*) prefix="$optarg"
   ;;
-  --with-sysroot=*|--interp-prefix=*) interp_prefix="$optarg"
+  --with-sysroot=*|--interp-prefix=*) sysroot="$optarg"
   ;;
   --source-path=*)
   ;;
@@ -836,7 +836,7 @@  echo ""
 echo "Advanced options (experts only):"
 echo "  --source-path=PATH       path of source code [$source_path]"
 echo "  --with-sysroot=PREFIX    where to find shared libraries, etc."
-echo "                           use %M for cpu name [$interp_prefix]"
+echo "                           use %M for cpu name [$sysroot]"
 echo "  --cross-prefix=PREFIX    use PREFIX for compile tools [$cross_prefix]"
 echo "  --enable-static          enable static build [$static]"
 echo "  --mandir=PATH            install man pages in PATH"
@@ -926,7 +926,7 @@  echo "  --enable-spice           enable spice"
 echo ""
 echo "Deprecated options:"
 echo "  --interp-prefix=PREFIX   where to find shared libraries, etc."
-echo "                           use %M for cpu name [$interp_prefix]"
+echo "                           use %M for cpu name [$sysroot]"
 echo "  --cc=CC                  use C compiler CC [$cc]"
 echo "  --extra-cflags=CFLAGS    append extra C compiler flags QEMU_CFLAGS"
 echo "  --extra-ldflags=LDFLAGS  append extra linker flags LDFLAGS"
@@ -2303,7 +2303,7 @@  echo "binary directory  `eval echo $bindir`"
 echo "config directory  `eval echo $sysconfdir`"
 if test "$mingw32" = "no" ; then
 echo "Manual directory  `eval echo $mandir`"
-echo "ELF interp prefix $interp_prefix"
+echo "Target sysroot    `eval echo $sysroot`"
 fi
 echo "Source path       $source_path"
 echo "C compiler        $cc"
@@ -2783,8 +2783,8 @@  echo "# Automatically generated by configure - do not modify" > $config_target_m
 
 bflt="no"
 target_nptl="no"
-interp_prefix1=`echo "$interp_prefix" | sed "s/%M/$target_arch2/g"`
-echo "CONFIG_QEMU_INTERP_PREFIX=\"$interp_prefix1\"" >> $config_target_mak
+sysroot1=`echo "$sysroot" | sed "s/%M/$target_arch2/g"`
+echo "CONFIG_QEMU_SYSROOT=\"$sysroot1\"" >> $config_target_mak
 gdb_xml_files=""
 
 TARGET_ARCH="$target_arch2"
diff --git a/darwin-user/machload.c b/darwin-user/machload.c
index 4bb5c72..e4796db 100644
--- a/darwin-user/machload.c
+++ b/darwin-user/machload.c
@@ -45,7 +45,7 @@ 
 
 # define check_mach_header(x) (x.magic == MH_CIGAM)
 
-extern const char *interp_prefix;
+extern const char *sysroot;
 
 /* we don't have a good implementation for this */
 #define DONT_USE_DYLD_SHARED_MAP
@@ -364,7 +364,7 @@  int load_dylinker(struct mach_header *mh, struct dylinker_command *dc, int fd, i
 #ifdef OVERRIDE_DYLINKER
     dylinker_name = DYLINKER_NAME;
 #else
-    if(asprintf(&dylinker_name, "%s%s", interp_prefix, dylinker_name) == -1)
+    if(asprintf(&dylinker_name, "%s%s", sysroot, dylinker_name) == -1)
         qerror("can't allocate the new dylinker name\n");
 #endif
 
@@ -809,12 +809,12 @@  unsigned long setup_arg_pages(void * mh, char ** argv, char ** env)
         page_set_flags((int)env[i], (int)(env[i]+strlen(env[i])), PROT_READ | PAGE_VALID);
     }
 
-    /* Add on the stack the interp_prefix choosen if so */
-    if(interp_prefix[0])
+    /* Add on the stack the sysroot choosen if so */
+    if(sysroot[0])
     {
         char *dyld_root;
-        asprintf(&dyld_root, "DYLD_ROOT_PATH=%s", interp_prefix);
-        page_set_flags((int)dyld_root, (int)(dyld_root+strlen(interp_prefix)+1), PROT_READ | PAGE_VALID);
+        asprintf(&dyld_root, "DYLD_ROOT_PATH=%s", sysroot);
+        page_set_flags((int)dyld_root, (int)(dyld_root+strlen(sysroot)+1), PROT_READ | PAGE_VALID);
 
         stl(stack, (int)dyld_root);
         stack--;
diff --git a/darwin-user/main.c b/darwin-user/main.c
index 175e12f..d04f2dd 100644
--- a/darwin-user/main.c
+++ b/darwin-user/main.c
@@ -41,7 +41,7 @@ 
 
 int singlestep;
 
-const char *interp_prefix = "";
+const char *sysroot = "";
 
 asm(".zerofill __STD_PROG_ZONE, __STD_PROG_ZONE, __std_prog_zone, 0x0dfff000");
 
@@ -721,7 +721,7 @@  static void usage(void)
            "-singlestep  always run in singlestep mode\n"
            TARGET_ARCH,
            TARGET_ARCH,
-           interp_prefix,
+           sysroot,
            stack_size,
            DEBUG_LOGFILE);
     exit(1);
@@ -790,7 +790,7 @@  int main(int argc, char **argv)
             else if (*r == 'k' || *r == 'K')
                 stack_size *= 1024;
         } else if (!strcmp(r, "L")) {
-            interp_prefix = argv[optind++];
+            sysroot = argv[optind++];
         } else if (!strcmp(r, "p")) {
             qemu_host_page_size = atoi(argv[optind++]);
             if (qemu_host_page_size == 0 ||
diff --git a/darwin-user/syscall.c b/darwin-user/syscall.c
index 060acc8..6fd2cc8 100644
--- a/darwin-user/syscall.c
+++ b/darwin-user/syscall.c
@@ -83,7 +83,7 @@  enum {
     bswap_in = 1
 };
 
-extern const char *interp_prefix;
+extern const char *sysroot;
 
 static inline long get_errno(long ret)
 {
diff --git a/linux-user/main.c b/linux-user/main.c
index dbba8be..8d34093 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -47,7 +47,7 @@  int have_guest_base;
 unsigned long reserved_va;
 #endif
 
-static const char *interp_prefix = CONFIG_QEMU_INTERP_PREFIX;
+static const char *sysroot = CONFIG_QEMU_SYSROOT;
 const char *qemu_uname_release = CONFIG_UNAME_RELEASE;
 
 /* XXX: on x86 MAP_GROWSDOWN only works if ESP <= address + 32, so
@@ -2662,7 +2662,7 @@  static void usage(void)
            "last change will stay in effect.\n"
            ,
            TARGET_ARCH,
-           interp_prefix,
+           sysroot,
            guest_stack_size,
            DEBUG_LOGFILE);
     exit(1);
@@ -2815,7 +2815,7 @@  int main(int argc, char **argv, char **envp)
             else if (*r == 'k' || *r == 'K')
                 guest_stack_size *= 1024;
         } else if (!strcmp(r, "L")) {
-            interp_prefix = argv[optind++];
+            sysroot = argv[optind++];
         } else if (!strcmp(r, "p")) {
             if (optind >= argc)
                 break;
@@ -2904,8 +2904,8 @@  int main(int argc, char **argv, char **envp)
 
     memset(&bprm, 0, sizeof (bprm));
 
-    /* Scan interp_prefix dir for replacement files. */
-    init_paths(interp_prefix);
+    /* Scan sysroot dir for replacement files. */
+    init_paths(sysroot);
 
     if (cpu_model == NULL) {
 #if defined(TARGET_I386)