mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
2.0 KiB

  1. Submitted by: Ryan Oliver <ryan.oliver@pha.com.au>
  2. Date: 2005-05-02
  3. Initial Package Version: 4.0.1
  4. Origin: Ryan Oliver (issue reported by Erik-Jan Post)
  5. Rediffed against 4.1.0 by Chris Staub
  6. Upstream Status: N/A
  7. Description:
  8. Removes standard_exec_prefix_2 from library search path when cross-compiling.
  9. Removes both standard_exec_prefix_1 and standard_exec_prefix_2 from the gcc
  10. executable search path when cross-compiling.
  11. ie: if cross_compile = 1 in the specs file, do not
  12. - do not add /usr/lib/gcc/${TARGET}/${GCC_VER} to the library search path
  13. - do not add /usr/lib/gcc/${TARGET}/${GCC_VER} or
  14. /usr/libexec/gcc/${TARGET}/${GCC_VER}
  15. to the executable search path
  16. This avoids the possibility of linking in libraries from the host if they
  17. exist under those directories.
  18. diff -Naur gcc-4.1.0.orig/gcc/gcc.c gcc-4.1.0/gcc/gcc.c
  19. --- gcc-4.1.0.orig/gcc/gcc.c 2006-01-21 13:29:08.000000000 -0500
  20. +++ gcc-4.1.0/gcc/gcc.c 2006-02-28 22:20:05.000000000 -0500
  21. @@ -3818,16 +3818,22 @@
  22. PREFIX_PRIORITY_LAST, 2, 0);
  23. add_prefix (&exec_prefixes, standard_exec_prefix, "BINUTILS",
  24. PREFIX_PRIORITY_LAST, 2, 0);
  25. - add_prefix (&exec_prefixes, standard_exec_prefix_1, "BINUTILS",
  26. + if (*cross_compile == '0')
  27. + {
  28. + add_prefix (&exec_prefixes, standard_exec_prefix_1, "BINUTILS",
  29. PREFIX_PRIORITY_LAST, 2, 0);
  30. - add_prefix (&exec_prefixes, standard_exec_prefix_2, "BINUTILS",
  31. + add_prefix (&exec_prefixes, standard_exec_prefix_2, "BINUTILS",
  32. PREFIX_PRIORITY_LAST, 2, 0);
  33. + }
  34. #endif
  35. add_prefix (&startfile_prefixes, standard_exec_prefix, "BINUTILS",
  36. PREFIX_PRIORITY_LAST, 1, 0);
  37. - add_prefix (&startfile_prefixes, standard_exec_prefix_2, "BINUTILS",
  38. + if (*cross_compile == '0')
  39. + {
  40. + add_prefix (&startfile_prefixes, standard_exec_prefix_2, "BINUTILS",
  41. PREFIX_PRIORITY_LAST, 1, 0);
  42. + }
  43. tooldir_prefix = concat (tooldir_base_prefix, spec_machine,
  44. dir_separator_str, NULL);