c2init - Create Mercury initialization file.

NAME  SYNOPSIS  NOTES  OPTIONS  DIAGNOSTICS OPTIONS  DYNAMIC/STATIC LINKING OPTIONS  DIRECTORY OPTIONS  DEBUGGING OPTIONS  INITIALIZATION OPTIONS  THREADS OPTIONS  GRADE OPTIONS  ENVIRONMENT VARIABLES  AUTHORS  COPYRIGHT  SEE ALSO 

NAME

c2init − Create Mercury initialization file.

SYNOPSIS

c2init [options] *.c *.init ...

NOTES

c2init is one of the development tools that are part of the Mercury distribution.

This manual page is limited to a brief summary. For further information see the Mercury User’s Guide.

OPTIONS

−h, −−help

Print this help message.

DIAGNOSTICS OPTIONS

−v, −−verbose

Print each command before executing it.

−−no−demangle

Don’t pipe the output of the linker through the Mercury demangler.

−−allow−undef
−−allow−undefined

Don’t report an error if there are unresolved symbols. This option is only used if you are building a shared library (with ‘−−make−shared−lib); when building executables, unresolved symbols are always errors. This option is useful when building shared libraries that are not intended to be self−contained.

−−print−grade

Compute the grade of the Mercury libraries to link with based on the command line options, print it to the standard output, and then exit (don’t actually link anything).

−−print−gc−grade

Compute the base name of the garbage collection library to link with based on the command line options, print it to the standard output, and then exit (don’t actually link anything).

−−print−link−command

Print the command used to link executables.

−−print−shared−lib−link−command

Print the command used to link shared libraries.

−−print−map

Print a link map, via ‘ld −−print−map’.

DYNAMIC/STATIC LINKING OPTIONS

−−mercury−libs {shared, static, none}

Specify which version of the standard Mercury libraries to link with. ‘shared’ links with the shared libraries (*.so) if possible, otherwise with the static ones. ‘static’ links with the static libraries (*.a). ‘none’ disables linking with the Mercury standard libraries.

−shared, −−shared

Similar to ‘−−mercury−libs shared’, but applies to all libraries, not just the standard Mercury libraries.

−static, −−static

Similar to ‘−−mercury−libs static’, but applies to all libraries, not just the standard Mercury libraries.

−−make−shared−lib

Produce a shared library, rather than an executable.

DIRECTORY OPTIONS

−−mercury−standard−library−directory <directory>
−−mercury−stdlib−dir <directory>

The directory in which to find the Mercury standard library.

−−no−mercury−standard−library−directory, −−no−mercury−stdlib−dir

Same as ‘−−mercury−libs none’.

−−mercury−config−directory <directory>
−−mercury−config−dir <directory>

The location of an alternative configuration (created with mercury_config) to use.

−L <directory>, −−lib−dir <directory>

Include <directory> in the list of directories that the linker will use to search for libraries.

−R <directory>, −−shared−lib−dir <directory>

Include <directory> in the list of directories that the dynamic linker will use to search for shared libraries.

−−leave−shared−lib−dirs−relative

Don’t convert relative shared library directory names into absolute paths.

−−no−leave−shared−lib−dirs−relative

Convert relative shared library directory names into absolute paths. This is the default.

DEBUGGING OPTIONS

−t, −−trace

Link in the Mercury debugging libraries. This option is needed if any of the modules being linked were compiled with tracing enabled. However, ‘−−debug’ implies ‘−−trace’, so if you’re using ‘−−debug’, then you don’t need to explicitly specify ‘−−trace’. Note that ‘−−trace’ is incompatible with ‘−−static’ on some platforms (e.g. sparc−sun−solaris2.6). Implies ‘−−include−initialization−code’.

−r−, −−no−readline

Don’t link in the GPL’d GNU Readline Library.

−g, −−c−debug, −−no−strip

Do not strip C debugging information.

INITIALIZATION OPTIONS

−−no−main, −−library

Don’t generate a ‘main()’ function. Instead, generate a function mercury_main(int argc, char **argv); (declared in "mercury_init.h") that can be called from C code. (A more fine−grained interface is also available; see "mercury_init.h" for details.)

−I <directory>, −−init−file−directory <directory>

Include <directory> in the list of directories searched to locate ‘.init’ files.

−w <label>, −−entry−point <label>

Set entry point to <label>. (Default value corresponds to main/2.)

−−runtime−flags <flags>

Add <flags> to the list of flags to pass to the Mercury runtime. Flags can also be passed at runtime in the MERCURY_OPTIONS environment variable. For the list of available flags, see the documentation for MERCURY_OPTIONS in the "Environment" chapter of the Mercury User’s Guide.

−−experimental−complexity <filename>

Set up for the experimental determination of the complexity of the procedures listed in the given file.

−−init−c−file <filename>

Output the generated C initialization program to the specified file, rather than sending it to the standard output.

−A <funcname>

Always execute the named void function (which must take no arguments) when the Mercury runtime is initialized.

−x, −−extra−inits

Search ‘.c’ files for extra initialization functions. (This may be necessary if the C files contain hand−coded C code with ‘INIT’ comments, rather than containing only C code that was automatically generated by the Mercury compiler.)

THREADS OPTIONS

−−use−thread−libs

Link with the POSIX thread libraries. This option is useful if a C library being linked with uses threads, but the Mercury code being linked doesn’t.

GRADE OPTIONS

−s <grade>, −−grade <grade>
−−target {c, csharp, java, erlang}
−−asm−labels
−−gcc−non−local−gotos
−−gcc−global−registers
−H, −−high−level−code
−−parallel
−−gc {boehm, boehm_debug, hgc, accurate, none}
−p, −−profiling
−−profile−calls
−−profile−time
−−profile−memory
−−profile−deep
−−record−term−sizes−as−words
−−record−term−sizes−as−cells
−−use−trail
−−use−trail−segments
−−reserve−tag
−−use−minimal−model−stack−copy
−−use−minimal−model−own−stacks
−−minimal−model−debug
−−single−prec−float
−−pic−reg
−−no−stack−trace
−−debug
−−decl−debug
−−ss−debug
−−low−level−debug
−−extend−stacks−when−needed
−−stack−segments
−−use−regions

See the documentation in the "Invocation" section of the Mercury User’s Guide.

ENVIRONMENT VARIABLES

MERCURY_DEFAULT_GRADE, MERCURY_C_COMPILER, MERCURY_NONSHARED_LIB_DIR, MERCURY_MKINIT.

AUTHORS

The Mercury team.

COPYRIGHT

This program and its documentation are copyright by the University of Melbourne and the Mercury team. They may be copied only under the terms of the GNU General Public License − see the file COPYING in the Mercury distribution.

SEE ALSO

The Mercury User’s Guide.

<http://www.mercurylang.org/information/documentation.html>


jenkler.se | uex.se