Makefile 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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:= libmpc libgmp mpfr
  9. PKG_BUILDDEP:= libmpc gmp mpfr
  10. PKG_TARGET_DEPENDS:= !ag241
  11. WRKBUILD= ${WRKDIR}/${PKG_NAME}-obj
  12. include ${TOPDIR}/mk/package.mk
  13. $(eval $(call PKG_template,GCC,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
  14. TCFLAGS:= ''
  15. TCPPFLAGS:= ''
  16. ifeq ($(ADK_LINUX_64),y)
  17. CONFIGURE_ARGS+= --with-abi=64
  18. endif
  19. CONFIGURE_ARGS+= --enable-languages=c,c++ \
  20. --host=$(REAL_GNU_TARGET_NAME) \
  21. --target=$(REAL_GNU_TARGET_NAME) \
  22. --disable-__cxa_atexit \
  23. --without-headers \
  24. --libexecdir=/usr/lib \
  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. post-install:
  34. ${INSTALL_DIR} ${IDIR_GCC}/usr/lib/gcc ${IDIR_GCC}/usr/bin
  35. ${INSTALL_DIR} ${IDIR_GCC}/lib ${IDIR_GCC}/usr/include/c++
  36. ${INSTALL_BIN} ${WRKINST}/usr/bin/gcc ${IDIR_GCC}/usr/bin/
  37. ${INSTALL_BIN} ${WRKINST}/usr/bin/g++ ${IDIR_GCC}/usr/bin/
  38. cd ${IDIR_GCC}/usr/bin/ && ln -sf g++ c++
  39. cd ${IDIR_GCC}/usr/bin/ && ln -sf gcc cc
  40. ${INSTALL_BIN} ${WRKINST}/usr/bin/cpp ${IDIR_GCC}/usr/bin/
  41. ${CP} ${WRKINST}/usr/lib/libstdc++*so* ${IDIR_GCC}/usr/lib/
  42. ${CP} ${WRKINST}/usr/include/c++/* ${IDIR_GCC}/usr/include/c++/
  43. cd ${IDIR_GCC}/lib && ln -sf ../usr/bin/cpp .
  44. ${CP} ${WRKINST}/usr/lib/gcc/* ${IDIR_GCC}/usr/lib/gcc/
  45. rm -rf ${IDIR_GCC}/usr/lib/gcc/*/*/install-tools
  46. include ${TOPDIR}/mk/pkg-bottom.mk