1
0

Makefile 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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=$(GNU_HOST_NAME) \
  22. --target=$(REAL_GNU_TARGET_NAME) \
  23. --disable-nls \
  24. --without-cvs \
  25. --disable-sanity-checks \
  26. ${GLIBC_CONFOPTS} \
  27. --with-headers=$(TOOLCHAIN_SYSROOT)/usr/include \
  28. --with-sysroot=$(TOOLCHAIN_SYSROOT) \
  29. );
  30. touch $@
  31. $(WRKBUILD)/.headers: $(WRKBUILD)/.headers_configure
  32. $(MAKE) -C $(GLIBC_BUILD_DIR) \
  33. cross-compiling=yes \
  34. install_root=$(TOOLCHAIN_SYSROOT) \
  35. CFLAGS="-DBOOTSTRAP_GCC" install-headers
  36. touch $(TOOLCHAIN_SYSROOT)/usr/include/gnu/stubs.h
  37. $(CP) $(GLIBC_BUILD_DIR)/bits/stdio_lim.h \
  38. $(TOOLCHAIN_SYSROOT)/usr/include/bits
  39. touch $@
  40. $(WRKBUILD)/.configure_done:
  41. mkdir -p $(GLIBC_BUILD_DIR2)
  42. (cd $(GLIBC_BUILD_DIR2); \
  43. PATH='${TARGET_PATH}' \
  44. BUILD_CC=gcc \
  45. CFLAGS="$(TARGET_CFLAGS_ARCH) -O2 -pipe" \
  46. CC=${REAL_GNU_TARGET_NAME}-gcc \
  47. AR=${REAL_GNU_TARGET_NAME}-ar \
  48. RANLIB=${REAL_GNU_TARGET_NAME}-ranlib \
  49. LD=${REAL_GNU_TARGET_NAME}-ld \
  50. libc_cv_forced_unwind=yes \
  51. libc_cv_c_cleanup=yes \
  52. $(WRKBUILD)/configure \
  53. --prefix=/usr \
  54. --build=$(GNU_TARGET_NAME) \
  55. --host=$(REAL_GNU_TARGET_NAME) \
  56. --disable-nls \
  57. --without-cvs \
  58. --disable-profile \
  59. --disable-debug \
  60. --without-gd \
  61. --enable-shared \
  62. --enable-stackguard-randomization \
  63. --enable-add-ons=nptl --with-__thread \
  64. --with-tls \
  65. --enable-tls \
  66. ${GLIBC_CONFOPTS} \
  67. --with-headers=$(TOOLCHAIN_SYSROOT)/usr/include \
  68. );
  69. touch $@
  70. $(WRKBUILD)/.compiled:
  71. PATH='${TARGET_PATH}' \
  72. CFLAGS="$(TARGET_CFLAGS_ARCH) -O2 -pipe" \
  73. CC=${REAL_GNU_TARGET_NAME}-gcc \
  74. LD=${REAL_GNU_TARGET_NAME}-ld \
  75. RANLIB=${REAL_GNU_TARGET_NAME}-ranlib \
  76. $(MAKE) -C $(GLIBC_BUILD_DIR2) lib \
  77. cross-compiling=yes
  78. touch $@
  79. $(WRKBUILD)/.installed:
  80. PATH='${TARGET_PATH}' \
  81. #CFLAGS="$(TARGET_CFLAGS_ARCH) $(TARGET_CFLAGS)" \
  82. $(MAKE) -C $(GLIBC_BUILD_DIR2) \
  83. install_root=$(STAGING_DIR) \
  84. install-lib-all install-headers \
  85. install-others cross-compiling=yes
  86. touch $(STAGING_DIR)/usr/include/gnu/stubs.h
  87. touch $@
  88. include ${TOPDIR}/mk/toolchain.mk