[systemd-devel] How to build systemd with statically linking

황재영 j-zero.hwang at samsung.com
Sat Mar 1 00:46:16 PST 2014


Hello,

I've tried to build systemd(v43) with statically linking.

I revised Makefile.am and spec file but it was not built statically.

 

systemd: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically
linked (uses shared libs), for GNU/Linux 2.6.25,
BuildID[sha1]=0x4afa2d030f0e7d3446aed9835c2f99bdee1f2473, not stripped

 

diff --git a/Makefile.am b/Makefile.am
index 9762da1..6def4d1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -730,6 +730,7 @@ systemd_SOURCES = \
src/main.c

systemd_CFLAGS = \
+ -static \
$(AM_CFLAGS) \
$(DBUS_CFLAGS) \
$(UDEV_CFLAGS)
diff --git a/packaging/systemd.spec b/packaging/systemd.spec
index fc9a794..8b0f7de 100644
--- a/packaging/systemd.spec
+++ b/packaging/systemd.spec
@@ -187,8 +187,8 @@ This package includes the man pages for systemd.

%build
cp %{SOURCE1001} .
-%autogen
-%configure --disable-static \
+%autogen -static
+%configure \
--with-rootdir="" \
--with-distro=meego \
--disable-gtk \

 

Best regards

	

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20140301/a925ed59/attachment-0001.html>


More information about the systemd-devel mailing list