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.

52 lines
1.8 KiB

  1. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  2. #
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. # Please add additional copyright information _after_ the line containing
  5. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  6. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  7. #
  8. # ROCK Linux: rock-src/package/base/dietlibc/gcc23_cmd.patch
  9. # ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf
  10. #
  11. # This patch file is dual-licensed. It is available under the license the
  12. # patched project is licensed under, as long as it is an OpenSource license
  13. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  14. # of the GNU General Public License as published by the Free Software
  15. # Foundation; either version 2 of the License, or (at your option) any later
  16. # version.
  17. #
  18. # --- ROCK-COPYRIGHT-NOTE-END ---
  19. This patch is needed because the diet wrapper is not correctly managing the
  20. gcc-* binary names correctly.
  21. - Rene Rebe <rene@rocklinux.org>
  22. --- dietlibc-0.24/diet.c 2003-10-10 15:17:46.000000000 +0200
  23. +++ dietlibc-0.24-fixed/diet.c 2004-01-02 17:12:43.000000000 +0100
  24. @@ -105,9 +105,15 @@
  25. }
  26. if (!argv[1]) goto usage;
  27. {
  28. - char *tmp=strchr(argv[1],0)-2;
  29. + char *tmp=strchr(argv[1],0);
  30. char *tmp2,*tmp3;
  31. char *cc=argv[1];
  32. + /* try to find the char string "cc" - it might contain a version info */
  33. + while (tmp > argv[1] && *tmp != 'c')
  34. + tmp--;
  35. + while (tmp > argv[1] && *(tmp - 1) == 'c' )
  36. + tmp--;
  37. +
  38. if (tmp<cc) goto donttouch;
  39. if ((tmp2=strstr(cc,"linux-"))) { /* cross compiling? */
  40. int len=strlen(platform);
  41. @@ -179,7 +185,7 @@
  42. strcpy(shortplatform,"mipsel");
  43. }
  44. strcat(dashL,platform);
  45. - if (!strcmp(tmp,"cc")) {
  46. + if (!strncmp(tmp,"cc", 2)) {
  47. char **newargv;
  48. char **dest;
  49. char *a,*b,*c;