heads/modules/musl

51 lines
1.2 KiB
Plaintext
Raw Normal View History

2018-02-13 22:37:28 +00:00
CONFIG_MUSL ?= y
modules-$(CONFIG_MUSL) += musl
musl_version := 1.1.15
musl_dir := musl-$(musl_version)
musl_tar := musl-$(musl_version).tar.gz
musl_url := https://www.musl-libc.org/releases/$(musl_tar)
musl_hash := 97e447c7ee2a7f613186ec54a93054fe15469fe34d7d323080f7ef38f5ecb0fa
musl_output := ../../install/bin/musl-gcc
#
# Note that for syslibdir to be /lib the install will fail.
# this is unfortunate since it prevents the binaries from running
# and requires that we treat the rest of the build as a cross compile.
#
# That works, with some hacks...
#
musl_configure := ./configure \
$(CROSS_TOOLS_NOCC) \
2017-04-07 15:28:36 +00:00
CC="$(CROSS)gcc" \
--prefix="$(INSTALL)" \
--syslibdir="/lib" \
--enable-gcc-wrapper \
--enable-shared \
2017-04-07 15:28:36 +00:00
musl_target := \
$(MAKE_JOBS) \
$(CROSS_TOOLS_NOCC) \
CC="$(CROSS)gcc" \
2017-04-07 15:28:36 +00:00
install \
musl_libraries := \
lib/libc.so \
musl_depends := musl-cross
# Fake a target so that musl will force a header install by the
# Linux kernel sources.
$(build)/$(musl_dir)/.build: $(INSTALL)/include/linux/limits.h
$(INSTALL)/include/linux/limits.h: $(build)/$(linux_base_dir)/.canary
$(MAKE) \
2018-05-02 18:30:27 +00:00
-C "$(build)/$(linux_base_dir)" \
INSTALL_HDR_PATH="$(INSTALL)" \
2018-05-02 18:30:27 +00:00
O="$(linux_dir)" \
KCONFIG_CONFIG="$(pwd)/$(linux_kconfig)" \
headers_install