mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-15 17:33:38 +00:00
61 lines
1.8 KiB
Plaintext
61 lines
1.8 KiB
Plaintext
-----------------------------------------------------------------------------
|
|
|
|
Mercury was tested on AIX in 2019.
|
|
|
|
* AIX 7.1 on POWER9 processor
|
|
* using gcc version 6.3.0
|
|
* in high-level C grades (hlc.gc, hlc.par.gc)
|
|
|
|
PREREQUISITES
|
|
|
|
Install yum by running this script:
|
|
|
|
https://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/ezinstall/ppc/yum.sh
|
|
|
|
Then install the necessary packages:
|
|
|
|
yum install gcc make flex bison
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
BUILDING WITH GCC
|
|
|
|
GCC defaults to -maix32. To build for the 64-bit AIX ABI, it may be easiest to
|
|
create a shell script containing:
|
|
|
|
exec gcc -maix64 "$@"
|
|
|
|
Mark the script executable, then run configure like this:
|
|
|
|
CC=/path/to/gcc-maix64 ./configure [options]
|
|
|
|
If you are using /usr/bin/ar then you must also set an environment variable:
|
|
|
|
export OBJECT_MODE=64
|
|
|
|
If you try to use GNU ar instead (from binutils) you will run into problems
|
|
when /usr/bin/ranlib is invoked on archives created by GNU ar.
|
|
|
|
The mercury_compile executable will overflow the PowerPC TOC with gcc in its
|
|
default configuration. One solution is to add this to Mmake.params before
|
|
running make:
|
|
|
|
EXTRA_CFLAGS=-mminimal-toc
|
|
|
|
Your own programs may also overflow the TOC, depending on their size.
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
BUILDING WITH IBM XL C COMPILER
|
|
|
|
(Last tested in 2014.)
|
|
|
|
To use the IBM C compiler, pass "--with-cc=xlc" when configuring Mercury
|
|
installation. Use high-level C grades for better performance.
|
|
|
|
Large programs will overflow the TOC. You can try passing the option
|
|
`-qpic=large' to the C compiler and the linker, or passing `-bbigtoc' to the
|
|
linker.
|
|
|
|
-----------------------------------------------------------------------------
|