Fix --enable-static build, only C library shared

This patch fixes regressions in --enable-static introduced with the
conversion to the GNU configure and build system.

The default link flag to libtool is set to -static-libtool-libs, meaning
not a fully static build -- the C library will still be used as an .so
which is usually what people want -- whereas libite (-lite) and libuEv
are linked statically.

$ ldd /sbin/finit /sbin/initctl
/sbin/finit:
	linux-vdso.so.1 =>  (0x00007ffffde62000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6979ad8000)
	/lib64/ld-linux-x86-64.so.2 (0x000055d893e96000)
/sbin/initctl:
	linux-vdso.so.1 =>  (0x00007ffed0dd6000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007feb3a29c000)
	/lib64/ld-linux-x86-64.so.2 (0x00005556ebd2b000)

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2016-07-09 12:14:21 +02:00
1 parent 58e00fe52e
commit 267eeb9692
2 files changed
+18 -5

No files matched your search

+2
View File
@@ -126,11 +126,13 @@ int main(int argc, char* argv[])
#endif
run_interactive(SETUP_DEVFS, "Populating device tree");
#ifndef ENABLE_STATIC
/*
* Load plugins first, finit.conf may contain references to
* features implemented by plugins.
*/
plugin_load_all(&loop, PLUGIN_PATH);
#endif
/*
* Parse /etc/finit.conf, main configuration file