treewide: clean up download hashes
[openwrt/staging/lynxis/omap.git] / toolchain / musl / common.mk
1 #
2 # Copyright (C) 2012-2013 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 include $(TOPDIR)/rules.mk
8 include $(INCLUDE_DIR)/target.mk
9
10 PKG_NAME:=musl
11 PKG_VERSION:=$(call qstrip,$(CONFIG_MUSL_VERSION))
12 PKG_RELEASE=1
13
14 PKG_HASH:=97e447c7ee2a7f613186ec54a93054fe15469fe34d7d323080f7ef38f5ecb0fa
15
16 PKG_SOURCE_URL:=http://www.musl-libc.org/releases
17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
18 LIBC_SO_VERSION:=$(PKG_VERSION)
19 PATCH_DIR:=$(PATH_PREFIX)/patches
20
21 HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)-$(PKG_VERSION)
22
23 include $(INCLUDE_DIR)/toolchain-build.mk
24 include $(INCLUDE_DIR)/hardening.mk
25
26 MUSL_CONFIGURE:= \
27 $(TARGET_CONFIGURE_OPTS) \
28 CFLAGS="$(TARGET_CFLAGS)" \
29 CROSS_COMPILE="$(TARGET_CROSS)" \
30 $(HOST_BUILD_DIR)/configure \
31 --prefix=/ \
32 --host=$(GNU_HOST_NAME) \
33 --target=$(REAL_GNU_TARGET_NAME) \
34 --disable-gcc-wrapper \
35 --enable-debug
36
37 define Host/Prepare
38 $(call Host/Prepare/Default)
39 $(if $(strip $(QUILT)), \
40 cd $(HOST_BUILD_DIR); \
41 if $(QUILT_CMD) next >/dev/null 2>&1; then \
42 $(QUILT_CMD) push -a; \
43 fi
44 )
45 ln -snf $(PKG_NAME)-$(PKG_VERSION) $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)
46 endef
47
48 define Host/Configure
49 ( cd $(HOST_BUILD_DIR); rm -f config.cache; \
50 $(MUSL_CONFIGURE) \
51 );
52 endef
53
54 define Host/Clean
55 rm -rf \
56 $(HOST_BUILD_DIR) \
57 $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME) \
58 $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev
59 endef