As discussed in the recent Mercury meeting, remove support for the GCC backend.
It was very much out of date and supporting it proprerly would means having to
track changes to GCC's internals. Furthermore, its presence complicates
building the compiler.
The main thing this change does not address is the fact that we invoke
the compiler through C code, e.g. main.c in the top-level of the source
tree. This was required by the GCC backend and can now be removed, but
I will do that as a separate change.
configure.ac:
Mmake.common.in:
scripts/Mmake.rules:
compiler/Mercury.options:
compiler/Mmakefile:
compiler/gcc.m:
compiler/maybe_mlds_to_gcc.pp:
compiler/mlds_to_gcc.m:
Delete the files containing the GCC backend.
compiler/options.m:
compiler/handle_options.m:
Delete support for `--target asm' and `--pic'.
(The latter was only used by the GCC backend.)
compiler/*.m:
doc/user_guide.texi:
compiler/notes/comiler_design.html:
compiler/notes/work_in_progress.m:
Conform to the above change.
README.gcc-backend.m:
Delete this file.
configure.in:
Rename this to configure.ac which is what current versions
of autotools expect and also doesn't cause warnings to be
emitted by aclocal.
Mmakefile:
scripts/ml.in:
Conform to the above change.
Delete the empty lazy_evaluation directory from extras.
*/.cvsignore:
Make this into .gitignore files.
(Update them where necessary.)
extra/lazy_evalution:
Delete this directory; its former contents were moved
elsewhere some time ago.
Estimated hours taken: 2
Branches: main, 12.08
Sign the all the assemblies in the csharp grade.
mercury.snk:
The strong name key used for signing.
analysis/ANALYSIS_FLAGS.in:
browser/MDB_FLAGS.in:
compiler/COMP_FLAGS.in:
deep_profiler/DEEP_FLAGS.in:
library/LIB_FLAGS.in:
mdbcomp/MDBCOMP_FLAGS.in:
profiler/PROF_FLAGS.in:
slice/SLICE_FLAGS.in:
ssdb/SSDB_FLAGS.in:
Pass the signing key to the c# compiler.
scripts/prepare_install_dir.in:
Copy mercury.snk to the install dir.
Estimated hours taken: 4
Branches: main
Upgrade to version 7.2 of the boehm gc.
This upgrade was done as 7.2 alpha 4 doesn't compile cleanly under Solaris 10.
Branches: main, 11.07
Fix further problems with building the csharp grade on Cygwin using the
Microsoft compiler. There were two main problems:
(1) Mercury.config.bootstrap had not been updated so the environment
and csharp compiler types for the stage 1 compiler were incorrect.
(2) The '/' in Microsoft style /OPTIONS was sometimes being treated
as a path separator for the purposes of path conversion.
scripts/Mercury.config.bootstrap.in:
Bring this file back into sync with Mercury.config.
compiler/compile_target_code.m:
Use - style options with the csharp compiler rather than / style
ones.
(In addition to causing the above problem, the use of / also tends
to cause trouble with POSIX style shells in general - we already avoid
the use of / style options with MSVC for the same reason.)
Break some overlong lines.
compiler/handle_options.m:
Break an overlong line.
Branches: main, 11.07
Set the host and target environment types at configuration time. By default,
they were both set to "posix" but that is no longer compatible with building
the csharp grade using the Microsoft compiler.
configure.in:
Set the environment type to "cygwin" on Cygwin, to "msys" on MinGW
and to "posix" otherwise. (For Mercury installations that work with
the Windows command interpreter, it will need to be manually set to
"windows".)
scripts/Mercury.config.in:
Set the environment type. (We set the target and host separately
so that is easier for installers to automatically modify this file.)
README.MS-VisualC:
Conform to the above change.
Estimated hours taken: 4
Branches: main, 11.07
The Microsoft C# compiler only accepts paths in the Windows format, so
add code to format file names depending on which host environment we are
compiling and which C# compiler we are using.
compiler/compile_target_code.m:
Convert to file names to use windows paths when required.
compiler/globals.m:
compiler/handle_options.m:
compiler/mercury_compile.m:
compiler/options.m:
doc/user_guide.texi:
m4/mercury.m4:
scripts/Mercury.config.in:
Add code to determine the C# compiler type and pass it to the compiler.
library/Mmakefile:
We no longer need to detect if we are using csc as the compiler
will fix the posix path as part of mmc --make.
Branches: main
Don't make the choice of whether MR_THREAD_SAFE is defined in parallel grades
in the configure script. There's no reason to do so and handling it
differently from the other grade component macros is just confusing.
compiler/compile_target_code.m:
scripts/mgnuc.in:
If we are in a parallel grade then define MR_THREAD_SAFE.
configure.in:
Don't include -DMR_THREAD_SAFE in the value of CFLAGS_FOR_THREADS.
Branches: main, 11.07
Add a new GC grade for the .ll_debug Mercury grade.
Previously the .ll_debug grade used the usual "gc" GC grade. This was a
problem, because it meant that installing a .ll_debug grade would overwrite the
libgc library with the unoptimised .ll_debug version, resulting in a severe
performance loss for applications even if they weren't built in the .ll_debug
grade.
compiler/compile_target_code.m:
Link against the ll_debug GC library if low-level debugging
is enabled.
scripts/ml.in:
Use the new ll_debug GC grade for the .ll_debug Mercury
grades.
Branches: 11.07, main
Improve and update documentation of the MSVC port.
Add batch files for invoking mdb and mprof; avoid problem with mercury.bat.
README.MS-VisualC:
Rewrite this file, it was very much out-of-date.
The major changes are:
+ we now describe how to set up a Cygwin or MSYS shell
with MSVC available.
+ the source distribution now works with MSVC.
+ a list of the limitations of the MSVC port has been added.
+ a description of how to set up the compiler so that it
works from the Windows command prompt has been added.
scripts/mercury/mercury.bat.in:
Delete support for the MERCURY_COMPILER and MERCURY_CONFIG_DIR
enviorment variables; the handling of them in this batch file
doesn't appear to be portable across different versions of
Windows and it's more important that this file work in the
normal case. (Keeping it simple is the way to ensure this.)
scripts/mdb.bat.in:
scripts/mprof.bat.in:
Templates for invoking mdb and mprof on Windows.
(I'm not sure how to reproduce all the functionality of the mdb
script in a batch file, so the command line options provided by
the mdb script aren't currently replicated here.)
configure.in:
scripts/Mmakefile:
Add the new batch files.
scripts/Mercury.config.in:
Use the Windows-style installation prefix on Cygwin systems.
browser/util.m:
Use the conventional name for the I/O state.
Use don't-care variables for the I/O state in foreign procs.
This avoids suprious warnings from MSVC.
reviews.
The configure script now supports the --without-hwloc option to disable the use
of hwloc, even if it is installed.
configure.in:
Allow the use of libhwloc to be disabled with the --without-hwloc option.
Distribute the autoconf macros for pkg-config with Mercury.
This allows mercury to be compiled from CVS on hosts that don't have these
macros in their autoconf installation.
acinclude.m4:
m4/mercury.m4:
Moved acinclude.m4 to m4/mercury.m4. This file contains mercury-specific
macros.
m4/pkg.m4:
Copied pkg.m4 from the autoconf installation on taura. This file contains
pkg-config macros.
INSTALL_CVS:
Mmakefile:
tools/test_mercury:
When calling aclocal pass the -I m4 option.
tools/bootcheck:
Create a link to the m4 directory when setting up stage directories.
Fix static linking with mmc --make and hwloc.
compiler/compile_target_code.m:
Conform to changes in scripts/ml.in (where static linking and hwloc is
already handled correctly).
compiler/options.m:
Create new options so that Mercury.config can tell mmc what options are
needed for linking to hwloc.
scripts/Mercury.config:
Pass hwloc linking options to the compiler.
Branches: 11.07, main
scripts/ml.in:
Use "msvc" rather than "cl" to identify MSVC. (The latter is
to easy to mistake for clang.)
When invoking the linker through MSVC, also invoke it with the
-nologo option.
configure.in:
scripts/ml.in:
Determine and use the static linking options for hwloc when ml is invoked
with --static.
More robust detection of when to use the hwloc linking options is now used.
+ Now pins threads intelligently on SMT systems by balancing threads among
cores.
+ performs fewer migrations when pinning threads (If a thread's current
CPU is a valid CPU for pinning, then it is not migrated).
+ Handle cases where the user requests more threads than available CPUs.
+ Handle cases where the process is restricted to a subset of CPUs by its
environment. (for instance, Linux cpuset(7))
This is largely made possible by the hwloc library
http://www.open-mpi.org/projects/hwloc/ However, hwloc is not required and the
runtime system will fall back to sched_setaffinity(), it will simply be less
intelligent WRT SMT.
runtime/mercury_context.h:
runtime/mercury_context.c:
Do thread pinning either via hwloc or sched_setaffinity. Previously only
sched_setaffinity was used.
Update thread-pinning algorithm, this:
Include the general thread pinning code only if MR_HAVE_THREAD_PINNING is
defined.
Use a combination of sysconf and sched_getaffinity to detect the number of
processors when hwloc isn't available. This makes the runtime compatible
with Linux cpuset(7) when hwloc isn't available.
configure.in:
Mmake.common.in:
Detect presence of the hwloc library.
configure.in:
Detect sched_getaffinity()
aclocal.m4:
acinclude.m4:
Move aclocal.m4 to acinclude.m4, the aclocal program will build aclocal.m4
and retrieve macros from the system and the contents of acinclude.m4.
Mmakefile:
Create a make target for aclocal.m4.
runtime/Mmakefile:
Link the runtime with libhwloc in low-level C parallel grades.
Include CFLAGS for libhwloc.
scripts/ml.in:
Link programs and libraries with libhwloc in low-level C parallel grades.
runtime/mercury_conf.h.in:
Define MR_HAVE_HWLOC when it is available.
Define MR_HAVE_SCHED_GETAFFINITY when it is available.
runtime/mercury_conf_param.h:
Define MR_HAVE_THREAD_PINNING if either hwloc or [sched_setaffinity and
sched_getaffinity] are available.
runtime/mercury_thread.c:
runtime/mercury_wrapper.c:
Only call MR_pin_thread and MR_pin_primordial_thread if
MR_HAVE_THREAD_PINNING is defined.
runtime/mercury_thread.h:
runtime/mercury_context.h:
Move the declaration of MR_pin_primordial_thread to mercury_context.h from
mercury_thead.h since it's definition is in mercury_context.c.
Require MR_HAVE_THREAD_PINNING for the declaration of
MR_pin_primordial_thread.
runtime/mercury_wrapper.c:
Conform to changes in mercury_context.h
INSTALL_CVS:
tools/test_mercury
Run aclocal at the right times while testing Mercury.
Branches: main, 11.07
Suppress the MSVC banner message, e.g. pass -nologo to cl, by default.
configure.in:
Do the above for mmc --make.
scripts/mgnuc.in:
Do the above for mmake.
Fix a couple of typos.
Branches: main, 11.07
Don't use -o when creating executables with MSVC. (For some silly
reason its been deprecated and we have to use -Fe instead.)
Note that mmc --make already uses -Fe with MSVC, this change only
affects mmake.
configure.in:
scripts/Mmake.vars.in:
Define a new variable, EXEFILE_OPT, whose variable gives the option
used to name executables.
compiler/write_deps_file.m:
Use the above variable instead of hardcoding the option to be
"-o".
Branches: main, 11.07
Fix another problem with --with-mscvrt.
scripts/ml.in:
The single-threaded version of the Microsoft C library is
no longer available. Only the multi-threaded one is used by
Visual Studio 2005 onwards.
scripts/parse_ml_options.sh-subr.in:
Update a comment regarding gcc's -s option on Mac OS X.
Branches: main, 11.07
Only force -O0 for old versions of clang; more recent versions do not encounter
problems when compiling Mercury generated C code.
configure.in:
scripts/mgnuc.in:
As above.
README.clang:
Conform to the above change.
Branches: main, 11.07
More Visual C related stuff.
compiler/globals.m:
Allow the C compiler type string for Visual C to have the form
"msvc_<VERSION>" as well as "cl_<VERSION>". Support for the
latter form will eventually be dropped.
configure.in:
Avoid pattern matching on the value of CC; it isn't a reliable
way of telling what the C compiler is.
Use the "-" form of options for MSVC in more places.
scripts/ml.in:
Use the "-" form of options for MSVC.
Branches: main, 11.07
Various fixes for MSVC.
configure.in:
Use -link instead of /link with MSVC since the latter
form causes trouble for MSYS.
scripts/ml.in:
As above, but for the -DEBUG option.
scripts/parse_ml_options.sh-subr.in:
Don't strip executables on MinGW for the moment.
(XXX We should re-enable this for the MinGW / GCC
combination and probably also check what the current
situation on Cygwin and Darwin is.)
library/store.m:
Shut up a warning from MSVC about a local variable
that is used without being initialised.
Branches: main, 11.07
Support using clang as a C compiler with Mercury -- currently only
tested on Mac OS X.
Clean up the handling of C compilers in the configure script.
configure.in:
Improve this script's ability to distinguish between different
types of C compiler. In particular, ensure that a clear
distinction is maintained between clang and gcc.
Fix an old XXX: don't rely on pattern matching on the value
of $CC to determine the C compiler type. This is particularly
error prone now since one compiler is named "clang" and another
"cl".
Set optimization and warning flags for clang.
(XXX this is currently very conservative; we need to go through
them and work out what good defaults might be.)
Don't link against libgcc if we are using clang.
(XXX I don't think this is really necessary for gcc either in
the great majority of cases.)
Mark spots that still need updating with "XXX CLANG"; I will
look into these separately.
aclocal.m4:
Add a new macro that determines the C compiler type based
on what builtin macros are defined -- unlike AC_PROG_CC
this macro correctly distinguishes between gcc and clang.
Add two new macros that determine version information for
clang and for Visual C.
scripts/mgnuc.in:
scripts/ml.in:
Handle clang
README.MacOS:
Mention that clang can be used with Mercury on Mac OS X.
Branches: main, 11.07
Improve support for building the Visual C port in MSYS.
configure.in:
scripts/mgnuc.in:
Use the -OPT form for cl command line options
instead of the /OPT form. The latter confuses
the MSYS shell.
Branches: main, 11.07
Workaround problems with GCC 4.4 - 4.6 on i*86 Linux.
scripts/mgnuc.in:
Compile some C files with -O0 on i*86 in order to avoid
problems with GCC.
Branches: main, 11.01
Avoid a problem that was causing exception handlers to not work on MinGW /
Windows XP in the hlc grades.
configure.in:
scripts/mgnuc.in:
Avoid the use of gcc's -fomit-frame-pointer option on MinGW.
It interferes with the correct operation of setjmp / longjmp.
(It does *not* interfere with gcc's __builtin_{set,long}jmp, so
maybe exceptions should be implemented using those where possible.)
library/backjump.m:
Unrelated change: fix some broken debugging code.
Branches: main, 11.01
scripts/mercury.bat.in:
Remove stuff required for supporting Windows 98. We now require
the use of at least Windows XP.
Don't export environment changes beyond this file.
Delete some comments about Cygwin being required -- they don't
belong here and the requirement for a Unix-like environment
for building Mercury is covered elsewhere.
Branches: main
scripts/prepare_install_dir.in:
Attempt to preserve file attributes in the boehm_gc/libatomic_ops
directories. This can prevent autoconf needing to re-invoked.
Use "cp -R" rather than "cp -r". The latter is not as portable.
Mmke.vars.in:
Modify the documentation that discusses how to override INSTALL_PATH
to describe setting of $DESTDIR instead.
Don't add a slash before INSTALL_PATH if DESTDIR is empty since this
breaks installation on Windows. (This change has already been made
in Mmake.common.in)
Set more FINAL_INSTALL_ variables to support the new code in
Mmakefile and bindist.Makefile.in.
Mmake.common.in:
Improve the prose in a comment.
Mmakefile:
Update installation message.
Tell the user that their install is in $(DESTDIR) if applicable.
Use FINAL_INSTALL variables rather than INSTALL variables.
Packaging Mercury for Debian requires creating some patches to make sure that
Mercury can be built under the control of dpkg-buildpackage. It's recommended
that these patches are pushed upstream (into Mercury) so that everyone can
benefit from them, not just Debian packagers.
Mmake.common.in:
scripts/Mmake.vars.in:
Install Mercury at $DESTDIR/@prefix@, $DESTDIR helps someone setup Mercury
to run from @prefix@ while putting it in $DESTDIR. $DESTDIR/* can easily
be tared up and then deployed on other systems.
Mmakefile:
Makefile:
Pass the $DESTDIR variable to make sub-processes.
scripts/Mercury.config.in:
scripts/Mercury.config.bootstrap.in:
Remove the hash-bang line from these scripts since they are not executable.
This change improves conformance with Debian packaging standards.
Branches: main, 10.04
Avoid warnings from the mgnuc script on MinGW, Cygwin and Solaris when
compiling the source distribution. The warnings are from the "which" command,
which is used in the mgnuc script when checking for the presence of the
mfiltercc utility program. (If the command named in the argument to which
cannot be found on the above systems it fails rather noisily rather than just
setting a non-zero exist status as on Linux and Mac OS X.)
The solution is to ensure that mfiltercc is built before anything that requires
it.
Mmakefile:
Add a new top-level target util_no_rt that builds those programs in the
util directory that do not depend on anything in the runtime directory.
scripts/mgnuc.in:
scripts/mgnuc_file_opt.sh-subr:
Add a new option, --no-filter-cc, that tells mgnuc not to bother
filtering the warning output of the C compiler.
util/Makefile:
Compile mfiltercc with --no-filter-cc since for the source distribution
it obviously won't exist until we do compile it.
util/mfiltercc.c:
Add a note at the top of this file mentioning the requirement that it
not depend on anything in the runtime directory.
Branches: main, 10.04
Avoid another problem with expr on FreeBSD.
scripts/parse_ml_options.sh-subr.in:
Avoid invoking expr with a first argument that has a leading
minus sign.
Branches: main, 10.04
Apply a patch from Keri Harris that fixes a problem with mmake --use-mmc-make
when using GNU make 3.82. The problem was that we were mixing normal and
implicit rules and GNU make no longer supports this (and officially never
did).
scripts/Mmake.rules:
Don't mix normal and implicit rules.
Branches: main
Add support for the `csharp' grade to `mmc --make', and make it possible to
install the `csharp' grade with `mmake install'.
Also some miscellaneous fixes.
configure.in:
Require a recent enough bootstrap compiler that recognises C# as a
language for `pragma foreign_type'.
Mmakefile:
Use `mmc --make' to install the standard library in csharp grade.
aclocal.m4:
Search for the Mono C# compiler `gmcs', which is required for generics
at this time. Prefer it over the DotGNU C# compiler, which I have not
tested.
Search for `mono'. If found, it will be used in shell scripts to
launch executables generated via the csharp backend.
Remove "MS_" prefixes on the variables MS_CSC and MS_ILASM, which are
not Microsoft-specific. More importantly, it should be less likely to
make the mistake of adding an extra underscore to CSCFLAGS and
ILASMFLAGS.
README.DotNet:
Conform to variable renamings.
compiler/compile_target_code.m:
Add new linked target types `csharp_executable', `java_launcher' and
`erlang_launcher', instead of overloading `executable'.
Link with `mer_std.dll' and other libraries when generating C#
executables. There is no `mer_rt.dll'.
Pass "/debug" to the C# compiler if `--target-debug' is set.
Create a shell script to launch the executable if necessary.
Delete an unused predicate `standard_library_directory_option'.
compiler/file_names.m:
`.cs' and `.cs_date' are grade-dependent.
compiler/handle_options.m:
Force `.exe' as the executable file extension in csharp grades.
Make the `erlang' grade component imply the same options as MLDS
grades.
compiler/make.m:
Classify executable target types based on the compilation target.
compiler/make.module_target.m:
Handle `mmc --grade csharp --make <target>.dll'.
compiler/make.program_target.m:
Install library DLLs in csharp grades.
Make clean targets remove files for csharp grades.
Conform to changes.
compiler/make.util.m:
Add a stub foreign type.
Conform to changes.
compiler/module_cmds.m:
Factor out code to generate the shell scripts which launch programs
compiled in Java, Erlang and C# grades.
compiler/options.m:
Add `cli_interpreter' option to remember the name of the program which
should be used to run CLI (.NET) programs.
Add C#-related options to the help message.
compiler/options_file.m:
Remove "MS_" prefixes on MS_ILASM_FLAGS and MS_CSC_FLAGS, and remove
the extra underscore before "FLAGS". In all uses of the variables,
they were spelt without the extra underscore.
doc/user_guide.texi:
Document options and file types related to the C# grade.
library/Mmakefile:
Pass `mercury_dotnet.cs' to the C# compiler when building the standard
library. Suppress some warnings.
Allow stubs in this directory for csharp grade.
Conform to variable renamings.
library/builtin.m:
Uncomment foreign language pragmas for C#.
Handle null values in C# implementation of `deep_copy'.
library/private_builtin.m:
library/string.m:
Compare strings by ordinals in C#, instead of culture-specific rules.
Although the latter is allowed according to the documentation, it is
likely to slower, and cause confusion when porting between backends.
Handle negative index in string.set_char.
library/rtti_implementation.m:
Uncomment foreign language pragmas for C#.
`System.Type.GetType' only searches the current executing assembly or
in mscorlib for a type. As we have to be able to find types in other
assemblies (e.g. mer_std.dll or user DLLs), explicitly search through
a list of assemblies.
library/thread.semaphore.m:
Uncomment foreign language pragmas for C#.
Fix missing class qualification.
library/array.m:
library/bitmap.m:
library/bool.m:
library/dir.m:
library/exception.m:
library/io.m:
library/mutvar.m:
library/par_builtin.m:
library/region_builtin.m:
library/store.m:
library/thread.m:
library/time.m:
library/univ.m:
library/version_array.m:
Uncomment foreign language pragmas for C#.
mdbcomp/rtti_access.m:
Add type and procedure stubs.
runtime/mercury_dotnet.cs.in:
Override `Equals(object)' methods in `TypeCtorInfo_Struct' and
`TypeInfo_Struct' classes. This requires we override `GetHashCode' as
well.
Handle nulls arguments to `Equals' methods as is the expected behaviour.
Override `ToString' in `TypeCtorInfo_Struct' to produce more useful
output during debugging.
scripts/Mercury.config.in:
Record the configured CLI_INTERPRETER and pass that to the compiler as
a flag.
Conform to variable renamings.
scripts/Mmake.vars.in:
Pass value of CSCFLAGS from Mmake through to `mmc --make'.
Conform to variable renamings.
scripts/Mercury.config.bootstrap.in:
scripts/Mmake.rules:
Conform to variable renaming.
scripts/canonical_grade.sh-subr:
scripts/final_grade_options.sh-subr:
scripts/init_grade_options.sh-subr:
scripts/parse_grade_options.sh-subr:
Canonicalise high-level code, high-level-data, C# target code to the
`csharp' grade.
Handle erlang grades like other grades.
scripts/prepare_install_dir.in:
Copy `.cs' files from the runtime directory when preparing an install
directory.
browser/Mmakefile:
compiler/Mmakefile:
deep_profiler/Mmakefile:
mdbcomp/Mmakefile:
profiler/Mmakefile:
runtime/Mmakefile:
slice/Mmakefile:
ssdb/Mmakefile:
trace/Mmakefile:
Do as other non-C grades in this directory.
Conform to variable renamings.
tests/hard_coded/foreign_enum_dummy.m:
tests/hard_coded/sub-modules/non_word_mutable.m:
tests/hard_coded/sub-modules/sm_exp_bug.m:
Make these tests work in C#.
tests/mmc_make/Mmakefile:
Update a regular expression to account for `mmc --make' writing
"Making rebuild.exe" on platforms where the .exe suffix is not normally
used.
tests/mmc_make/complex_test.exp2:
Add alternative output (minor difference in floating point precision).
tests/debugger/Mmakefile:
tests/debugger/declarative/Mmakefile:
tests/general/structure_reuse/Mmakefile:
tests/hard_coded/Mmakefile:
tests/hard_coded/sub-modules/Mmakefile:
tests/par_conj/Mmakefile:
tests/stm/Mmakefile:
Disable some tests in the csharp grade.
tests/invalid/Mmakefile:
Disable some tests in the csharp grade.
Enable a test which should work in java grades.
tests/valid/Mmakefile:
Do as other non-C grades in this directory.
When testing the csharp grade in this directory, produce only the C#
target files for now.
tests/run_one_test:
Don't compress a failing test case executable when the executable is
actually only a shell script.
Estimated hours taken: 2
Branches: main
Make the mdb command "dump" give you a message confirming what it did.
trace/mercur_trace_cmd_browsing.c:
Make the mdb command "dump" give you a message confirming what it did,
unless the user gives the new -q or --quiet option.
doc/user_guide.texi:
Document the new option.
scripts/mdb_grep:
scripts/mdb_open:
Specify -q to keep old behavior.
tests/debugger/browser_test.{inp,exp,exp3}:
Update this test case to test the dump command both with and
without -q.
Branches: main, 10.04
In mgnuc, use a temporary file to hold gcc error messages before filtering with
mfiltercc, instead trying to do it directly in a pipeline.
The major problem is that the exit status of mgnuc would be that of the second
command in the pipeline (mfiltercc), and not the important command (gcc).
Fixing it without using temporary files requires horrible shell code.
scripts/mgnuc.in:
As above. Filtering is disabled if mktemp is not detected at configure
time.
Note: the deleted shell command was incorrect as fd 3 was not
redirected back to standard output, hence if gcc wrote anything to its
standard output (it doesn't) then it would have been lost.
Branches: main, 10.04
Avoid portability problems in the mgnuc script.
scripts/mgnuc.in:
When filtering the output of gcc, ensure that fd 3 is actually
open. (It appears to work as written with full bash, but shells
that are closer to just POSIX sh emit errors about bad file
descriptors.)
Branches: main, 10.04
Filter out warning message from gcc 4.x which are emitted when compiling
low-level C code using assembler labels, at least until a better fix is
available.
util/Mmakefile:
util/mfiltercc.c:
Add a new program, mfiltercc.
compiler/options.m:
Add `--filtercc-command' option (undocumented).
compiler/compile_target_code.m:
Filter compiler output with mfiltercc if using assembler labels.
scripts/mgnuc.in:
Filter compiler output with mfiltercc if using assembler labels, but
only if mfiltercc can be found on the $PATH. The bootstrap compiler
may not have mfiltercc.
.mercury-compiler.spec.in:
Makefile:
README.MinGW:
bindist/Mmakefile:
bindist/bindist.Makefile.in:
scripts/mercury_config.in:
Mention mfiltercc in various places.
Branches: main, 10.04
Add an option to the `mercury_config' script to make it easier to relocate a
Mercury installation.
scripts/mercury_config.in:
Add the option `--rebase', which acts as if the user passed the options
`--input-prefix <dir> --output-prefix <dir>', except that <dir> is
automatically guessed from the path to the `mercury_config' script.
(--input-prefix is undocumented)
If `mercury_config' is run without any arguments, and the input
directory doesn't exist, suggest the `--rebase' option as the user
probably moved the Mercury installation already.
Don't copy `Mercury.config.bootstrap' to the output directory.
Copy the regenerated `mdbrc' file to the output directory.
Set execute permissions on scripts copied to the output bin directory.
Branches: main, 10.04
Compile C files at -O0 in debugging grades on Mac OS X, when using mmc --make.
This works around performance problems in gcc.
compiler/compile_target_code.m:
As above.
scripts/mgnuc.in:
Add from the spot that implements the workaround for the mgnuc script.
Using -O2 (the default), results in excessive compilation times.
(There is at least one open GCC bug, #26854, concerning excessive
compilation times on Darwin - it is likely we are also bumping
into this.)
(I will update mmc --make separately.)
scripts/mgnuc.in:
On Darwin compile debug grades at -O0 when using GCC.
This avoid excessive compilation times due to performance
bugs in GCC.
Branches: main, 10.04
Lift some assumptions that the only Java and Erlang grades are `java' and
`erlang'.
Finally use `--force-disable-ssdebug' instead of `--no-ssdb' to disable the
source-to-source debugging tranformation where required. The latter is
incorrect as it changes the grade, which disrupts the install path with `mmc
--make'.
library/Mmakefile:
scripts/Mercury.config.in:
scripts/Mmake.vars.in:
Remove the variable `INSTALL_JAVA_LIBRARY_DIR' as it assumes only one
Java grade is possible.
Don't use default `--java-classpath' options to add Mercury standard
libraries to the Java class path, for the same reason.
compiler/module_cmds.m:
Add a predicate to return the Mercury standard libraries needed for a
Java program as they are no longer listed in Mercury.config.
Add the Mercury standard libraries when creating the shell script to
launch Java programs.
compiler/compile_target_code.m:
Add the Mercury standard libraries when calling the Java compiler.
compiler/make.program_target.m:
Don't hard code `java' and `erlang' grades when installing library
grade files.
browser/MDB_FLAGS.in:
library/LIB_FLAGS.in:
mdbcomp/MDBCOMP_FLAGS.in:
ssdb/SSDB_FLAGS.in:
Use `--force-disable-ssdebug' to disable the transform.
compiler/module_imports.m:
Don't implicitly import the `ssdb' module if `--force-disable-ssdebug'
is enabled.
compiler/handle_options.m:
Reset the `source_to_source_debug' option on encountering a `--grade'
option.
Branches: main, 10.04
Fix a problem that prevented the erlang grade from being installed with
the source distribution when the grades to install are specified using
configure's --enable-libgrades option.
scripts/canonical_grade.sh-subr:
Handle the case where the target is "erlang" when constructing
the canonicalized grade string. (The erlang target doesn't fit
in with the other cases, it needs to be handled separately.)
primary motivation for this is resolve various problems with Mac OS 10.6, such
as the parallel grades not building (bug #121). The upgrade should also pave
the way for supporting a 64-bit version of Mercury on Mac OS 10.6.
(Unfortunately, the reg grades still do not work - bug #120.)
Reduce the number of merge conflicts we get when upgrading the collector by
(1) removing some local changes to support DLLs that were merged into the
official version of the collector sometime ago, and (2) removing our local copy
of the Makefile, and creating it from the file Makefile.direct. (We were
making local changes to the former, and the GC developers are now only updating
the latter - both files were out of sync with each other.)
boehm_gc/Makefile:
Create Makefile from Makefile.direct and have the submake target
depend upon it. (Despite what the GC documentation says about
Makefile.direct, if you use the direct method it has to be called
Makefile because the object files are set to depend upon it by
that name, i.e. using make's -f option won't work.)
scripts/prepare_install_dir.in:
tools/bootcheck:
.README.in:
bindist/bindist.README:
Conform to the above changes.
NOTE: the slight modification referred to above is the following, backported from
the current head of the collector. It is required for Mac OS 10.6.
--- gc_priv.h 2010-02-24 02:12:59.000000000 +1100
+++ ../../../../../gc_7_2b/ws-upgrade2/boehm_gc/include/private/gc_priv.h 2010-02-24 14:54:42.000000000 +1100
@@ -511,10 +511,7 @@
The structure has changed its definition in different Darwin versions.
This now defaults to the (older) names without __, thus hopefully,
not breaking any existing Makefile.direct builds. */
-# if defined (HAS_PPC_THREAD_STATE___R0) \
- || defined (HAS_PPC_THREAD_STATE64___R0) \
- || defined (HAS_X86_THREAD_STATE32___EAX) \
- || defined (HAS_X86_THREAD_STATE64___RAX)
+# if __DARWIN_UNIX03
# define THREAD_FLD(x) __ ## x
# else
# define THREAD_FLD(x) x
@@ -2119,14 +2116,14 @@
/* Linuxthreads itself uses SIGUSR1 and SIGUSR2. */
# define SIG_SUSPEND SIGPWR
# endif
-# else /* !GC_LINUX_THREADS */
+# elif !defined(GC_OPENBSD_THREADS) && !defined(GC_DARWIN_THREADS)
# if defined(_SIGRTMIN)
# define SIG_SUSPEND _SIGRTMIN + 6
# else
# define SIG_SUSPEND SIGRTMIN + 6
# endif
# endif
-# endif /* !SIG_SUSPEND */
+# endif /* !SIG_SUSPEND */
# endif