home *** CD-ROM | disk | FTP | other *** search
/ Programming Win32 Under the API / ProgrammingWin32UnderTheApiPatVillani.iso / patches / gcc-2_95_2-x86-win32-patches.zi / gcc-2.95.2-patches / broken-down / gcc-2.95.2-win32-profile.diff < prev    next >
Encoding:
Text File  |  1999-11-08  |  3.6 KB  |  94 lines

  1. Wed Aug 18 18:56:23 CDT 1999  Mumit Khan  <khan@xraylith.wisc.edu>
  2.  
  3.     * i386/crtdll.h (STARTFILE_SPEC): Add -pg profiling support.
  4.     * i386/mingw32.h (LIB_SPEC): Likewise.
  5.     (STARTFILE_SPEC): Likewise.
  6.     * i386/uwin.h (LIB_SPEC): Likewise.
  7.     (STARTFILE_SPEC): Likewise.
  8.  
  9.     * i386/mingw32.h (SUBTARGET_PROLOGUE): Override Cygwin definition.
  10.     * i386/uwin.h (SUBTARGET_PROLOGUE): Likewise.
  11.  
  12. Index: gcc-2.95.2/gcc/config/i386/crtdll.h
  13. ===================================================================
  14. RCS file: /homes/khan/src/CVSROOT/gcc-2.95.2/gcc/config/i386/crtdll.h,v
  15. retrieving revision 1.1.1.1
  16. diff -u -3 -p -r1.1.1.1 crtdll.h
  17. --- gcc-2.95.2/gcc/config/i386/crtdll.h    1999/11/05 01:09:55    1.1.1.1
  18. +++ gcc-2.95.2/gcc/config/i386/crtdll.h    1999/11/05 08:18:12
  19. @@ -36,5 +36,5 @@ Boston, MA 02111-1307, USA. */
  20.  
  21.  /* Specify a different entry point when linking a DLL */
  22.  #undef STARTFILE_SPEC
  23. -#define STARTFILE_SPEC "%{mdll:dllcrt1%O%s} %{!mdll:crt1%O%s}"
  24. +#define STARTFILE_SPEC "%{mdll:dllcrt1%O%s} %{!mdll:crt1%O%s} %{pg:gcrt1%O%s}"
  25.  
  26. Index: gcc-2.95.2/gcc/config/i386/mingw32.h
  27. ===================================================================
  28. RCS file: /homes/khan/src/CVSROOT/gcc-2.95.2/gcc/config/i386/mingw32.h,v
  29. retrieving revision 1.1.1.1
  30. diff -u -3 -p -r1.1.1.1 mingw32.h
  31. --- gcc-2.95.2/gcc/config/i386/mingw32.h    1999/11/05 01:09:55    1.1.1.1
  32. +++ gcc-2.95.2/gcc/config/i386/mingw32.h    1999/11/05 08:18:12
  33. @@ -50,7 +50,7 @@ Boston, MA 02111-1307, USA. */
  34.  /* For Windows applications, include more libraries, but always include
  35.     kernel32.  */
  36.  #undef LIB_SPEC
  37. -#define LIB_SPEC "%{mwindows:-lgdi32 -lcomdlg32} \
  38. +#define LIB_SPEC "%{pg:-lgmon} %{mwindows:-lgdi32 -lcomdlg32} \
  39.                    -luser32 -lkernel32 -ladvapi32 -lshell32"
  40.  
  41.  /* Include in the mingw32 libraries with libgcc */
  42. @@ -58,7 +58,7 @@ Boston, MA 02111-1307, USA. */
  43.  #define LIBGCC_SPEC "-lmingw32 -lgcc -lmoldname -lmsvcrt"
  44.  
  45.  #undef STARTFILE_SPEC
  46. -#define STARTFILE_SPEC "%{mdll:dllcrt2%O%s} %{!mdll:crt2%O%s}"
  47. +#define STARTFILE_SPEC "%{mdll:dllcrt2%O%s} %{!mdll:crt2%O%s} %{pg:gcrt2%O%s}"
  48.  
  49.  /* MS runtime does not need a separate math library. */
  50.  #define MATH_LIBRARY ""
  51. @@ -91,4 +91,8 @@ do {                        \
  52.                          \
  53.    putc ('\"', asm_file);            \
  54.  } while (0)
  55. +
  56. +/* Override Cygwin's definition. This is necessary now due to the way
  57. +   Cygwin profiling code is written. Once "fixed", we can remove this.  */
  58. +#undef SUBTARGET_PROLOGUE
  59.  
  60. Index: gcc-2.95.2/gcc/config/i386/uwin.h
  61. ===================================================================
  62. RCS file: /homes/khan/src/CVSROOT/gcc-2.95.2/gcc/config/i386/uwin.h,v
  63. retrieving revision 1.2
  64. diff -u -3 -p -r1.2 uwin.h
  65. --- gcc-2.95.2/gcc/config/i386/uwin.h    1999/11/05 06:45:30    1.2
  66. +++ gcc-2.95.2/gcc/config/i386/uwin.h    1999/11/05 08:18:12
  67. @@ -51,7 +51,7 @@ Boston, MA 02111-1307, USA. */
  68.     kernel32.  */
  69.  #undef LIB_SPEC
  70.  #define LIB_SPEC \
  71. -  "%{mwindows:-luser32 -lgdi32 -lcomdlg32} -lkernel32 -ladvapi32"
  72. +  "%{pg:-lgmon} %{mwindows:-luser32 -lgdi32 -lcomdlg32} -lkernel32 -ladvapi32"
  73.  
  74.  /* This is needed in g77spec.c for now. Will be removed in the future. */
  75.  #define WIN32_UWIN_TARGET 1
  76. @@ -67,7 +67,7 @@ Boston, MA 02111-1307, USA. */
  77.    %{!mdll:-u _main}"
  78.  
  79.  #undef STARTFILE_SPEC
  80. -#define STARTFILE_SPEC "%{mdll:dllcrt2%O%s} %{!mdll:crt2%O%s}"
  81. +#define STARTFILE_SPEC "%{mdll:dllcrt2%O%s} %{!mdll:crt2%O%s} %{pg:gcrt2%O%s}"
  82.  
  83.  /* These are PE BFD bug workarounds. Should go away eventually. */
  84.  
  85. @@ -89,4 +89,8 @@ Boston, MA 02111-1307, USA. */
  86.  
  87.  #undef ASM_OUTPUT_EXTERNAL
  88.  #undef ASM_OUTPUT_EXTERNAL_LIBCALL
  89. +
  90. +/* Override Cygwin's definition. This is necessary now due to the way
  91. +   Cygwin profiling code is written. Once "fixed", we can remove this.  */
  92. +#undef SUBTARGET_PROLOGUE
  93.  
  94.