Estimated hours taken: 20
Branches: main
Make it easier to use shared libraries on x86 with
`mmc --make'.
There is now a third kind of object file, `.lpic_o'.
These files are compiled with `--pic-reg' but not with
CFLAGS_FOR_PIC, so they can be linked with shared Mercury
libraries.
On x86, executables which are linked with shared Mercury
libraries now depend on $(main_module.lpic_os), not
$(main_module.os).
This doesn't work with Mmake because ml doesn't know
which libraries are Mercury libraries, so it can't
link with the static versions of those libraries if
MERCURY_LINKAGE is set to "static".
configure.in:
bindist/bindist.configure.in:
bindist/bindist.build_vars.in:
Work out whether `.lpic_o' files are needed.
compiler/modules.m:
Add `.lpic_o' to the list of grade or architecture
dependent files.
NEWS:
README.Linux:
compiler/options.m:
doc/user_guide.texi:
Document MERCURY_LINKAGE, LINKAGE, --linkage,
--mercury-linkage and -R.
compiler/options_file.m:
compiler/make.program_target.m:
Handle LINKAGE and MERCURY_LINKAGE variables.
Allow LIBGRADES, LINKAGE and MERCURY_LINKAGE to be target-specific.
scripts/mmc.in:
Set up the default linkage using the MERCURY_LINKAGE
variable.
compiler/compile_target_code.m:
Build `.lpic_o' files.
Work out which type of object files to link with.
When linking statically with Mercury libraries,
find the absolute pathname for the `.a' file
for each Mercury library, and pass that to ml,
rather than just using `-lname'.
Pass `-R' options to ml for each `-R' option to mmc.
compiler/make.module_target.m:
compiler/make.program_target.m:
compiler/mercury_compile.m:
Specify which type of object files to build.
compiler/make.program_target.m:
compiler/make.module_target.m:
Make sure all generated object files are cleaned up.
compiler/prog_io.m:
Add a better message for files which can't be found.
compiler/make.util.m:
Add `.lpic_o' to the list of extensions.
compiler/Mmakefile:
profiler/Mmakefile:
deep_profiler/Mmakefile:
Pass `--linkage shared' to mmc (`--shared' is in MLFLAGS).
tests/Mmakefile:
tests/mmc_make/Mmakefile:
tests/mmc_make/Mercury.options:
tests/mmc_make/complex_test.{m,exp}:
tests/mmc_make/hello.{m,exp}:
Test `mmc --make'.
tests/lib/complex*.m:
The complex numbers library from the extras distribution,
for use in the mmc_make tests.
Estimated hours taken: 0.75
Fix various problems, mostly minor, with the README* files.
The most significant of these was that the ftp sites listed
in the README file in the binary distribution were out-of-date.
README.Linux:
Fix a typo.
.README.in:
Mention some new README.* files.
Update the version number and copyright dates for the Boehm GC.
bindist/bindist.README:
Update the version number and copyright dates for the Boehm GC.
Update the ftp sites. Update the copyright date.
Update the file names for the Mercury standard library and
runtime library.
bindist/Mmakefile:
Include the files README.OSF1, README.Linux-Alpha, README.Linux-PPC,
and README.Solaris in the binary distribution.
bindist/bindist.README.Linux:
Update to match the changes to README.Linux in the source distribution.
profiler/mercury_profile.m:
Update the copyright date printed by `mprof --help'.
Estimated hours taken: 1
README.Linux:
Use `ml --shared' rather than `ml --mercury-libs shared'
as the latter doesn't work.
Also don't talk worry about the difference between linking
just the Mercury libraries statically/shared -- assume
static or shared is an all-or-nothing concern (which it
probably is for most users).
Estimated hours taken: 0.5
README.Linux:
Document that you should use --shared, not just --mercury-libs
shared, if you want to link statically against other
libraries.
Estimated hours taken: 1
Various changes to the README files, in preparation for the next release.
.README.in:
Update version numbers and copyright dates.
Update the list of README.* files.
README.HPUX:
New file.
README.AIX:
Update to reflect recent bug fix.
README.Linux:
Delete an obsolete patch at the end of this file;
the text describing this patch had been removed already.
README.MS-Windows:
Mention that we haven't tested it on Windows 98.
NEWS:
We've updated to Boehm GC version 4.13alpha2.
extras/README:
Add descriptions of each subdirectory.
Estimated hours taken: 1
Remove the libc6 detection routines. It appears the new upstream version
of Boehm GC handles this correctly now.
README.Linux:
Remove mention of the problem - it shouldn't happen anymore.
configure.in:
Remove the old mercury_boehm_gc
boehm_gc/os_dep.c:
Use the upstream method for checking for libc version using
__GLIBC__.
boehm_gc/mercury_boehm_gc_conf.h.in:
Remove this file, it is no longer necessary.
Estimated hours taken: 2
Fix the boehm_gc problem with libc6 on Linux systems.
This is a Mercury only fix because the boehm_gc doesn't use autoconf.
(It's not the world's most elegant fix, but it does fix the problem).
Mmakefile:
Remove boehm_gc/mercury_boehm_gc_conf.h when cleaning up.
README.Linux:
Update the documentation about this fix.
configure.in:
Check whether we should #include <asm/sigcontext.h> in
the GC.
boehm_gc/os_dep.c:
Only include <asm/sigcontext.h> if it will work.
boehm_gc/mercury_boehm_gc_conf.h.in:
New configuration header file.
Estimated hours taken: 0.5
boehm_gc/os_dep.c:
Fix a problem with the #ifdefs so that it works on hydra.
README.Linux:
Update to reflect recent developments.
README.Linux-PPC:
New file to document the Linux/PowerPC port.
Estimated hours taken: 16
Change mgnuc and ml to support the same
compilation model options as mmc.
Allow the user to mix `--grade foo' options with
other options that affect the grade such as `--profiling'.
Compute the final grade to link with from the options.
Also add a few new options and grade modifiers.
compiler/options.m:
compiler/mercury_compile.m:
Add `--profile-time' and `--profile-calls' options.
Change `--profiling' to now just imply both of those.
Add `--pic-reg' option (just implies `-DPIC_REG' in cflags).
compiler/handle_options.m:
Add support for grade modifiers `.proftime' and `.profcalls'.
Make `.debug' a grade modifier, rather than having a base
grade `debug'.
scripts/init_grade_options.sh-subr:
scripts/parse_grade_options.sh-subr:
New files containing sh subroutines for parsing grade-related
options.
configure.in:
bindist/bindist.configure.in:
Use AC_SUBST_FILE to allow #inclusion of the above-mentioned
`.sh-subr' files.
scripts/ml.in:
scripts/mgnuc.in:
Use the above-mentioned sh subroutines.
scripts/ml.in:
compiler/mercury_compile.m:
compiler/handle_options.m:
Compute the final grade to link with from the various
grade-related options.
scripts/mgnuc.in:
Support the `--inline-alloc' option.
doc/user_guide.texi:
README.Linux:
Document the above changes.
runtime/mach_deps/i386_regs.h:
If `PIC_REG' is defined, don't use %ebx,
even if we're not compiling in PIC.
README.Linux:
Update the documentation: when using shared libraries, it's more
efficient to compile your main program with just `-DPIC_REG'
rather than `-fpic'; `-DPIC_REG' is enough to make it work,
and doesn't slow it down as much as `-fpic' does.
Estimated hours taken: 8
Finish off the stuff needed to support ELF shared libraries on Linux.
mercury/NEWS:
Mention that we now support ELF shared libraries on Linux.
mercury/README.Linux:
Document the use of shared libraries on Linux.
mercury/configure.in:
Enable the use of shared libraries on Linux.
Add some documentation regarding the use of position-independent
code on Solaris.
For systems that don't support shared libraries, set
CFLAGS_FOR_PIC to empty, not `-fpic'. (Previously
CFLAGS_FOR_PIC wasn't used on such systems, but now it
is used when creating boehm_gc/libgc.a.)