This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Further cleanup loop-distribution


On Sep 12, 2013, at 1:47 AM, Richard Biener <rguenther@suse.de> wrote:
> ! #if 0
> !   FILE *file = fopen ("/tmp/rdg.dot", "w");
> !   gcc_assert (file != NULL);
> ! 
>    dot_rdg_1 (file, rdg);
> !   fclose (file);
> ! 
> !   system ("dotty /tmp/rdg.dot &");
>  #else
>    dot_rdg_1 (stderr, rdg);
>  #endif
> --- 276,290 ----
>  DEBUG_FUNCTION void
>  dot_rdg (struct graph *rdg)
>  {
> !   /* When debugging, you may want to enable the following code.  */
> ! #if 1
> !   FILE *file = popen("dot -Tx11", "w");
> !   if (!file)
> !     return;
>    dot_rdg_1 (file, rdg);
> !   fflush (file);
> !   close (fileno (file));
> !   pclose (file);
>  #else
>    dot_rdg_1 (stderr, rdg);
>  #endif

So I do compiler testing on my toaster oven by doing native builds of gcc running on a binutils simulator and it doesn’t have a working popen (it’s in my newlib, but it wants vfork, which I don’t have).  I do have fork and system however.  :-) Could we replace the if 1 with if HAVE_popen where that is done by an autoconf link test?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]