I'm currently about to prepare an update of the mono runtime for Void Linux (voidlinux.eu). The mono package is built from this package template:
I believe the most relevant information there is that it is configured with "--disable-static --disable-system-aot", the rest of the configure options are generic and automatically create by the build system. After configure is run, mono should compile with sgen and boehm. However the build fails with the following error message:
/builddir/mono-4.6.1/mono/mini/main.c:174: undefined reference to `mono_build_date'
collect2: error: ld returned 1 exit status
I looked a bit through the code and found that the pointer is declared in mini.h (which is included in main.c) but not defined in main.c. The only other place this pointer is used is in mini-runtime.c but it is correctly defined there.
If found two ways to work around this issue: Either define the pointer properly or remove it/comment it out. Since it is not initialized anywhere else, removing it entirely is probably the worse way to deal with it. If I understand it correctly, initialization cannot happen in mini-runtime.c because it doesn't include the buildver header file. So my best guess is that the proper solution would be defining the pointer in main.c before initializing it.
In the case that matters: It all happens with gcc 4.9.4 in this case.
--disable-static is not frequently used and is prone to break. Its better to avoid it.