g++ with -fprofile-dir flag has a bug (backslash instead of forward-slash issue)

JonY 10walls@gmail.com
Sun Apr 12 12:56:00 GMT 2020


On 4/12/20 11:39 AM, John Selbie wrote:
> I would file a bug, but that link you provided takes me to a sign-up page
> that says, "Account creation restricted.  Please contact ... response
> within 24 hours..."
> 
> A quick cursory glace of GCC sources would suggest the issue is in
> \gcc\coverage.c. This is a snippit of a function that builds the mangled
> path for the .gcda file.
> 
>           if (profile_data_prefix)
>         {
> #if HAVE_DOS_BASED_FILE_SYSTEM
>      const char *separator = "\\";
>     #else
>      const char *separator = "/";
>     #endif
>      filename = concat (getpwd (), separator, filename, NULL);
>      filename = mangle_path (filename);
>      len = strlen (filename);
>     }
> 
> I'm not an expert on building gcc.  I just suspect that somewhere in the
> build chain  HAVE_DOS_BASED_FILE_SYSTEM is getting defined for or by cygwin.
> 
> Another cursory search of gcc sources suggest HAVE_DOS_BASED_FILE_SYSTEM is
> defined by this preprocessor stuff:
> 
> #if defined(__MSDOS__) || defined(_WIN32) || defined(__OS2__) || defined
> (__CYGWIN__)
> #  ifndef HAVE_DOS_BASED_FILE_SYSTEM
> #    define HAVE_DOS_BASED_FILE_SYSTEM 1
> #  endif
> 
> Still a gcc bug?  I'm guessing so.
> 

The file is in gcc, so yes.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://cygwin.com/pipermail/cygwin/attachments/20200412/973693f1/attachment.sig>


More information about the Cygwin mailing list