ar71xx: Remove ath10k packages from archer-c7-v1 (fixes FS#1743)
[openwrt/openwrt.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:=1.1.21
12 PKG_RELEASE:=1
13
14 PKG_SOURCE_PROTO:=git
15 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
16 PKG_SOURCE_VERSION:=1691b23955590d1eb66a11158fdd91c86337e886
17 PKG_MIRROR_HASH:=4fa312d0ca020d31603ced84a7103fb328c6ae9508239491a228be17e7807147
18 PKG_SOURCE_URL:=git://git.musl-libc.org/musl
19 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
20
21 LIBC_SO_VERSION:=$(PKG_VERSION)
22 PATCH_DIR:=$(PATH_PREFIX)/patches
23
24 BUILD_DIR_HOST:=$(BUILD_DIR_TOOLCHAIN)
25 HOST_BUILD_PREFIX:=$(TOOLCHAIN_DIR)
26 HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)-$(PKG_VERSION)
27
28 include $(INCLUDE_DIR)/host-build.mk
29 include $(INCLUDE_DIR)/hardening.mk
30
31 TARGET_CFLAGS:= $(filter-out -O%,$(TARGET_CFLAGS))
32 TARGET_CFLAGS+= $(if $(CONFIG_MUSL_DISABLE_CRYPT_SIZE_HACK),,-DCRYPT_SIZE_HACK)
33
34 MUSL_CONFIGURE:= \
35 $(TARGET_CONFIGURE_OPTS) \
36 CFLAGS="$(TARGET_CFLAGS)" \
37 CROSS_COMPILE="$(TARGET_CROSS)" \
38 $(HOST_BUILD_DIR)/configure \
39 --prefix=/ \
40 --host=$(GNU_HOST_NAME) \
41 --target=$(REAL_GNU_TARGET_NAME) \
42 --disable-gcc-wrapper \
43 --enable-debug \
44 --enable-optimize
45
46 define Host/Configure
47 ln -snf $(PKG_NAME)-$(PKG_VERSION) $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)
48 ( cd $(HOST_BUILD_DIR); rm -f config.cache; \
49 $(MUSL_CONFIGURE) \
50 );
51 endef
52
53 define Host/Clean
54 rm -rf \
55 $(HOST_BUILD_DIR) \
56 $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME) \
57 $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev
58 endef