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 Tue, Jul 29, 2014 at 9:46 PM, Mike Stump <mikestump@comcast.net> wrote:
> 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?

Sure - patches welcome.  You could also use _POSIX_C_SOURCE >= 2
|| _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE which I'm sure
your newlib provide anyway(?)

Richard.


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