OpenSDE Packages Database (without history before r20070)
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.

66 lines
2.7 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../gcc/gcc-4.1.2-cross_search_paths-1.patch
  5. # Copyright (C) 2008 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. Submitted by: Ryan Oliver <ryan.oliver@pha.com.au>
  17. Date: 2007-02-14
  18. Initial Package Version: 4.1.2
  19. Origin: Ryan Oliver (issue reported by Erik-Jan Post)
  20. Rediffed against 4.1.0 by Chris Staub
  21. Rediffed against 4.1.2 by Jim Gifford
  22. Upstream Status: N/A
  23. Description:
  24. Removes standard_exec_prefix_2 from library search path when cross-compiling.
  25. Removes both standard_exec_prefix_1 and standard_exec_prefix_2 from the gcc
  26. executable search path when cross-compiling.
  27. ie: if cross_compile = 1 in the specs file, do not
  28. - do not add /usr/lib/gcc/${TARGET}/${GCC_VER} to the library search path
  29. - do not add /usr/lib/gcc/${TARGET}/${GCC_VER} or
  30. /usr/libexec/gcc/${TARGET}/${GCC_VER}
  31. to the executable search path
  32. This avoids the possibility of linking in libraries from the host if they
  33. exist under those directories.
  34. diff -Naur gcc-4.1.2.orig/gcc/gcc.c gcc-4.1.2/gcc/gcc.c
  35. --- gcc-4.1.2.orig/gcc/gcc.c 2006-11-07 06:26:21.000000000 -0800
  36. +++ gcc-4.1.2/gcc/gcc.c 2007-02-14 07:48:55.000000000 -0800
  37. @@ -3821,16 +3821,22 @@
  38. PREFIX_PRIORITY_LAST, 2, 0);
  39. add_prefix (&exec_prefixes, standard_exec_prefix, "BINUTILS",
  40. PREFIX_PRIORITY_LAST, 2, 0);
  41. - add_prefix (&exec_prefixes, standard_exec_prefix_1, "BINUTILS",
  42. + if (*cross_compile == '0')
  43. + {
  44. + add_prefix (&exec_prefixes, standard_exec_prefix_1, "BINUTILS",
  45. PREFIX_PRIORITY_LAST, 2, 0);
  46. - add_prefix (&exec_prefixes, standard_exec_prefix_2, "BINUTILS",
  47. + add_prefix (&exec_prefixes, standard_exec_prefix_2, "BINUTILS",
  48. PREFIX_PRIORITY_LAST, 2, 0);
  49. + }
  50. #endif
  51. add_prefix (&startfile_prefixes, standard_exec_prefix, "BINUTILS",
  52. PREFIX_PRIORITY_LAST, 1, 0);
  53. - add_prefix (&startfile_prefixes, standard_exec_prefix_2, "BINUTILS",
  54. + if (*cross_compile == '0')
  55. + {
  56. + add_prefix (&startfile_prefixes, standard_exec_prefix_2, "BINUTILS",
  57. PREFIX_PRIORITY_LAST, 1, 0);
  58. + }
  59. tooldir_prefix = concat (tooldir_base_prefix, spec_machine,
  60. dir_separator_str, NULL);