Makefile 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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:= comp
  7. PKG_DEPENDS:= mpfr
  8. PKG_OPTS:= noremove
  9. PKG_BUILDDEP+= gmp mpfr
  10. include ${TOPDIR}/mk/package.mk
  11. $(eval $(call PKG_template,GCC,gcc,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
  12. TCFLAGS:= ''
  13. TCPPFLAGS:= ''
  14. CONFIGURE_STYLE:= gnu
  15. ifeq ($(ADK_LINUX_MIPS64_LEMOTE),y)
  16. CONFIGURE_ARGS+= --with-abi=64
  17. endif
  18. CONFIGURE_ARGS+= --enable-languages=c,c++ \
  19. --libexecdir=/usr/lib \
  20. --host=$(REAL_GNU_TARGET_NAME) \
  21. --target=$(REAL_GNU_TARGET_NAME) \
  22. --disable-__cxa_atexit \
  23. --without-headers \
  24. --with-gnu-ld \
  25. --disable-libssp \
  26. --disable-nls \
  27. --disable-sjlj-exceptions \
  28. --disable-biarch \
  29. --disable-libmudflap \
  30. --disable-libgomp \
  31. --disable-multilib \
  32. --disable-libstdcxx-pch
  33. BUILD_STYLE:= auto
  34. INSTALL_STYLE:= auto
  35. post-install:
  36. ${INSTALL_DIR} ${IDIR_GCC}/usr/lib/gcc ${IDIR_GCC}/usr/bin
  37. ${INSTALL_DIR} ${IDIR_GCC}/lib ${IDIR_GCC}/usr/include/c++
  38. ${INSTALL_BIN} ${WRKINST}/usr/bin/gcc ${IDIR_GCC}/usr/bin/
  39. ${INSTALL_BIN} ${WRKINST}/usr/bin/g++ ${IDIR_GCC}/usr/bin/
  40. cd ${IDIR_GCC}/usr/bin/ && ln -sf g++ c++
  41. ${INSTALL_BIN} ${WRKINST}/usr/bin/cpp ${IDIR_GCC}/usr/bin/
  42. ${CP} ${WRKINST}/usr/lib/libstdc++*so* ${IDIR_GCC}/usr/lib/
  43. ${CP} ${WRKINST}/usr/include/c++/* ${IDIR_GCC}/usr/include/c++/
  44. cd ${IDIR_GCC}/lib && ln -sf ../usr/bin/cpp .
  45. ${CP} ${WRKINST}/usr/lib/gcc/* ${IDIR_GCC}/usr/lib/gcc/
  46. ifeq ($(ADK_TARGET_LIB_UCLIBC),y)
  47. ${CP} ${STAGING_DIR}/lib/crt* ${IDIR_GCC}/usr/lib
  48. else
  49. ${CP} ${STAGING_DIR}/usr/lib/crt* ${IDIR_GCC}/usr/lib
  50. ${CP} ${STAGING_DIR}/usr/lib/libc_nonshared.a ${IDIR_GCC}/usr/lib
  51. endif
  52. rm -rf ${IDIR_GCC}/usr/lib/gcc/*/*/install-tools
  53. include ${TOPDIR}/mk/pkg-bottom.mk