blob: 595ac3edae71b8766653eca833fae1fbde9fff6b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.
include $(TOPDIR)/rules.mk
include $(TOPDIR)/toolchain/glibc/Makefile.inc
PKG_DESCR:= GNU C library
PKG_SECTION:= base
NO_DISTFILES:= 1
PKG_OPTS:= noremove
include $(TOPDIR)/mk/package.mk
$(eval $(call PKG_template,GLIBC,glibc,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
do-extract:
# do nothing, glibc is already build in toolchain directory
do-install:
${INSTALL_DIR} $(IDIR_GLIBC)/lib $(IDIR_GLIBC)/etc
# install /etc/localtime from host system (FIXME)
${CP} /etc/localtime $(IDIR_GLIBC)/etc
ifeq ($(ADK_SSP),y)
$(CP) $(STAGING_DIR)/lib/libssp.so* $(IDIR_GLIBC)/lib/
endif
$(CP) $(STAGING_DIR)/lib/libgcc_s.so* $(IDIR_GLIBC)/lib/
$(CP) $(STAGING_DIR)/lib/ld-*.so* $(IDIR_GLIBC)/lib/
-for file in libc libcrypt libdl libm libresolv librt libutil libnss_compat libnss_dns libnss_files; do \
$(CP) $(STAGING_DIR)/lib/$$file.so* $(IDIR_GLIBC)/lib/; \
$(CP) $(STAGING_DIR)/lib/$$file-$(PKG_VERSION).so $(IDIR_GLIBC)/lib/; \
done
# create ld.so link for mips gcc linker option
cd $(IDIR_GLIBC)/lib && ln -sf ld-linux.so.2 ld.so.1
# header package
$(MAKE) -C $(TOOLCHAIN_BUILD_DIR)/linux-$(KERNEL_VERSION) ARCH=$(ARCH) V=1 \
INSTALL_HDR_PATH=$(IDIR_GLIBC_DEV)/usr \
headers_install
$(MAKE) -C $(TOOLCHAIN_BUILD_DIR)/${PKG_NAME}-${PKG_VERSION} \
PREFIX=$(IDIR_GLIBC_DEV)/ \
DEVEL_PREFIX=/usr/ \
RUNTIME_PREFIX=$(IDIR_GLIBC_DEV)/ \
HOSTCC="$(HOSTCC)" \
CPU_CFLAGS="$(TARGET_CFLAGS)" \
install_headers
@find $(IDIR_GLIBC_DEV) -name .install -delete
@find $(IDIR_GLIBC_DEV) -name ..install.cmd -delete
include ${TOPDIR}/mk/pkg-bottom.mk
|