mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-22 15:02:32 +00:00
4336efe14b
This replaces the current patches used to make the kernel headers compatible with musl with the version which was accepted upstream. This is included in upstream kernel 4.15. This was compile tested with iproute2 build on all supported kernel versions with musl and one one with glibc. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
63 lines
1.5 KiB
Makefile
63 lines
1.5 KiB
Makefile
#
|
|
# Copyright (C) 2012-2013 OpenWrt.org
|
|
#
|
|
# 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
|
|
PKG_VERSION:=1.1.18
|
|
PKG_RELEASE=2
|
|
|
|
PKG_SOURCE_PROTO:=git
|
|
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
|
PKG_SOURCE_VERSION:=72656157f54c47277b01ec85a6ba7c4084fea6c8
|
|
PKG_MIRROR_HASH:=a3d857c23c94aa96a4ad5f442aaf236e5a189a717273c4e4faf425988d98cd32
|
|
PKG_SOURCE_URL:=git://git.musl-libc.org/musl
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
|
|
|
|
LIBC_SO_VERSION:=$(PKG_VERSION)
|
|
PATCH_DIR:=$(PATH_PREFIX)/patches
|
|
|
|
HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)-$(PKG_VERSION)
|
|
|
|
include $(INCLUDE_DIR)/toolchain-build.mk
|
|
include $(INCLUDE_DIR)/hardening.mk
|
|
|
|
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) \
|
|
--disable-gcc-wrapper \
|
|
--enable-debug
|
|
|
|
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
|