2012-11-23 20:02:29 +00:00
|
|
|
#
|
2013-07-04 21:26:01 +00:00
|
|
|
# Copyright (C) 2012-2013 OpenWrt.org
|
2012-11-23 20:02:29 +00:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
include $(INCLUDE_DIR)/target.mk
|
|
|
|
|
|
|
|
PKG_NAME:=musl
|
2017-02-07 09:38:47 +00:00
|
|
|
PKG_VERSION:=1.1.16
|
2014-02-24 21:10:11 +00:00
|
|
|
PKG_RELEASE=1
|
2012-11-23 20:02:29 +00:00
|
|
|
|
2017-01-03 16:51:04 +00:00
|
|
|
PKG_SOURCE_PROTO:=git
|
|
|
|
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
2017-08-22 14:37:33 +00:00
|
|
|
PKG_SOURCE_VERSION:=1698fe6cdcdeaad03aa19a85433d5396ecfc51ef
|
|
|
|
PKG_MIRROR_HASH:=f07d14a8a647cf0b2a59cadea013abfc5e2e9eb527891d60b7f8370371ee4a71
|
2017-01-03 16:51:04 +00:00
|
|
|
PKG_SOURCE_URL:=git://git.musl-libc.org/musl
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
|
2013-02-26 16:40:27 +00:00
|
|
|
|
2012-11-23 20:02:29 +00:00
|
|
|
LIBC_SO_VERSION:=$(PKG_VERSION)
|
2014-05-21 14:09:58 +00:00
|
|
|
PATCH_DIR:=$(PATH_PREFIX)/patches
|
2012-11-23 20:02:29 +00:00
|
|
|
|
|
|
|
HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)-$(PKG_VERSION)
|
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/toolchain-build.mk
|
2015-06-20 17:37:25 +00:00
|
|
|
include $(INCLUDE_DIR)/hardening.mk
|
2012-11-23 20:02:29 +00:00
|
|
|
|
|
|
|
MUSL_CONFIGURE:= \
|
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
|
|
CFLAGS="$(TARGET_CFLAGS)" \
|
|
|
|
CROSS_COMPILE="$(TARGET_CROSS)" \
|
|
|
|
$(HOST_BUILD_DIR)/configure \
|
|
|
|
--prefix=/ \
|
|
|
|
--host=$(GNU_HOST_NAME) \
|
|
|
|
--target=$(REAL_GNU_TARGET_NAME) \
|
2016-01-19 12:41:59 +00:00
|
|
|
--disable-gcc-wrapper \
|
|
|
|
--enable-debug
|
2012-11-23 20:02:29 +00:00
|
|
|
|
|
|
|
define Host/Prepare
|
|
|
|
$(call Host/Prepare/Default)
|
|
|
|
$(if $(strip $(QUILT)), \
|
|
|
|
cd $(HOST_BUILD_DIR); \
|
|
|
|
if $(QUILT_CMD) next >/dev/null 2>&1; then \
|
|
|
|
$(QUILT_CMD) push -a; \
|
|
|
|
fi
|
|
|
|
)
|
|
|
|
ln -snf $(PKG_NAME)-$(PKG_VERSION) $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Host/Configure
|
|
|
|
( cd $(HOST_BUILD_DIR); rm -f config.cache; \
|
|
|
|
$(MUSL_CONFIGURE) \
|
|
|
|
);
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Host/Clean
|
|
|
|
rm -rf \
|
|
|
|
$(HOST_BUILD_DIR) \
|
|
|
|
$(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME) \
|
|
|
|
$(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev
|
|
|
|
endef
|