Bug 33652 - Target x86_64-pc-mingw32 fails to build
Summary: Target x86_64-pc-mingw32 fails to build
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: unknown
: P3 blocker
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: build
Depends on:
Blocks:
 
Reported: 2007-10-04 04:30 UTC by nightstrike
Modified: 2007-10-10 18:44 UTC (History)
1 user (show)

See Also:
Host:
Target: x86_64-pc-mingw32
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nightstrike 2007-10-04 04:30:28 UTC
Building g++ for target x86_64-pc-mingw32 currently fails.  Here is the description from Kai Tietz, along with his proposed patch:

An interesting issue is that there is problem related that in c case the
type char * const[] is not equivalent to type char *const *. Is this done
by intention ?
For the w64 target the parameter of exec(??) methods are using 'const char
* const *' but gcc uses the type 'char * const []' for argp and envp
arguments. In earlier versions the types were equivalent.

See other report: http://gcc.gnu.org/ml/gcc-help/2007-10/msg00008.html

So I suggest the following patch for w64 in libgcov.c:

ChangeLog:

2007-10-02  Kai Tietz  <kai.tietz@onevision.com>
       * libgcov.c: (__gcov_execve): Special case for x86_64-pc-mingw32.


Index: gcc/gcc/libgcov.c
===================================================================
--- gcc.orig/gcc/libgcov.c
+++ gcc/gcc/libgcov.c
@@ -945,7 +945,11 @@ int
 __gcov_execve (const char *path, char *const argv[], char *const envp[])
 {
   __gcov_flush ();
+#ifdef _WIN64
+  return execve (path, (const char * const *) argv, (const char * const *) envp);
+#else
   return execve (path, argv, envp);
+#endif
 }
 #endif
 #endif /* inhibit_libc */
=
Comment 1 nightstrike 2007-10-10 18:44:22 UTC
Changed the title to better reflect what was transpiring.

This problem has since been fixed, so I am closing it.