Estimated hours taken: 1
Branches: main, release
README.MacOS:
Update this file as we now have a lot more experience using Mercury
on this platform.
Mention which versions of gcc are known to be comptabile with Mercury
(and also some that aren't).
Mention the problem with Apple's linker and linking large executables,
like the compiler in debug grades.
Explain why statically linking against system libraries won't work.
Add section on the Mac OS X specific parts necessary for setting up
the deep profiler. Also mention that Safari 1.5 is particularly stable
with the deep profiler.
Estimated hours taken: 20
Branches: main
Changes to get shared libraries to work on Mac OS X (Darwin).
This is phase 2 of 2. Phase 1 added the compiler options described below.
Phase 2 uses these compiler options in the configuration scripts.
Darwin shared libraries have the extension `dylib' instead of `so'. Also
objects that link to a shared library on Darwin don't need to be told the
runtime path in which they should look for the libraries, instead the
shared libraries themselves remember where they will be eventually installed
(called the install-name) and any object which links in the shared library will
get the install-name from the shared library at link time. When a shared
library is built it has to be told where it will be installed which is what
the libtool -install_name option is used for on Darwin.
This diff only enables shared libraries on Darwin, not "bundles" which are
shared objects that can be loaded dynamically at runtime using something like
dlopen. Therefore the interactive query tool in the debugger still doesn't
work on Mac OS X.
Added three new compiler options :
--shlib-linker-use-install-name :
A boolean flag to tell the compiler to use the -install_name option
when building shared libraries. When this flag is set the following
options have no effect: --linker-rpath-flag, --linker-rpath-separator,
--shlib-linker-rpath-flag, --shlib-linker-rpath-separator.
--shlib-linker-install-name-flag :
The flag name to use ("-install_name" for Darwin).
--shlib-linker-install-name-path :
The path where the shared library will eventually end up, excluding the
file name. The file name is appended to the end before the option
is passed on to the linker.
Mmake.common.in
Added variables used for install-name on/off switch and flag name.
NEWS
Mentioned shared libs working now on Mac OS X.
README.MacOS
Removed bit about shared libs not working in Mac OS X.
configure.in
Make shared libs the default when on Darwin and the compiler is gcc.
boehm_gc/Makefile
boehm_gc/Makefile.direct
Added rule to make libgc.dylib and set the install-name correctly.
boehm_gc/Mmakefile
Set variable used in boehm_gc/Makefile to get the final install path
of the gc shared lib.
browser/Mercury.options
Added mer_mdbcomp library for target libmer_browser.dylib.
browser/Mmakefile
Added --shlib-linker-install-name-path option to MC options.
doc/user_guide.texi
Documented the --shlib-linker-install-name-path option. The other
options will be automatically set by the configure script and
should never need to be set by the user, so they're not documented in
the user guide.
runtime/Mmakefile
Added rule to make the Darwin shared library.
scripts/Mercury.config.bootstrap.in
Added default values for --shlib-linker-use-install-name and
--shlib-linker-install-name-flag.
scripts/Mercury.config.in
Added default values for --shlib-linker-use-install-name and
--shlib-linker-install-name-flag.
trace/Mmakefile
Added rule to make the Darwin shared library.
Estimated hours taken: 0:10
Notes on compiling Mercury on MacOS 10.3
README.MacOS:
New version of tar seems to work fine.
Mercury compiles using gcc 3.4.
Estimated hours taken: 1
Branches: main
Some more changes for MacOS.
aclocal.m4:
Define a macro MERCURY_CHECK_CC_NEEDS_CPP_PRECOMP,
to check whether we need to append `-traditional-cpp' to $CC.
configure.in:
bindist/bindist.configure.in:
Use the new macro.
README.MacOS:
Update the documentation: users don't need to configure using
`--with-cc="cc --traditional-cpp"' any more.