This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Disable -p testing on MinGW


On Mon, Feb 25, 2008 at 11:27 AM, Joseph S. Myers
<joseph@codesourcery.com> wrote:
> The test gcc.dg/20021014-1.c fails for i686-mingw32 with "undefined
>  reference to `_mcount'" and "undefined reference to `__monstartup'"
>  errors.  OK to commit the following patch which makes the testsuite
>  treat -p as unavailable on MinGW?
>

Why not make -p work on mingw and cygwin, eg

Index: mingw32.h
===================================================================
--- mingw32.h	(revision 132578)
+++ mingw32.h	(working copy)
@@ -64,7 +64,7 @@
 /* For Windows applications, include more libraries, but always include
    kernel32.  */
 #undef LIB_SPEC
-#define LIB_SPEC "%{pg:-lgmon} %{mwindows:-lgdi32 -lcomdlg32} \
+#define LIB_SPEC "%{pg|p:-lgmon} %{mwindows:-lgdi32 -lcomdlg32} \
                   -luser32 -lkernel32 -ladvapi32 -lshell32"

 /* Include in the mingw32 libraries with libgcc */
@@ -83,7 +83,7 @@

 #undef STARTFILE_SPEC
 #define STARTFILE_SPEC "%{shared|mdll:dllcrt2%O%s} \
-  %{!shared:%{!mdll:crt2%O%s}} %{pg:gcrt2%O%s} \
+  %{!shared:%{!mdll:crt2%O%s}} %{pg|p:gcrt2%O%s} \
   crtbegin.o%s"

 #undef ENDFILE_SPEC


and similarly for cygwin.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]