Makefile 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. # $Id$
  2. #-
  3. # This file is part of the OpenADK project. OpenADK is copyrighted
  4. # material, please see the LICENCE file in the top-level directory.
  5. _IN_CVTC= 1
  6. include $(TOPDIR)/rules.mk
  7. include ../rules.mk
  8. include Makefile.inc
  9. include ${TOPDIR}/mk/buildhlp.mk
  10. ifeq ($(ADK_NO_FPU),y)
  11. GLIBC_CONFOPTS:= --without-fp
  12. endif
  13. GLIBC_BUILD_DIR:= ${WRKDIR}/$(PKG_NAME)-$(PKG_VERSION)-headers
  14. GLIBC_BUILD_DIR2:= ${WRKDIR}/$(PKG_NAME)-$(PKG_VERSION)-final
  15. $(WRKBUILD)/.headers_configure:
  16. mkdir -p $(GLIBC_BUILD_DIR)
  17. (cd $(GLIBC_BUILD_DIR); \
  18. $(WRKBUILD)/configure \
  19. --prefix=/usr \
  20. --build=$(GNU_HOST_NAME) \
  21. --host=$(REAL_GNU_TARGET_NAME) \
  22. --disable-nls \
  23. --without-cvs \
  24. --with-__thread \
  25. --with-tls \
  26. --enable-add-ons \
  27. --enable-kernel="2.6.0" \
  28. --disable-sanity-checks \
  29. --with-headers=$(TOOLCHAIN_SYSROOT)/usr/include \
  30. --with-sysroot=$(TOOLCHAIN_SYSROOT) \
  31. ${GLIBC_CONFOPTS} \
  32. );
  33. touch $@
  34. $(WRKBUILD)/.headers: $(WRKBUILD)/.headers_configure
  35. $(MAKE) -C $(GLIBC_BUILD_DIR) \
  36. cross-compiling=yes \
  37. install_root=$(TOOLCHAIN_SYSROOT) \
  38. CFLAGS="-DBOOTSTRAP_GCC" install-headers
  39. touch $(TOOLCHAIN_SYSROOT)/usr/include/gnu/stubs.h
  40. touch $(TOOLCHAIN_SYSROOT)/usr/include/bits/stdio_lim.h
  41. touch $@
  42. $(WRKBUILD)/.configure_done:
  43. mkdir -p $(GLIBC_BUILD_DIR2)
  44. (cd $(GLIBC_BUILD_DIR2); \
  45. PATH='${TARGET_PATH}' \
  46. BUILD_CC=gcc \
  47. CFLAGS="$(TARGET_CFLAGS_ARCH) -O2 -pipe" \
  48. CC=${REAL_GNU_TARGET_NAME}-gcc \
  49. AR=${REAL_GNU_TARGET_NAME}-ar \
  50. RANLIB=${REAL_GNU_TARGET_NAME}-ranlib \
  51. LD=${REAL_GNU_TARGET_NAME}-ld \
  52. libc_cv_forced_unwind=yes \
  53. libc_cv_c_cleanup=yes \
  54. libc_cv_gnu99_inline=yes \
  55. $(WRKBUILD)/configure \
  56. --prefix=/usr \
  57. --build=$(GNU_HOST_NAME) \
  58. --host=$(REAL_GNU_TARGET_NAME) \
  59. --disable-nls \
  60. --without-cvs \
  61. --disable-profile \
  62. --disable-debug \
  63. --without-gd \
  64. --enable-shared \
  65. --enable-stackguard-randomization \
  66. --with-__thread \
  67. --with-tls \
  68. --enable-add-ons \
  69. --enable-kernel=2.6.0 \
  70. --with-headers=$(TOOLCHAIN_SYSROOT)/usr/include \
  71. ${GLIBC_CONFOPTS} \
  72. );
  73. touch $@
  74. $(WRKBUILD)/.compiled:
  75. PATH='${TARGET_PATH}' \
  76. CFLAGS="$(TARGET_CFLAGS_ARCH) -O2 -pipe" \
  77. CC=${REAL_GNU_TARGET_NAME}-gcc \
  78. LD=${REAL_GNU_TARGET_NAME}-ld \
  79. RANLIB=${REAL_GNU_TARGET_NAME}-ranlib \
  80. $(MAKE) -C $(GLIBC_BUILD_DIR2) lib \
  81. cross-compiling=yes
  82. touch $@
  83. $(WRKBUILD)/.installed:
  84. PATH='${TARGET_PATH}' \
  85. $(MAKE) -C $(GLIBC_BUILD_DIR2) \
  86. install_root=$(STAGING_DIR) \
  87. install-lib-all install-headers \
  88. install-others cross-compiling=yes
  89. touch $(STAGING_DIR)/usr/include/gnu/stubs.h
  90. touch $@
  91. include ${TOPDIR}/mk/toolchain.mk