This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
(5/8) ix86-win32 -pg support in specs
- To: gcc-patches at gcc dot gnu dot org
- Subject: (5/8) ix86-win32 -pg support in specs
- From: Mumit Khan <khan at nanotech dot wisc dot edu>
- Date: Sun, 12 Dec 1999 00:03:10 -0600
Adds -pg support for Mingw32 and UWIN. The profile support code is
distributed as part of the runtime now.
Sat Dec 11 23:13:02 1999 Mumit Khan <khan@xraylith.wisc.edu>
* i386/crtdll.h (STARTFILE_SPEC): Add -pg profiling support.
* i386/mingw32.h (LIB_SPEC): Likewise.
(STARTFILE_SPEC): Likewise.
* i386/uwin.h (LIB_SPEC): Likewise.
(STARTFILE_SPEC): Likewise.
* i386/mingw32.h (SUBTARGET_PROLOGUE): Override Cygwin definition.
* i386/uwin.h (SUBTARGET_PROLOGUE): Likewise.
Index: config/i386/crtdll.h
===================================================================
RCS file: /homes/khan/src/CVSROOT/gcc-dev/gcc/config/i386/crtdll.h,v
retrieving revision 1.2
diff -u -3 -p -r1.2 crtdll.h
--- crtdll.h 1999/12/12 04:51:39 1.2
+++ crtdll.h 1999/12/12 05:11:56
@@ -37,5 +37,5 @@ Boston, MA 02111-1307, USA. */
/* Specify a different entry point when linking a DLL */
#undef STARTFILE_SPEC
-#define STARTFILE_SPEC "%{mdll:dllcrt1%O%s} %{!mdll:crt1%O%s}"
+#define STARTFILE_SPEC "%{mdll:dllcrt1%O%s} %{!mdll:crt1%O%s} %{pg:gcrt1%O%s}"
Index: config/i386/mingw32.h
===================================================================
RCS file: /homes/khan/src/CVSROOT/gcc-dev/gcc/config/i386/mingw32.h,v
retrieving revision 1.2
diff -u -3 -p -r1.2 mingw32.h
--- mingw32.h 1999/12/12 04:51:39 1.2
+++ mingw32.h 1999/12/12 05:11:56
@@ -51,7 +51,7 @@ Boston, MA 02111-1307, USA. */
/* For Windows applications, include more libraries, but always include
kernel32. */
#undef LIB_SPEC
-#define LIB_SPEC "%{mwindows:-lgdi32 -lcomdlg32} \
+#define LIB_SPEC "%{pg:-lgmon} %{mwindows:-lgdi32 -lcomdlg32} \
-luser32 -lkernel32 -ladvapi32 -lshell32"
/* Include in the mingw32 libraries with libgcc */
@@ -60,7 +60,7 @@ Boston, MA 02111-1307, USA. */
"%{mthreads:-lmingwthrd} -lmingw32 -lgcc -lmoldname -lmsvcrt"
#undef STARTFILE_SPEC
-#define STARTFILE_SPEC "%{mdll:dllcrt2%O%s} %{!mdll:crt2%O%s}"
+#define STARTFILE_SPEC "%{mdll:dllcrt2%O%s} %{!mdll:crt2%O%s} %{pg:gcrt2%O%s}"
/* MS runtime does not need a separate math library. */
#define MATH_LIBRARY ""
@@ -85,4 +85,8 @@ do { \
\
putc ('\"', asm_file); \
} while (0)
+
+/* Override Cygwin's definition. This is necessary now due to the way
+ Cygwin profiling code is written. Once "fixed", we can remove this. */
+#undef SUBTARGET_PROLOGUE
Index: config/i386/uwin.h
===================================================================
RCS file: /homes/khan/src/CVSROOT/gcc-dev/gcc/config/i386/uwin.h,v
retrieving revision 1.1.1.1
diff -u -3 -p -r1.1.1.1 uwin.h
--- uwin.h 1999/12/11 03:13:58 1.1.1.1
+++ uwin.h 1999/12/12 05:11:56
@@ -51,7 +51,7 @@ Boston, MA 02111-1307, USA. */
kernel32. */
#undef LIB_SPEC
#define LIB_SPEC \
- "%{mwindows:-luser32 -lgdi32 -lcomdlg32} -lkernel32 -ladvapi32"
+ "%{pg:-lgmon} %{mwindows:-luser32 -lgdi32 -lcomdlg32} -lkernel32 -ladvapi32"
/* This is needed in g77spec.c for now. Will be removed in the future. */
#define WIN32_UWIN_TARGET 1
@@ -67,7 +67,7 @@ Boston, MA 02111-1307, USA. */
%{!mdll:-u _main}"
#undef STARTFILE_SPEC
-#define STARTFILE_SPEC "%{mdll:dllcrt2%O%s} %{!mdll:crt2%O%s}"
+#define STARTFILE_SPEC "%{mdll:dllcrt2%O%s} %{!mdll:crt2%O%s} %{pg:gcrt2%O%s}"
/* These are PE BFD bug workarounds. Should go away eventually. */
@@ -89,4 +89,8 @@ Boston, MA 02111-1307, USA. */
#undef ASM_OUTPUT_EXTERNAL
#undef ASM_OUTPUT_EXTERNAL_LIBCALL
+
+/* Override Cygwin's definition. This is necessary now due to the way
+ Cygwin profiling code is written. Once "fixed", we can remove this. */
+#undef SUBTARGET_PROLOGUE