[ostree-init] Statically link libc



commit ca302837773dd7450b7980586e80dc1d12356da7
Author: Colin Walters <walters verbum org>
Date:   Mon Jan 16 12:44:18 2012 -0500

    Statically link libc
    
    We can't use the dynamic version as we're run outside of an OS
    root.

 Makefile-ostree-init.am |    3 +++
 configure.ac            |    4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/Makefile-ostree-init.am b/Makefile-ostree-init.am
index 1a8e5f6..a4214d1 100644
--- a/Makefile-ostree-init.am
+++ b/Makefile-ostree-init.am
@@ -20,3 +20,6 @@ sbin_PROGRAMS += ostree-init
 ostree_init_SOURCES = src/ostree-init.c
 
 ostree_init_CFLAGS = $(AM_CFLAGS)
+# We can't dynamically link to libc because it's not in
+# the root filesystem.
+ostree_init_LDFLAGS = -all-static
diff --git a/configure.ac b/configure.ac
index 75c275a..e8790c3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ AM_MAINTAINER_MODE([enable])
 AM_SILENT_RULES([yes])
 
 AC_PROG_CC
-AM_PROG_CC_C_O
+AC_PROG_CC_C_O
 
 changequote(,)dnl
 if test "x$GCC" = "xyes"; then
@@ -20,7 +20,7 @@ AC_SUBST(WARN_CFLAGS)
 
 # Initialize libtool
 LT_PREREQ([2.2.4])
-LT_INIT([disable-static])
+LT_INIT([disable-shared])
 
 AC_CONFIG_FILES([
 Makefile



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]