[m-rev.] for review: Document experience on AIX.

Julien Fischer jfischer at opturion.com
Mon Jul 14 14:06:36 AEST 2014


Hi Peter,

On Mon, 14 Jul 2014, Peter Wang wrote:

> On Fri, 11 Jul 2014 18:15:38 +1000, Julien Fischer <jfischer at opturion.com> wrote:
>>>
>>> You may need to use the IBM C compiler instead of gcc.  Pass
>>> "--with-cc=xlc"
>>> when configuring the Mercury installation, and use high-level C grades
>>> for better performance.
>>>
>>
>> One issue here is that the configure script, Mercury.options, mgnuc script,
>> compiler/compiile_target_code.m
>> and probably other places won't recognise xlc as a type of C compiler --
>> the type should default
>> to unknown, but may incorrectly default to GCC in spots.
>
> I found one instance with grep -i for "compiler[-_ ]type",
> in reserve_stack_size_flags.

I'm not sure what you grepped there.  I count at least six uses of
get_c_compiler_type in compiler/compile_target_code.m (admittedly, most
of them are workarounds for Visual C weirdness).

I suggest adding a cc_xlc alternative to the type
globals.c_compiler_type and also recognising the options variable
XLC_FLAGS (we already support GCC_FLAGS, CLANG_FLAGS etc).

> Here is an updated document for review.

That's fine although most of the various workarounds could (and should
IMO) be applied by automatically if we recognised xlc as a separate sort
of C compiler.  (Incidentally, I believe xlc has a GCC compatibility
wrapper.

For GCC 4.2 on AIX, I think you should make the configure script print
an error message saying that the version of GCC is too ancient and
broken and then abort.

Cheers,
Julien.



More information about the reviews mailing list