2017-03-31 15:18:46 +00:00
|
|
|
modules-y += musl
|
2016-12-29 23:23:08 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2017-03-20 21:52:54 +00:00
|
|
|
musl_output := ../../install/bin/musl-gcc
|
2016-12-29 23:23:08 +00:00
|
|
|
|
2017-01-04 15:31:27 +00:00
|
|
|
#
|
2017-01-04 21:39:10 +00:00
|
|
|
# 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.
|
2017-01-04 15:31:27 +00:00
|
|
|
#
|
2017-01-04 21:39:10 +00:00
|
|
|
# That works, with some hacks...
|
2017-01-04 15:31:27 +00:00
|
|
|
#
|
2016-12-29 23:23:08 +00:00
|
|
|
musl_configure := ./configure \
|
2017-04-08 17:23:34 +00:00
|
|
|
$(CROSS_TOOLS_NOCC) \
|
2017-04-07 15:28:36 +00:00
|
|
|
CC="$(CROSS)gcc" \
|
2016-12-29 23:23:08 +00:00
|
|
|
--prefix="$(INSTALL)" \
|
2017-01-04 15:31:27 +00:00
|
|
|
--syslibdir="/lib" \
|
2017-01-27 22:55:44 +00:00
|
|
|
--enable-gcc-wrapper \
|
|
|
|
--enable-shared \
|
2017-04-07 15:28:36 +00:00
|
|
|
|
|
|
|
musl_target := \
|
|
|
|
$(MAKE_JOBS) \
|
2017-04-08 17:23:34 +00:00
|
|
|
$(CROSS_TOOLS_NOCC) \
|
|
|
|
CC="$(CROSS)gcc" \
|
2017-04-07 15:28:36 +00:00
|
|
|
install \
|
2017-01-27 22:55:44 +00:00
|
|
|
|
2017-03-29 19:15:03 +00:00
|
|
|
musl_libraries := \
|
|
|
|
lib/libc.so \
|
2017-01-27 22:55:44 +00:00
|
|
|
|
2016-12-29 23:23:08 +00:00
|
|
|
|
2017-04-16 18:18:46 +00:00
|
|
|
musl_depends := musl-cross
|
|
|
|
|
|
|
|
# Fake a target so that musl will force a header install by the
|
|
|
|
# Linux kernel sources.
|
|
|
|
musl.intermediate: $(INSTALL)/include/linux/limits.h
|
|
|
|
$(INSTALL)/include/linux/limits.h: $(build)/$(linux_dir)/.canary
|
|
|
|
$(MAKE) \
|
|
|
|
-C "$(build)/$(linux_dir)" \
|
|
|
|
INSTALL_HDR_PATH="$(INSTALL)" \
|
|
|
|
headers_install
|
|
|
|
|