Commit Graph

15 Commits

Author SHA1 Message Date
Simon Taylor
886d2ae474 Make it easier to use shared libraries on x86 with
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.
2003-01-23 00:24:20 +00:00
Fergus Henderson
cc3dab98d9 Fix various problems, mostly minor, with the README* files.
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'.
1999-12-19 15:54:29 +00:00
Tyson Dowd
f1dbac2c98 Use ml --shared' rather than ml --mercury-libs shared'
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).
1999-03-16 05:09:26 +00:00
Tyson Dowd
197ac9b879 Document that you should use --shared, not just --mercury-libs
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.
1998-10-24 04:53:12 +00:00
Fergus Henderson
9ad1bdf0da Various changes to the README files, in preparation for the next release.
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.
1998-09-04 06:26:49 +00:00
Tyson Dowd
b80d41c0c2 Remove the libc6 detection routines. It appears the new upstream version
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.
1998-05-31 03:59:09 +00:00
Fergus Henderson
ca3fdbe712 Document a patch needed to make things work on Linux/Alpha.
Estimated hours taken: 0.25

README.Linux-Alpha:
	Document a patch needed to make things work on Linux/Alpha.

README.Linux:
	Point to README.Linux-Alpha.
1998-04-08 13:55:44 +00:00
Tyson Dowd
2d2f9f358b Fix the boehm_gc problem with libc6 on Linux systems.
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.
1998-02-11 03:57:56 +00:00
Fergus Henderson
cc67e23be6 Fix a problem with the #ifdefs so that it works on hydra.
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.
1997-11-24 06:31:25 +00:00
Fergus Henderson
31a6e1f1df Correct the patch to boehm_gc/os_dep.c, which had somehow become
Estimated hours taken: 0.25

README.Linux:
	Correct the patch to boehm_gc/os_dep.c, which had somehow become
	malformed.
1997-10-15 10:08:13 +00:00
Fergus Henderson
450c2a6373 Change mgnuc and ml to support the same
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.
1997-10-08 13:15:39 +00:00
Fergus Henderson
d4564d0ef9 s/mc/mmc/
Estimated hours taken: 0.1

README.Linux:
	s/mc/mmc/
1997-08-08 20:14:16 +00:00
Fergus Henderson
2531ce5f16 Add patch for boehm_gc/os_dep.c to get it to work with libc6.
Estimated hours taken: 0.5

README.Linux:
	Add patch for boehm_gc/os_dep.c to get it to work with libc6.
1997-08-08 20:11:34 +00:00
Fergus Henderson
46fbd4f733 Improve the support for shared libraries on Linux ELF.
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.
1997-02-10 17:04:02 +00:00
Fergus Henderson
3defb69b7b Finish off the stuff needed to support ELF shared libraries on Linux.
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.)
1997-02-09 05:57:20 +00:00