Added documentation of a workaround for problems linking large

Estimated hours taken: 2 + many (20ish) looking at GCC, Darwin, PPC, etc.
Branches: main

README.MacOS:
	Added documentation of a workaround for problems linking large
	executables on PPC Darwin; read it for more info.
This commit is contained in:
Ben Schmidt
2007-01-11 02:18:29 +00:00
parent 8db666755f
commit f00a335697

View File

@@ -57,9 +57,19 @@ source or binary distributions. (Also, make sure to use GNU tar if/when
*building* such distributions!) The version of tar that comes with Mac OS X
10.3.3 doesn't have this problem.
The linker on OS X may also have problems linking large executables in debug
grades. This affects all versions of ld that we have tested and there is
currently no known workaround.
On PowerPC machines, the linker may have problems linking large executables
(particularly in debug grades; technically when the program requires a branch
larger than +/- 32 MB). It complains about relocation displacements being too
large. The only known workaround for this problem is to replace the
system-provided versions of crt1.o (Darwin module 'Csu') and crt2.o (part of
gcc) with versions that are compiled with the gcc options `-mlongcall' and (if
using gcc < ~ 3.4) `-mlong-branch'. C code generated by the Mercury compiler
will also need to be compiled with the above options. This can be achieved by
adding:
EXTRA_CFLAGS=-mlongcall -mlong-branch
to your Mercury.options or Mmakefile.
-----------------------------------
Known bugs and unsupported features