[m-rev.] testing for gcc (was Re: diff: MacOS changes
Fergus Henderson
fjh at cs.mu.OZ.AU
Fri Oct 18 20:07:41 AEST 2002
On 18-Oct-2002, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> On 23-Sep-2002, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > Note that the support for overriding the configured C compiler doesn't
> > completely work at the moment; CFLAGS_FOR_GOTOS, CFLAGS_FOR_REGS, and
> > CFLAGS_FOR_THREADS will get set based on the configured C compiler,
> > and they may be wrong for a different C compiler.
>
> I'm currently working on eliminating some Cygwin dependencies by
> implementing the ml and c2init scripts in the compiler, and the
> duplication caused by the partial attempt to allow overriding the
> C compiler (in configure.in, scripts/mgnuc.in, scripts/ml.in and
> compiler/compile_target_code.m) is a bit of a pain.
>
> Given that overriding the C compiler doesn't work properly anyway,
> would anyone (Fergus) complain if I moved all of the compiler-dependent
> code into configure.in?
Well, it works fine in the case where you configured with gcc, and the
other C compiler is not gcc, and you don't need a `.par' grade. This is
the common case, IMHO. So yes, I would not like to lose this feature.
I'd rather fix the cases which don't work.
There's obviously going to be some duplication between
compile_target_code.m and mgnuc.in/ml.in, since compile_target_code.m
basically reimplements all of mgnuc.in (and, after your change, ml.in)
in Mercury rather than Bourne shell. But I don't see that as a major issue.
I don't think there is code duplication between any of configure.in, mgnuc.in,
and ml.in, is there? Maybe you are just referring to the fact that the
compiler-dependent code is split between these three files. If you want
to move it out into a separate script, I wouldn't have a problem with that.
> Overriding the C compiler would then require
> generating a copy of the scripts with the correct configuration for
> that C compiler (with `mmc --make' only the mmc script would need
> to be generated).
By the time you've removed the `--cc' option, mentioned this in the NEWS
file, updated the "Using other C compilers" section of the user guide, etc.
I don't think this would be any easier than just keeping things as they
are and duplicating the mgnuc/ml logic in compile_target_code.m.
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list