Estimated hours taken: 0.5
scripts/{c2init,mnc,mnl,msc,msl}.in:
Fix a portability problem: ULTRIX's /bin/sh does not understand
`shift 2', so I've replaced all occurrences of this with
`shift; shift'. (Thanks to Jeff Schultz for the bug report.)
Estimated hours taken: 0.1
Plus lots of debugging time
scripts/mc.in
Always pass --bits-per-word 32, since for some reason
--bits-per-word 64 causes the compiler to generate incorrect
code for lookup switches.
Estimated hours taken: 0.25
(plus 0.75 debugging)
scripts/mc.in:
Pass the configured value of --bytes-per-word.
Also fix a missing line for --bits-per-word.
Estimated hours taken: 0.1
scripts/mc.in:
Pass the number of bits in a word as a configured parameter
to mercury_compile instead of using the default (32). Ports
to 16 bit achitectures should now work ;-)
Estimated hours taken: 0.1
scripts/rs6000_hack:
Remove llds.c from the list of files to fix, since it doesn't
need to be fixed, and the script barfs if it tries to split 0
pieces off a file. (The set of files that need to be fixed
seems to be sensitive to the compilation options used.)
Estimated hours taken: 0.25
scripts/mgnuc.in:
Fix a bug in, and improve the documentation of, my previous
change to use `-fPIC' rather than `-fpic' on solaris2 in grade none.
Estimated hours taken: 0.25
scripts/mgnuc.in:
On sparc-sun-solaris*, we need to use `-fPIC' rather than `-fpic'
for grade `none', to avoid overflowing a fixed limit on the number
of "small pic" references.
Estimated hours taken: 1
scripts/mtags:
Generate tags for functors (constructors).
Also, generally reorganize the code and document parts of it a
bit better. I also added code to warn about duplicate
definitions, but such warnings are probably just a pain,
so I turned them off.
Estimated hours taken: 0.2
mc.in:
Transmit the --num-real-r-regs, --num-real-temps and
--branch-delay-slot options from autoconfiguration to mercury_compile.
Estimated hours taken: 2
scripts/Mmake.rules:
Change the rules for building `.pic_o' to avoid some problems
with parallel makes. In particular, the stuff for removing
the intermediate `.c' files was causing some trouble.
Estimated hours taken: 1
scripts/rs6000_hack:
Add a script to work around fixed limits in the RS/6000 object
file format by chopping up large C files into smaller pieces.
Estimated hours taken: 0.5
Fix a security problem with the use of `chmod +w'.
{scripts,runtime}/Mmake:
Use `chmod u+w' rather than `chmod +w' on the installed files,
since `chmod +w' has the wrong effect with some versions of chmod.
When configure creates automatically-generated files, we do a
`chmod -w' on them to make sure that you don't accidentally edit
the automatically-generated file rather than the source `.in' file.
However, if the installed copies are write-only, then it causes
problems when installing a new copy on top of an old one.
Hence we turn write permission back on again on the installed copies.
The `chmod +w' command has the right effect on Solaris, OSF/1, and
SunOS, where it takes into account the umask. However, on IRIX and
ULTRIX, `chmod +w' does not take the umask into account, and so
makes the files world-writable, which is a security problem.
Hence, we now use `chmod u+w' instead.
Estimated hours taken: 0.25
scripts/mgnuc.in:
Add another work-around for a gcc-2.6.3 bug, this time to avoid
a gcc abort when compiling compiler/modules.c with -O2 on the
alpha. Note that this bug only seems to be triggered if
modules.m is compiled with mc -O3 (i.e. with value numbering
enabled), which is why it wasn't encountered before.
The problem does not occur with gcc-2.7.2, but we should leave
the work-around in so that people who only have gcc-2.6.3 can
install the system.
Estimated hours taken: 0.25
Fix a problem detected by the auto-test script on munta.
scripts/mgnuc.in:
The work-around for the gcc-2.6.3 bug on mips in which
it reports an internal error when compiling `int.c' with -O2,
where the mgnuc script checks for the name `int.c' and if so
uses -O1 rather than -O2, did not succeed the library was
compiled with --split-c-files, because the file on which gcc
died was now named `int.dir/int_002.c'. I've fixed the
mgnuc script to check for `int.dir/int_*.c' as well as `int.c'.
Estimated hours taken: 1 summer studentship
scripts/ml.in:
Handle the new set of grades (*.cnstr).
scripts/mgnuc.in:
Pass -DCONSTRAINTS if the grade is *.cnstr
Estimated hours taken: 0.1
scripts/Mmake.rules:
In the rule for compiling with --split-c-files, make sure that
we remove the old object files before we recompile. This is
necessary in case you removed some predicates from the source
file, in which case there will be fewer object files produced --
we need to make sure that we don't leave old ones lying around.
Estimated hours taken: 0.25
Fix bug reported by Peter Szeredi which meant that SICStus debugging
didn't work.
scripts/msl.in:
Don't link with portray.ql, since that is already part of
library.sicstus.debug.
rename `libgc.prof.{a,so}' as `libgc_prof.{a,so}',
because SunOS 4.1.3 doesn't seem to like library names with `.' in them.
scripts/ml.in:
Link with -lgc_prof rather than -lgc.prof for `.prof' grades.
Estimated hours taken: 0.1
scripts/Mmake:
In the rule for `mmake install', make sure we remove the installed
copy of `Mmake.vars' before copying over the new one, since it is
create without write permissions.
Estimated hours taken: 1
Ensure that mmake does not attempt to remake the `.c' file if it is up-to-date.
(This change should hopefully fix a problem with the source distribution not
being able to bootstrap itself.)
Also a couple of minor tidy-ups.
scripts/mmake.in:
Export new variable MMAKE_MAKE_CMD, for use by Mmake.rules.
scripts/Mmake.rules:
In the rule for `.m' -> `.o', use a recursive invocatino of
make (via the MMAKE_MAKE_CMD variable) to build the `.c' file,
rather than unconditionally invoking `$(MCG)'.
scripts/.cvsignore:
Add Mmake.vars, since it is now automatically-generated.
scripts/ml.in:
Some stylistic changes: make sure that autoconf @var@ variables occur
only in assignments to shell variables at the start of the script,
not scattered throughout the body of the script.
Estimated hours taken: 1.5
Undo dylan's changes in the names of some library entities,
by applying the following sed script
s/term_atom/term__atom/g
s/term_string/term__string/g
s/term_integer/term__integer/g
s/term_float/term__float/g
s/term_context/term__context/g
s/term_functor/term__functor/g
s/term_variable/term__variable/g
s/_term__/_term_/g
s/std_util__bool_/bool__/g
to all the `.m' and `.pp' files in the compiler and library directories.
The reason for undoing these changes was to minimize incompatibilities
with 0.4 (and besides, the changes were not a really good idea in the first
place).
I also moved `bool' from std_util.m to a separate module.
The main reason for that change is to ensure that the `__' prefix is
only used when it genuinely represents a module qualifier.
(That's what dylan's changes were trying to acheive, but `term__'
does genuinely represent a module qualifier.)
scripts/replace_library___.sed_script.m:
Contains the above sed script.
I added `s/_term__/_term_/g' so that it doesn't change
`type_to_term_float' etc.
Estimated hours taken: 2
Add a work-around for a gcc bug.
(gcc 2.7.0 mis-compiled parser.c.)
scripts/mgnuc.in:
Make sure we compile parser.c with -O0 if we're using gcc on a sparc.
Estimated hours taken: 0.1
scripts/msp.in:
Invoke `library.sicstus.debug' rather than `library.sicstus'.
(The only difference is that `library.sicstus' prints
out a nice prompt. This difference is not worth the 2M of
disk space that `library.sicstus' occupies.)
Estimated hours taken: 0.5
scripts/Mmake.vars.in:
the assignment to VPATH was being clobbered by a misfeature
in autoconf. Hack the line to workaround the bug.
The misfeature in autoconf is a workaround for a bug in SUN
make. :-(
Estimated hours taken: 0.5
Change a couple of shell/make variable names,
and moved some configuration stuff around.
scripts/Mmake.rules Mmake.vars.in:
Changed some variable names.
Changed a couple of configuration things for shared libraries.
Estimated hours taken: 2
Make sure that `mc -c' passes the correct machine- and grade-specific
options to the C compiler.
configure.in:
Set CFLAGS_FOR_REGS and CFLAGS_FOR_GOTOS to any special
gcc options required for the use of gcc global registers and gcc
nonlocal gotos respectively.
scripts/mc.in:
Pass the values of CFLAGS_FOR_REGS and CFLAGS_FOR_GOTOS to
mercury_compile.
compiler/options.m:
Add new options for passing CFLAGS_FOR_REGS and CFLAGS_FOR_GOTOS.
compiler/mercury_compile.pp:
Pass the CFLAGS_FOR_REGS and/or CFLAGS_FOR_GOTOS to the C compiler,
if appropriate.
Estimated hours taken: 10
Some scripts to change some labels of the format foo__bar to
module__foo_bar, in both the library and the compiler. None of these
scripts are executable, and need to be run with
~fjh/bin/scripts/apply_sed_script. The scope of files listed below is
an indication of the files affected when these scripts are run on
mercury/*/*.[mp]*.
scripts/remove____from_compiler.sedscript
Remove instances of foo__bar from .m and .pp files in the
compiler/ directory.
scripts/remove____from_library.sedscript
romove instances of foo__bar from .m files in the library/
and compiler/ directories.
scripts/replace_compiler___.sedscript
Undo the compiler-specific changes above.
scripts/replace_library___.sedscript
Undo the library changes in the compiler/ and library/
directories.
automatically generated `.c' files lying around. (The aim of this
change is to cut down on disk space usage!)
scripts/Mmake.vars:
Add `RM_C' variable to specify whether or not the `.c' files
should be removed.
scripts/Mmake.rules:
Add rule for creating `.o' files directly from the `.m' files,
using $(RM_C) to delete the intermediate `.c' file.
Estimated hours taken: 0.3
Fix bug in which `mmake' would pass the same option twice to `mc'.
scripts/Mmake.rules
When invoking `mc --make-interface', don't pass both
$(MCFLAGS), since $(MCIFLAGS) already includes $(MCFLAGS).
can avoid bootstrapping problems. Instead of getting configuration
paramters from `conf.m.in', they are now passed via the `mc' script.
Also renamed the `num_real_regs' option to `num_real_r_regs',
to avoid confusion with the NUM_REAL_REGS macro set in runtime/machdeps/*.h
(which has a different meaning).
scripts/mc.in:
Pass the value of @LOW_TAG_BITS@ (as determined by the configure
script) to mercury_compile using the --conf-low-tag-bits option,
and pass the value of @NUM_REAL_R_REGS@ as the default value
of the --num-real-r-regs option.