diff --git a/Documentation/README.Linux.md b/Documentation/README.Linux.md index 049cd9268..06e6c20d2 100644 --- a/Documentation/README.Linux.md +++ b/Documentation/README.Linux.md @@ -12,8 +12,10 @@ For the Linux/PowerPC port, see For the Linux/Motorola 68000 port, see [README.Linux-m68k.md](README.Linux-m68k.md). -(Ports to Linux on other architectures have not yet -been attempted, but should not be difficult.) +(Ports to Linux on other architectures have not yet been attempted, but should +not be difficult.) + +If you are installing on x86, then also see [README.x86.md](README.x86.md). Building a 32-bit Mercury Compiler on 64-bit Linux -------------------------------------------------- diff --git a/Documentation/README.x86 b/Documentation/README.x86 deleted file mode 100644 index 41009d722..000000000 --- a/Documentation/README.x86 +++ /dev/null @@ -1,24 +0,0 @@ -Due to improvements in GCC, the following combination is not supported: - - - GCC version 5 and above - - x86 - - PIC (position-independent code) - - low-level C grades using non-local gotos, i.e. asm_fast.* - -The configure script will not select asm_fast grades when the above combination -is detected. If you try to use that combination by selecting an asm_fast grade -manually, you will encounter compilation errors. - -We recommend using high-level C grades (hlc.*) on x86. If you require a -low-level C grade, e.g. for debugging, then you can use a reg.* grade. - -If you must use an asm_fast grade, you will need to tell the C compiler not to -generate position-independent code (which may be the default), *and* disable -building of shared libraries. Alternatively, you could downgrade to gcc 4.9. - -Note that Windows is unaffected by this issue as Windows does not use PIC, -and we do not yet support shared libraries (DLLs) on Windows anyway. - -Also note x86-64 is not affected by this issue, only x86. - - diff --git a/Documentation/README.x86.md b/Documentation/README.x86.md new file mode 100644 index 000000000..c1e2d4e78 --- /dev/null +++ b/Documentation/README.x86.md @@ -0,0 +1,30 @@ +Mercury on x86 +-------------- + +This file contains a note for users who are installing Mercury on x86 systems +that use ELF shared libraries. Note that the x86-64 is *not* affected by +the issue described below, only x86. + +Due to improvements in GCC, the following combination is not supported: + +- GCC version 5 and above +- x86 +- PIC (position-independent code) +- Low-level C grades using non-local gotos, i.e. `asm_fast.*` + +The configure script will not select `asm_fast` grades when the above +combination is detected. If you try to use that combination by selecting an +`asm_fast` grade manually, then you will encounter compilation errors. + +We recommend using high-level C grades (`hlc.*`) on x86. If you require a +low-level C grade, e.g. for debugging, then you can use a `reg.*` grade. + +If you must use an `asm_fast` grade, then you will need to tell the C compiler +not to generate position-independent code (which may be the default), *and* +disable building of shared libraries. Alternatively, you could downgrade to +GCC version 4.9. + +Note that Windows is unaffected by this issue as Windows does not use PIC, +and we do not yet support shared libraries (DLLs) on Windows anyway. + +See for further details. diff --git a/README.md b/README.md index 078fdbf94..1ae3ee39e 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ Specific information is contained in individual README files in the * Other platform information * [Cross compilation](Documentation/README.cross.md) * [Docker](Documentation/README.Docker) - * [x86](Documentation/README.x86) + * [x86](Documentation/README.x86.md) ## Other information