mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-10 11:23:15 +00:00
70 lines
2.3 KiB
Plaintext
70 lines
2.3 KiB
Plaintext
-----------------------------------------------------------------------------
|
|
|
|
Mercury was tested on AIX in 2014.
|
|
|
|
* AIX 7.1 on POWER7 processor
|
|
* using xlc (IBM C compiler) or gcc 4.8.2
|
|
* in grades hlc.gc, reg.gc, none.gc
|
|
|
|
You must have GNU make, flex and bison. RPMS are available from:
|
|
|
|
<http://www.ibm.com/systems/power/software/aix/linux/>
|
|
|
|
More recent packages, including GCC, are available from:
|
|
|
|
<http://www.perzl.org/aix/index.php>
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
LIBATOMIC_OPS WORKAROUND
|
|
|
|
libatomic_ops does not build correctly. One workaround is to set
|
|
AO_USE_PTHREAD_DEFS by modifying boehm_gc/build_atomic_ops.sh:
|
|
|
|
CFLAGS="-DAO_USE_PTHREAD_DEFS" \
|
|
./configure --prefix=$P --libdir=$P/lib "$@"
|
|
|
|
It is not recommended to use parallel Mercury grades in this configuration,
|
|
if they even build. They currently do not.
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
BUILDING WITH IBM XL C COMPILER
|
|
|
|
To use the IBM C compiler, pass "--with-cc=xlc" when configuring Mercury
|
|
installation. Use high-level C grades for better performance.
|
|
|
|
Low-level C grades will overflow the default TOC data structure. To use a
|
|
large TOC, you can pass the option `-qpic=large' to the C compiler and the
|
|
linker, or the option `-bbigtoc' to the linker.
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
BUILDING WITH GCC
|
|
|
|
gcc 4.2.0, as provided by IBM, is very old and will not work. It crashes on
|
|
long function names, which the Mercury compiler generates an abundance of.
|
|
|
|
gcc 4.8.2 does work, but requires some workarounds:
|
|
|
|
* The configure test "checking whether we can use gcc labels..." enters
|
|
an infinite loop. Hit ^C to fail the test and continue.
|
|
`reg.gc' is available but not `asm_fast.gc'.
|
|
|
|
* Low-level C grades will overflow the TOC. Add this to Mmake.params:
|
|
|
|
EXTRA_CFLAGS=-mminimal-toc
|
|
|
|
or perhaps
|
|
|
|
EXTRA_CFLAGS=-mcmodel=medium
|
|
|
|
You would need the same flag when building user programs.
|
|
|
|
* Edit the `mgnuc' script to delete instances of `-ansi' to prevent
|
|
compilation problems. Pass `--no-ansi-c' when using `mmc --make'.
|
|
|
|
* gcc generates some spurious warnings about uninitialized variables.
|
|
|
|
-----------------------------------------------------------------------------
|