This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Disable -p testing on MinGW
- From: "Danny Smith" <dansmister at gmail dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 25 Feb 2008 18:38:30 +1300
- Subject: Re: Disable -p testing on MinGW
- References: <Pine.LNX.4.64.0802242227100.25721@digraph.polyomino.org.uk>
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.