2 # Copyright (C) 2012-2013 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 include $(TOPDIR
)/rules.mk
8 include $(INCLUDE_DIR
)/target.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=https
://musl.libc.org
/releases
/
16 PKG_HASH
:=7a35eae33d5372a7c0da1188de798726f68825513b7ae3ebe97aaaa52114f039
17 PKG_CPE_ID
:=cpe
:/a
:musl-libc
:musl
19 LIBC_SO_VERSION
:=$(PKG_VERSION
)
20 PATCH_DIR
:=$(PATH_PREFIX
)/patches
22 BUILD_DIR_HOST
:=$(BUILD_DIR_TOOLCHAIN
)
23 HOST_BUILD_PREFIX
:=$(TOOLCHAIN_DIR
)
24 HOST_BUILD_DIR
:=$(BUILD_DIR_TOOLCHAIN
)/$(PKG_NAME
)-$(PKG_VERSION
)
26 include $(INCLUDE_DIR
)/host-build.mk
27 include $(INCLUDE_DIR
)/hardening.mk
29 TARGET_CFLAGS
:= $(filter-out -O
%,$(TARGET_CFLAGS
))
30 TARGET_CFLAGS
+= $(if
$(CONFIG_MUSL_DISABLE_CRYPT_SIZE_HACK
),,-DCRYPT_SIZE_HACK
)
33 $(TARGET_CONFIGURE_OPTS
) \
34 CFLAGS
="$(TARGET_CFLAGS)" \
35 CROSS_COMPILE
="$(TARGET_CROSS)" \
36 $(HOST_BUILD_DIR
)/configure \
38 --host
=$(GNU_HOST_NAME
) \
39 --target
=$(REAL_GNU_TARGET_NAME
) \
40 --disable-gcc-wrapper \
45 ln
-snf
$(PKG_NAME
)-$(PKG_VERSION
) $(BUILD_DIR_TOOLCHAIN
)/$(PKG_NAME
)
46 ( cd
$(HOST_BUILD_DIR
); rm -f config.cache
; \
54 $(BUILD_DIR_TOOLCHAIN
)/$(PKG_NAME
) \
55 $(BUILD_DIR_TOOLCHAIN
)/$(LIBC
)-dev