1 ################################################################################
5 ################################################################################
8 MUSL_SITE
= http
://www.musl-libc.org
/releases
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
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))" \
27 --target
=$(GNU_TARGET_NAME
) \
28 --host
=$(GNU_TARGET_NAME
) \
31 --disable-gcc-wrapper
)
34 define MUSL_BUILD_CMDS
35 $(TARGET_MAKE_ENV
) $(MAKE
) -C
$(@D
)
38 define MUSL_INSTALL_STAGING_CMDS
39 $(TARGET_MAKE_ENV
) $(MAKE
) -C
$(@D
) \
40 DESTDIR
=$(STAGING_DIR
) install-libs install-tools install-headers
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
)
49 $(eval
$(generic-package
))