2012-11-24 04:02:29 +08:00
|
|
|
#
|
2013-07-05 05:26:01 +08:00
|
|
|
# Copyright (C) 2012-2013 OpenWrt.org
|
2012-11-24 04:02:29 +08: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
|
2019-10-14 18:59:09 +08:00
|
|
|
PKG_VERSION:=1.1.24
|
2020-11-20 20:13:27 +08:00
|
|
|
PKG_RELEASE:=3
|
2012-11-24 04:02:29 +08:00
|
|
|
|
2020-05-22 18:48:47 +08:00
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|
|
|
PKG_SOURCE_URL:=https://musl.libc.org/releases/
|
|
|
|
PKG_HASH:=1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
|
2023-09-14 00:20:03 +08:00
|
|
|
PKG_CPE_ID:=cpe:/a:musl-libc:musl
|
2013-02-27 00:40:27 +08:00
|
|
|
|
2012-11-24 04:02:29 +08:00
|
|
|
LIBC_SO_VERSION:=$(PKG_VERSION)
|
2014-05-21 22:09:58 +08:00
|
|
|
PATCH_DIR:=$(PATH_PREFIX)/patches
|
2012-11-24 04:02:29 +08:00
|
|
|
|
2018-01-24 23:43:28 +08:00
|
|
|
BUILD_DIR_HOST:=$(BUILD_DIR_TOOLCHAIN)
|
|
|
|
HOST_BUILD_PREFIX:=$(TOOLCHAIN_DIR)
|
2012-11-24 04:02:29 +08:00
|
|
|
HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)-$(PKG_VERSION)
|
|
|
|
|
2018-01-24 23:43:28 +08:00
|
|
|
include $(INCLUDE_DIR)/host-build.mk
|
2015-06-21 01:37:25 +08:00
|
|
|
include $(INCLUDE_DIR)/hardening.mk
|
2012-11-24 04:02:29 +08:00
|
|
|
|
2018-02-23 06:39:40 +08:00
|
|
|
TARGET_CFLAGS:= $(filter-out -O%,$(TARGET_CFLAGS))
|
2019-01-22 16:50:09 +08:00
|
|
|
TARGET_CFLAGS+= $(if $(CONFIG_MUSL_DISABLE_CRYPT_SIZE_HACK),,-DCRYPT_SIZE_HACK)
|
2018-02-23 06:39:40 +08:00
|
|
|
|
2012-11-24 04:02:29 +08: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 20:41:59 +08:00
|
|
|
--disable-gcc-wrapper \
|
2018-02-23 06:39:40 +08:00
|
|
|
--enable-debug \
|
|
|
|
--enable-optimize
|
2012-11-24 04:02:29 +08:00
|
|
|
|
|
|
|
define Host/Configure
|
2018-01-24 23:46:22 +08:00
|
|
|
ln -snf $(PKG_NAME)-$(PKG_VERSION) $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)
|
2012-11-24 04:02:29 +08:00
|
|
|
( 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
|