e4732222e4
One usecase for tini is as the init process for a container which has a single executable and no C runtime library. It therefore needs to be independent of any C runtime library within the container. Previously, we didn't build statically to avoid problems with BR2_SHARED_LIBS=y. However, it turns out that tini can successfully link statically even with glibc and BR2_SHARED_LIBS=y, because libc.a is still included in staging, and tini doesn't use any NSS functionality. Signed-off-by: Simon Rowe <simon.rowe@citrix.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
37 lines
864 B
Makefile
37 lines
864 B
Makefile
################################################################################
|
|
#
|
|
# tini
|
|
#
|
|
################################################################################
|
|
|
|
TINI_VERSION = 0.18.0
|
|
TINI_SITE = $(call github,krallin,tini,v$(TINI_VERSION))
|
|
TINI_LICENSE = MIT
|
|
TINI_LICENSE_FILES = LICENSE
|
|
|
|
TINI_CFLAGS = $(TARGET_CFLAGS) \
|
|
-static \
|
|
-DTINI_VERSION=\"$(TINI_VERSION)\" \
|
|
-DTINI_GIT=\"\"
|
|
|
|
ifeq ($(BR2_PACKAGE_TINI_MINIMAL),y)
|
|
TINI_CFLAGS += -DTINI_MINIMAL
|
|
endif
|
|
|
|
define TINI_CONFIGURE_CMDS
|
|
printf "#pragma once\n" > $(@D)/src/tiniConfig.h
|
|
endef
|
|
|
|
define TINI_BUILD_CMDS
|
|
mkdir -p $(@D)/bin
|
|
$(TARGET_CC) $(TINI_CFLAGS) \
|
|
-o $(@D)/bin/tini $(@D)/src/tini.c
|
|
endef
|
|
|
|
define TINI_INSTALL_TARGET_CMDS
|
|
$(INSTALL) -D -m 0755 $(@D)/bin/tini $(TARGET_DIR)/usr/bin/tini
|
|
endef
|
|
|
|
# Tini's CMakeLists.txt is not suitable for Buildroot.
|
|
$(eval $(generic-package))
|