Config.in.legacy: add missing select BR2_LEGACY
[buildroot-gz.git] / package / musl / musl.mk
blob22589f544e0403f096857f57f39065b849cd5411
1 ################################################################################
3 # musl
5 ################################################################################
7 MUSL_VERSION = 1.1.11
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 is part of the toolchain so disable the toolchain dependency
17 MUSL_ADD_TOOLCHAIN_DEPENDENCY = NO
19 MUSL_INSTALL_STAGING = YES
21 define MUSL_CONFIGURE_CMDS
22 (cd $(@D); \
23 $(TARGET_CONFIGURE_OPTS) \
24 CFLAGS="$(filter-out -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64,$(TARGET_CFLAGS)) $(MUSL_EXTRA_CFLAGS)" \
25 CPPFLAGS="$(filter-out -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64,$(TARGET_CPPFLAGS))" \
26 ./configure \
27 --target=$(GNU_TARGET_NAME) \
28 --host=$(GNU_TARGET_NAME) \
29 --prefix=/usr \
30 --libdir=/lib \
31 --disable-gcc-wrapper)
32 endef
34 define MUSL_BUILD_CMDS
35 $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
36 endef
38 define MUSL_INSTALL_STAGING_CMDS
39 $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
40 DESTDIR=$(STAGING_DIR) install-libs install-tools install-headers
41 endef
43 define MUSL_INSTALL_TARGET_CMDS
44 $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
45 DESTDIR=$(TARGET_DIR) install-libs
46 $(RM) $(addprefix $(TARGET_DIR)/lib/,crt1.o crtn.o crti.o Scrt1.o)
47 endef
49 $(eval $(generic-package))