This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [BUILDROBOT] gcov patch
- From: Rong Xu <xur at google dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: Jan-Benedict Glaw <jbglaw at lug-owl dot de>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 11 Jul 2014 09:42:34 -0700
- 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> <20140711150606 dot GA21006 at kam dot mff dot cuni dot cz>
On Fri, Jul 11, 2014 at 8:06 AM, Jan Hubicka <hubicka@ucw.cz> wrote:
>> 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?
OK. I will change this too and submit.
Thanks for the quick review.
-Rong
>
> 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
>>