This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [BUILDROBOT] gcov patch
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Rong Xu <xur at google dot com>
- Cc: Jan-Benedict Glaw <jbglaw at lug-owl dot de>, Jan Hubicka <hubicka at ucw dot cz>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 11 Jul 2014 17:06:06 +0200
- Subject: Re: [BUILDROBOT] gcov patch
- Authentication-results: sourceware.org; auth=none
- References: <20140711054808 dot 10213 dot qmail at sourceware dot org> <20140711130306 dot GC21544 at lug-owl dot de> <20140711130833 dot GD21544 at lug-owl dot de> <CAF1bQ=QQqDWEdBjMd-xCioKOFJ4LWOd1-AzFTcWHoxBO7Ldi7w at mail dot gmail dot com>
> Sorry. This code meant to work with the different mkdir api in
> windows. I used wrong ifdef.
>
> Here is the patch. OK for checkin?
OK. I also see the following with LTO bootstrap:
../../gcc/../libgcc/libgcov-util.c:41:24: error: type of ïgcov_max_filenameï does not match original declaration [-Werror]
extern gcov_unsigned_t gcov_max_filename;
^
../../gcc/../libgcc/libgcov-driver.c:88:8: note: previously declared here
size_t gcov_max_filename = 0;
Probably both can be size_t?
Honza
>
> Thanks,
>
> -Rong
>
> 2014-07-11 Rong Xu <xur@google.com>
>
> * gcov-tool.c (gcov_output_files): Fix build error.
>
> Index: gcov-tool.c
> ===================================================================
> --- gcov-tool.c (revision 212448)
> +++ gcov-tool.c (working copy)
> @@ -90,8 +90,8 @@ gcov_output_files (const char *out, struct gcov_in
> /* Try to make directory if it doesn't already exist. */
> if (access (out, F_OK) == -1)
> {
> -#ifdef TARGET_POSIX_IO
> - if (mkdir (out, 0755) == -1 && errno != EEXIST)
> +#if !defined(_WIN32)
> + if (mkdir (out, S_IRWXU | S_IRWXG | S_IRWXO) == -1 && errno != EEXIST)
Sounds almost like something we could have libiberty glue for...
> #else
> if (mkdir (out) == -1 && errno != EEXIST)
> #endif
>