python-dataproperty: bump version to 0.17.0
[buildroot-gz.git] / package / musl / musl.mk
blob6d5603398b8d68da0b7de52f790533e7e8a8b638
1 ################################################################################
3 # musl
5 ################################################################################
7 MUSL_VERSION = 1.1.16
8 MUSL_SITE = http://www.musl-libc.org/releases
9 MUSL_LICENSE = MIT
10 MUSL_LICENSE_FILES = COPYRIGHT
12 # Before musl is configured, we must have the first stage
13 # cross-compiler and the kernel headers
14 MUSL_DEPENDENCIES = host-gcc-initial linux-headers
16 # musl does not provide an implementation for sys/queue.h or sys/cdefs.h.
17 # So, add the musl-compat-headers package that will install those files,
18 # into the staging directory:
19 # sys/queue.h: header from NetBSD
20 # sys/cdefs.h: minimalist header bundled in Buildroot
21 MUSL_DEPENDENCIES += musl-compat-headers
23 # musl is part of the toolchain so disable the toolchain dependency
24 MUSL_ADD_TOOLCHAIN_DEPENDENCY = NO
26 MUSL_INSTALL_STAGING = YES
28 # Thumb build is broken, build in ARM mode, since all architectures
29 # that support Thumb1 also support ARM.
30 ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB),y)
31 MUSL_EXTRA_CFLAGS += -marm
32 endif
34 define MUSL_CONFIGURE_CMDS
35 (cd $(@D); \
36 $(TARGET_CONFIGURE_OPTS) \
37 CFLAGS="$(filter-out -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64,$(TARGET_CFLAGS)) $(MUSL_EXTRA_CFLAGS)" \
38 CPPFLAGS="$(filter-out -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64,$(TARGET_CPPFLAGS))" \
39 ./configure \
40 --target=$(GNU_TARGET_NAME) \
41 --host=$(GNU_TARGET_NAME) \
42 --prefix=/usr \
43 --libdir=/lib \
44 --disable-gcc-wrapper \
45 --enable-static \
46 $(if $(BR2_STATIC_LIBS),--disable-shared,--enable-shared))
47 endef
49 define MUSL_BUILD_CMDS
50 $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
51 endef
53 define MUSL_INSTALL_STAGING_CMDS
54 $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
55 DESTDIR=$(STAGING_DIR) install-libs install-tools install-headers
56 endef
58 define MUSL_INSTALL_TARGET_CMDS
59 $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
60 DESTDIR=$(TARGET_DIR) install-libs
61 $(RM) $(addprefix $(TARGET_DIR)/lib/,crt1.o crtn.o crti.o Scrt1.o)
62 endef
64 $(eval $(generic-package))