Makefile 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. include ${TOPDIR}/rules.mk
  4. include ${TOPDIR}/toolchain/gcc/Makefile.inc
  5. PKG_DESCR:= GNU compiler collection
  6. PKG_SECTION:= lang
  7. PKG_OPTS:= noremove
  8. PKG_DEPENDS:= libgmp mpfr
  9. PKG_BUILDDEP+= gmp mpfr
  10. ifeq ($(ADK_TARGET_LIB_UCLIBC),y)
  11. PKG_DEPENDS+= uclibc-dev
  12. PKG_BUILDDEP+= uclibc
  13. endif
  14. ifeq ($(ADK_TARGET_LIB_EGLIBC),y)
  15. PKG_DEPENDS+= eglibc-dev
  16. PKG_BUILDDEP+= eglibc
  17. endif
  18. ifeq ($(ADK_TARGET_LIB_GLIBC),y)
  19. PKG_DEPENDS+= glibc-dev
  20. PKG_BUILDDEP+= glibc
  21. endif
  22. PKG_HOST_DEPENDS:= !freebsd
  23. PKG_TARGET_DEPENDS:= !ag241
  24. include ${TOPDIR}/mk/package.mk
  25. $(eval $(call PKG_template,GCC,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
  26. TCFLAGS:= ''
  27. TCPPFLAGS:= ''
  28. ifeq ($(ADK_LINUX_64),y)
  29. CONFIGURE_ARGS+= --with-abi=64
  30. endif
  31. CONFIGURE_ARGS+= --enable-languages=c,c++ \
  32. --host=$(REAL_GNU_TARGET_NAME) \
  33. --target=$(REAL_GNU_TARGET_NAME) \
  34. --disable-__cxa_atexit \
  35. --without-headers \
  36. --libexecdir=/usr/lib \
  37. --with-gnu-ld \
  38. --disable-libssp \
  39. --disable-nls \
  40. --disable-sjlj-exceptions \
  41. --disable-biarch \
  42. --disable-libmudflap \
  43. --disable-libgomp \
  44. --disable-multilib \
  45. --disable-libstdcxx-pch
  46. post-install:
  47. ${INSTALL_DIR} ${IDIR_GCC}/usr/lib/gcc ${IDIR_GCC}/usr/bin
  48. ${INSTALL_DIR} ${IDIR_GCC}/lib ${IDIR_GCC}/usr/include/c++
  49. ${INSTALL_BIN} ${WRKINST}/usr/bin/gcc ${IDIR_GCC}/usr/bin/
  50. ${INSTALL_BIN} ${WRKINST}/usr/bin/g++ ${IDIR_GCC}/usr/bin/
  51. cd ${IDIR_GCC}/usr/bin/ && ln -sf g++ c++
  52. cd ${IDIR_GCC}/usr/bin/ && ln -sf gcc cc
  53. ${INSTALL_BIN} ${WRKINST}/usr/bin/cpp ${IDIR_GCC}/usr/bin/
  54. ${CP} ${WRKINST}/usr/lib/libstdc++*so* ${IDIR_GCC}/usr/lib/
  55. ${CP} ${WRKINST}/usr/include/c++/* ${IDIR_GCC}/usr/include/c++/
  56. cd ${IDIR_GCC}/lib && ln -sf ../usr/bin/cpp .
  57. ${CP} ${WRKINST}/usr/lib/gcc/* ${IDIR_GCC}/usr/lib/gcc/
  58. rm -rf ${IDIR_GCC}/usr/lib/gcc/*/*/install-tools
  59. include ${TOPDIR}/mk/pkg-bottom.mk