package.mk/recipes/musl/Makefile
2021-03-27 23:53:06 +01:00

27 lines
1016 B
Makefile
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

name = musl
version = 1.2.2
URL = https://www.musl-libc.org/releases/musl-$(version).tar.gz
# Edit this if you somehow need to build a prefixed version of musl.
SLOT ?= /
libdir = $(SLOT)/lib
configure_backend = configure_autotools
CONFIGURE_OPTIONS_USER = --libdir=$(PREFIX)/lib --syslibdir=$(libdir) --enable-shared --enable-static
SYSCONF ?= ../../
include $(SYSCONF)/package.mk
post_fake_root_install:
# FIXME: Thisll have to eventually be more automated.
# FIXME: That path has to be edited on other architectures.
$(Q)mkdir -p $(pkg_fake_root_dir)/etc
$(Q)echo $(libdir) >> $(pkg_fake_root_dir)/etc/ld-musl-x86_64.path
$(Q)echo /usr/baguette/lib >> $(pkg_fake_root_dir)/etc/ld-musl-x86_64.path
$(Q)echo /usr/bad/lib >> $(pkg_fake_root_dir)/etc/ld-musl-x86_64.path
$(Q)echo /usr/local/lib >> $(pkg_fake_root_dir)/etc/ld-musl-x86_64.path
for lib in libm libpthread librt libdl; do \
ln -s $(libdir)/libc.so "$(pkg_fake_root_dir)/$(libdir)/$${lib}.so" ; \
done