* [patch]: Fix Bug 65038 - [regression 5] Unable to find ftw.h for libgcov-util.c
@ 2015-02-26 14:58 Kai Tietz
2015-02-27 13:31 ` Kai Tietz
2015-02-27 14:13 ` H.J. Lu
0 siblings, 2 replies; 4+ messages in thread
From: Kai Tietz @ 2015-02-26 14:58 UTC (permalink / raw)
To: GCC Patches; +Cc: terry.gua
Hi,
This is the remaining fix for re-enabling native boostrap for
Windows-variant of gcc without disabling -Werror for libgcc.
ChangeLog
2015-02-26 Kai Tietz <ktietz@redhat.com>
PR target/65038
* config.in: Regenerated.
* configure: Likewise.
* configure.ac (AC_HEADER_STDC): Add explicit.
(AC_CHECK_HEADERS): Check for default headers
plus for ftw.h one.
* libgcov-util.c (gcov_read_profile_dir): Disable use
of ftw-function, if header not found.
(ftw_read_file): Don't translate if ftw header isn't
present.
Regression-tested for x86_64-unknown-linux-gnu. Bootstrapped for
i686-pc-mingw32.
I will apply soon, if there are no objections.
Regards.
Kai
Index: configure.ac
===================================================================
--- configure.ac (Revision 220969)
+++ configure.ac (Arbeitskopie)
@@ -47,6 +47,12 @@ AC_SUBST(libgcc_topdir)
AC_CONFIG_AUX_DIR($libgcc_topdir)
AC_CONFIG_HEADER(auto-target.h:config.in)
+AC_CHECK_HEADERS(inttypes.h \
+ stdint.h stdlib.h \
+ ftw.h unistd.h sys/stat.h sys/types.h \
+ string.h strings.h memory.h)
+AC_HEADER_STDC
+
AC_ARG_ENABLE(shared,
[ --disable-shared don't provide a shared libgcc],
[
Index: libgcov-util.c
===================================================================
--- libgcov-util.c (Revision 220969)
+++ libgcov-util.c (Arbeitskopie)
@@ -52,7 +52,9 @@ void gcov_set_verbose (void)
#include "obstack.h"
#include <unistd.h>
+#ifdef HAVE_FTW_H
#include <ftw.h>
+#endif
static void tag_function (unsigned, unsigned);
static void tag_blocks (unsigned, unsigned);
@@ -380,6 +382,7 @@ read_gcda_file (const char *filename)
return obj_info;
}
+#ifdef HAVE_FTW_H
/* This will be called by ftw(). It opens and read a gcda file FILENAME.
Return a non-zero value to stop the tree walk. */
@@ -417,6 +420,7 @@ ftw_read_file (const char *filename,
return 0;
}
+#endif
/* Initializer for reading a profile dir. */
@@ -451,7 +455,9 @@ gcov_read_profile_dir (const char* dir_name, int r
fnotice (stderr, "%s is not a directory\n", dir_name);
return NULL;
}
+#ifdef HAVE_FTW_H
ftw (".", ftw_read_file, 50);
+#endif
ret = chdir (pwd);
free (pwd);
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch]: Fix Bug 65038 - [regression 5] Unable to find ftw.h for libgcov-util.c
2015-02-26 14:58 [patch]: Fix Bug 65038 - [regression 5] Unable to find ftw.h for libgcov-util.c Kai Tietz
@ 2015-02-27 13:31 ` Kai Tietz
2015-02-27 14:13 ` H.J. Lu
1 sibling, 0 replies; 4+ messages in thread
From: Kai Tietz @ 2015-02-27 13:31 UTC (permalink / raw)
To: GCC Patches; +Cc: terry.gua
Applied at rev.revision 221055.
--
Kai
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch]: Fix Bug 65038 - [regression 5] Unable to find ftw.h for libgcov-util.c
2015-02-26 14:58 [patch]: Fix Bug 65038 - [regression 5] Unable to find ftw.h for libgcov-util.c Kai Tietz
2015-02-27 13:31 ` Kai Tietz
@ 2015-02-27 14:13 ` H.J. Lu
2015-02-27 14:40 ` Kai Tietz
1 sibling, 1 reply; 4+ messages in thread
From: H.J. Lu @ 2015-02-27 14:13 UTC (permalink / raw)
To: Kai Tietz; +Cc: GCC Patches, terry.gua
On Thu, Feb 26, 2015 at 6:49 AM, Kai Tietz <ktietz70@googlemail.com> wrote:
> Hi,
>
> This is the remaining fix for re-enabling native boostrap for
> Windows-variant of gcc without disabling -Werror for libgcc.
>
> ChangeLog
>
> 2015-02-26 Kai Tietz <ktietz@redhat.com>
>
> PR target/65038
> * config.in: Regenerated.
> * configure: Likewise.
> * configure.ac (AC_HEADER_STDC): Add explicit.
> (AC_CHECK_HEADERS): Check for default headers
> plus for ftw.h one.
> * libgcov-util.c (gcov_read_profile_dir): Disable use
> of ftw-function, if header not found.
> (ftw_read_file): Don't translate if ftw header isn't
> present.
>
> Regression-tested for x86_64-unknown-linux-gnu. Bootstrapped for
> i686-pc-mingw32.
> I will apply soon, if there are no objections.
I believe it breaks bootstrap on Linux/x86:
https://gcc.gnu.org/ml/gcc-regression/2015-02/msg00580.html
--
H.J.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch]: Fix Bug 65038 - [regression 5] Unable to find ftw.h for libgcov-util.c
2015-02-27 14:13 ` H.J. Lu
@ 2015-02-27 14:40 ` Kai Tietz
0 siblings, 0 replies; 4+ messages in thread
From: Kai Tietz @ 2015-02-27 14:40 UTC (permalink / raw)
To: H.J. Lu; +Cc: GCC Patches, terry.gua
2015-02-27 14:48 GMT+01:00 H.J. Lu <hjl.tools@gmail.com>:
> On Thu, Feb 26, 2015 at 6:49 AM, Kai Tietz <ktietz70@googlemail.com> wrote:
>> Hi,
>>
>> This is the remaining fix for re-enabling native boostrap for
>> Windows-variant of gcc without disabling -Werror for libgcc.
>>
>> ChangeLog
>>
>> 2015-02-26 Kai Tietz <ktietz@redhat.com>
>>
>> PR target/65038
>> * config.in: Regenerated.
>> * configure: Likewise.
>> * configure.ac (AC_HEADER_STDC): Add explicit.
>> (AC_CHECK_HEADERS): Check for default headers
>> plus for ftw.h one.
>> * libgcov-util.c (gcov_read_profile_dir): Disable use
>> of ftw-function, if header not found.
>> (ftw_read_file): Don't translate if ftw header isn't
>> present.
>>
>> Regression-tested for x86_64-unknown-linux-gnu. Bootstrapped for
>> i686-pc-mingw32.
>> I will apply soon, if there are no objections.
>
> I believe it breaks bootstrap on Linux/x86:
>
> https://gcc.gnu.org/ml/gcc-regression/2015-02/msg00580.html
>
> --
> H.J.
Already fixed. See bug
--
Kai
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-02-27 14:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-26 14:58 [patch]: Fix Bug 65038 - [regression 5] Unable to find ftw.h for libgcov-util.c Kai Tietz
2015-02-27 13:31 ` Kai Tietz
2015-02-27 14:13 ` H.J. Lu
2015-02-27 14:40 ` Kai Tietz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).