1 # This file is part of the OpenADK project. OpenADK is copyrighted
2 # material, please see the LICENCE file in the top-level directory.
4 include $(TOPDIR
)/rules.mk
7 include ${TOPDIR}/mk
/buildhlp.mk
13 EGLIBC_CONFOPTS
:= --build
=$(GNU_HOST_NAME
) \
14 --host
=$(REAL_GNU_TARGET_NAME
) \
19 --enable-kernel
=2.6.0 \
25 EGLIBC_ENV
:= PATH
='${TARGET_PATH}' \
27 CFLAGS
="$(TARGET_CFLAGS)" \
28 CC
=${REAL_GNU_TARGET_NAME}-gcc \
29 CXX
=${REAL_GNU_TARGET_NAME}-g
++ \
30 AR
=${REAL_GNU_TARGET_NAME}-ar \
31 RANLIB
=${REAL_GNU_TARGET_NAME}-ranlib \
32 libc_cv_forced_unwind
=yes \
33 libc_cv_c_cleanup
=yes \
34 libc_cv_gnu99_inline
=yes \
35 libc_cv_slibdir
="/lib"
37 ifeq ($(ADK_TARGET_NO_FPU
),y
)
38 EGLIBC_CONFOPTS
+= --without-fp
41 EGLIBC_BUILD_DIR_INITIAL
:= ${WRKDIR}/$(PKG_NAME
)-$(PKG_VERSION
)-headers
42 EGLIBC_BUILD_DIR_FINAL
:= ${WRKDIR}/$(PKG_NAME
)-$(PKG_VERSION
)-final
44 $(WRKBUILD
)/.headers_configure
:
45 mkdir
-p
$(EGLIBC_BUILD_DIR_INITIAL
)
46 (cd
${WRKDIR}/$(PKG_NAME
)-$(PKG_VERSION
); \
47 ln
-sf ..
/ports
${WRKDIR}/$(PKG_NAME
)-$(PKG_VERSION
)/libc
);
48 $(CP
) ${TOPDIR}/toolchain
/eglibc
/eglibc.config \
49 $(EGLIBC_BUILD_DIR_INITIAL
)/option-groups.config
50 (cd
$(EGLIBC_BUILD_DIR_INITIAL
); \
52 $(WRKBUILD
)/libc
/configure \
53 --prefix=$(STAGING_TARGET_DIR
)/usr \
54 --with-headers
=$(STAGING_TARGET_DIR
)/usr
/include \
59 $(WRKBUILD
)/.headers
: $(WRKBUILD
)/.headers_configure
60 (cd
$(EGLIBC_BUILD_DIR_INITIAL
); \
61 PATH
='${TARGET_PATH}' \
62 $(MAKE
) install-headers install-bootstrap-headers
=yes \
64 touch
$(STAGING_TARGET_DIR
)/usr
/include/gnu
/stubs.h
67 ifeq ($(ADK_TOOLCHAIN_GCC_USE_SSP
),y
)
68 EGLIBC_ENV
+= libc_cv_ssp
=yes
70 EGLIBC_ENV
+= libc_cv_ssp
=no
73 $(WRKBUILD
)/.configured
:
74 mkdir
-p
$(EGLIBC_BUILD_DIR_FINAL
)
75 $(CP
) ${TOPDIR}/toolchain
/eglibc
/eglibc.config \
76 $(EGLIBC_BUILD_DIR_FINAL
)/option-groups.config
77 (cd
$(EGLIBC_BUILD_DIR_FINAL
); \
79 $(WRKBUILD
)/libc
/configure \
82 --enable-stackguard-randomization \
87 $(EGLIBC_BUILD_DIR_FINAL
)/libc.so
:
88 $(WRKBUILD
)/.compiled
: $(WRKBUILD
)/.configured
89 ${EGLIBC_ENV} $(MAKE
) -C
$(EGLIBC_BUILD_DIR_FINAL
) all
92 $(WRKBUILD
)/.installed
: $(EGLIBC_BUILD_DIR_FINAL
)/libc.so
93 ${EGLIBC_ENV} $(MAKE
) -C
$(EGLIBC_BUILD_DIR_FINAL
) install_root
=$(STAGING_TARGET_DIR
) install
94 ${INSTALL_DATA} ${WRKBUILD}/libc
/posix
/gai.conf
${STAGING_TARGET_DIR}/etc
/
95 ${INSTALL_DATA} ${WRKBUILD}/libc
/nscd
/nscd.conf
${STAGING_TARGET_DIR}/etc
/
96 ${INSTALL_DATA} ${WRKBUILD}/libc
/nss
/nsswitch.conf
${STAGING_TARGET_DIR}/etc
/
99 include ${TOPDIR}/mk
/toolchain.mk