Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ else
$(error unsupported architecture $(ARCH))
endif

# Check if we are in a musl system
ifeq ($(shell ldd --version 2>&1|head -n1|grep -q ^musl && echo yes), yes)
MUSL?=1
endif

# Musl doesn't have fts, but distributions provide a libfts
ifdef MUSL
EXTRA_LDFLAGS+= -lfts
endif

ifeq ($(V),1)
Q =
msg =
Expand Down Expand Up @@ -287,7 +297,7 @@ alpine: alpine-image clean-all
$(call msg,ALPINE-DOCKER-RUN,Dockerfile)
$(Q)$(DOCKER) run \
$(ALPINE_RUN_ARGS) $(SHELL) \
-c "make -C $(PWD) all initramfs.gz EXTRA_LDFLAGS=-lfts"
-c "make -C $(PWD) all initramfs.gz"

alpine-image: clean-all
$(call msg,ALPINE-IMAGE,Dockerfile.alpine)
Expand Down