View | Details | Return to bug 17621 | Differences between
and this patch

Collapse All | Expand All

(-)gcc-4.1.1/gcc/gcc.c (-2 / +11 lines)
Lines 3250-3257 Link Here
3250
      gcc_libexec_prefix = make_relative_prefix (argv[0],
3250
      gcc_libexec_prefix = make_relative_prefix (argv[0],
3251
						 standard_bindir_prefix,
3251
						 standard_bindir_prefix,
3252
						 standard_libexec_prefix);
3252
						 standard_libexec_prefix);
3253
      if (gcc_exec_prefix)
3254
	putenv (concat ("GCC_EXEC_PREFIX=", gcc_exec_prefix, NULL));
3255
    }
3253
    }
3256
  else
3254
  else
3257
    gcc_libexec_prefix = make_relative_prefix (gcc_exec_prefix,
3255
    gcc_libexec_prefix = make_relative_prefix (gcc_exec_prefix,
Lines 6148-6157 Link Here
6148
  /* We need to check standard_exec_prefix/just_machine_suffix/specs
6146
  /* We need to check standard_exec_prefix/just_machine_suffix/specs
6149
     for any override of as, ld and libraries.  */
6147
     for any override of as, ld and libraries.  */
6148
  if ( gcc_exec_prefix )
6149
  {
6150
    specs_file = alloca (strlen (gcc_exec_prefix)
6151
		         + strlen (just_machine_suffix) + sizeof ("specs"));
6152
6153
    strcpy (specs_file, gcc_exec_prefix);
6154
  } else {
6155
6150
  specs_file = alloca (strlen (standard_exec_prefix)
6156
  specs_file = alloca (strlen (standard_exec_prefix)
6151
		       + strlen (just_machine_suffix) + sizeof ("specs"));
6157
		       + strlen (just_machine_suffix) + sizeof ("specs"));
6152
  strcpy (specs_file, standard_exec_prefix);
6158
  strcpy (specs_file, standard_exec_prefix);
6159
6160
  }
6161
6153
  strcat (specs_file, just_machine_suffix);
6162
  strcat (specs_file, just_machine_suffix);
6154
  strcat (specs_file, "specs");
6163
  strcat (specs_file, "specs");
6155
  if (access (specs_file, R_OK) == 0)
6164
  if (access (specs_file, R_OK) == 0)
(-)gcc-4.1.1/gcc/prefix.c (-2 / +7 lines)
Lines 246-258 Link Here
246
   The returned string is always malloc-ed, and the caller is
246
   The returned string is always malloc-ed, and the caller is
247
   responsible for freeing it.  */
247
   responsible for freeing it.  */
248
249
static const char *old_prefix = PREFIX;
250
248
char *
251
char *
249
update_path (const char *path, const char *key)
252
update_path (const char *path, const char *key)
250
{
253
{
251
  char *result, *p;
254
  char *result, *p;
252
  const int len = strlen (std_prefix);
255
  const int len = strlen (old_prefix);
253
  if (! strncmp (path, std_prefix, len)
256
  if (! strncmp (path, old_prefix, len)
254
      && (IS_DIR_SEPARATOR(path[len])
257
      && (IS_DIR_SEPARATOR(path[len])
255
          || path[len] == '\0')
258
          || path[len] == '\0')
256
      && key != 0)
259
      && key != 0)
Lines 354-357 Link Here
354
set_std_prefix (const char *prefix, int len)
357
set_std_prefix (const char *prefix, int len)
355
{
358
{
356
  std_prefix = save_string (prefix, len);
359
  std_prefix = save_string (prefix, len);
360
361
	putenv (concat ("GCC_EXEC_PREFIX=", std_prefix, NULL));
357
}
362
}
(-)gcc-4.1.1/gcc/toplev.c (+5 lines)
Lines 82-87 Link Here
82
#include "value-prof.h"
82
#include "value-prof.h"
83
#include "alloc-pool.h"
83
#include "alloc-pool.h"
84
#include "tree-mudflap.h"
84
#include "tree-mudflap.h"
85
#include "prefix.h"
85
#if defined (DWARF2_UNWIND_INFO) || defined (DWARF2_DEBUGGING_INFO)
86
#if defined (DWARF2_UNWIND_INFO) || defined (DWARF2_DEBUGGING_INFO)
86
#include "dwarf2out.h"
87
#include "dwarf2out.h"
Lines 1434-1439 Link Here
1434
  progname = p;
1435
  progname = p;
1435
  xmalloc_set_program_name (progname);
1436
  xmalloc_set_program_name (progname);
1437
1438
  p = getenv("GCC_EXEC_PREFIX");
1439
  if (p && strlen(p)) set_std_prefix (p, strlen(p));
1440
1436
  hex_init ();
1441
  hex_init ();

Return to bug 17621