Re: [perl #41168] graceful "no compiler" error message? It's not a good assumption that the default result of a C compilation
is named "a.out".  On Cygwin, e.g., it's a.exe.  Some compilers
default to filename.exe or bare filename (when compiling filename.c).
I think you may have to assume that it accepts the -o option and give
the tested-for executable an explicit name.


On 6/5/07, Andy Spieherty  wrote:
> On Mon, 4 Jun 2007, James Keenan via RT wrote:
>
> > On Fri Jun 01 09:29:18 2007, chromatic  at wgz.org wrote:
> > > This patch is very close.  Instead of handling compilation manually, I
> > > recommend instead using cc_gen() and cc_build() from
> > > Parrot::Configure::Step.
> > > See config/auto/sizes.pm for an example.
>
> > Can you explain why using these functions would be the better course?  In
> particular, how
> > would this approach square with the criticism Andy Spieherty made earlier
> in this thread on
> > March 21:
> >
> > > + unless ( eval { cc_build(); 1 } ) {
> > > + warn "Compilation failed with '$cc'\\n";
> > > + exit 1;
> > > + }
> >
> > > This has two problems. First, it ignores the return value of cc_build().
> > > That's understandable at the moment since cc_build doesn't seem to have
> a
> > > documented return value. It should, of course.
>
> I agree with chromatic -- I'd simply add that the cc_build() function
> should be improved to have a meaningful return value, not that it should
> be avoided.
>
> --
>     Andy Spieherty		spiehera@lafayette.edu
>


-- 
Mark J. Reed 
