From a6e883426efb5b205122e85a4f868647e31206c5 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Mon, 19 Aug 2013 11:56:01 +0200 Subject: erts: Document --enable-static-nif/driver --- HOWTO/INSTALL.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/HOWTO/INSTALL.md b/HOWTO/INSTALL.md index fa1b9d2e89..9ea50ce86c 100644 --- a/HOWTO/INSTALL.md +++ b/HOWTO/INSTALL.md @@ -296,6 +296,18 @@ Some of the available `configure` options are: you can build using a fallback implementation based on mutexes or spinlocks. Performance of the SMP runtime system will however suffer immensely without an implementation for native atomic memory accesses. +* `--enable-static-{nifs,drivers}` - To allow usage of nifs and drivers on OSs + that do not support dynamic linking of libraries it is possible to statically + link nifs and drivers with the main Erlang VM binary. This is done by passing + a comma seperated list to the archives that you want to statically link. e.g. + `--enable-static-nifs=/home/$USER/my_nif.a`. The path has to be absolute and the + name of the archive has to be the same as the module, i.e. `my_nif` in the + example above. This is also true for drivers, but then it is the driver name + that has to be the same as the filename. You also have to define + `STATIC_ERLANG_{NIF,DRIVER}` when compiling the .o files for the nif/driver. + If your nif/driver depends on some other dynamic library, you now have to link + that to the Erlang VM binary. This is easily achived by passing `LIBS=-llibname` + to configure. If you or your system has special requirements please read the `Makefile` for additional configuration information. -- cgit v1.2.3