1
0

Makefile 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. WRKBUILD= ${WRKDIR}/${PKG_NAME}-obj
  11. include ${TOPDIR}/mk/package.mk
  12. $(eval $(call PKG_template,GCC,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
  13. TCFLAGS:= ''
  14. TCPPFLAGS:= ''
  15. ifeq ($(ADK_LINUX_64),y)
  16. CONFIGURE_ARGS+= --with-abi=64
  17. endif
  18. CONFIGURE_ARGS+= --enable-languages=c,c++ \
  19. --host=$(REAL_GNU_TARGET_NAME) \
  20. --target=$(REAL_GNU_TARGET_NAME) \
  21. --disable-__cxa_atexit \
  22. --without-headers \
  23. --libexecdir=/usr/lib \
  24. --disable-libssp \
  25. --disable-nls \
  26. --disable-sjlj-exceptions \
  27. --disable-biarch \
  28. --disable-libmudflap \
  29. --disable-libgomp \
  30. --disable-multilib \
  31. --disable-libstdcxx-pch
  32. post-install:
  33. ${INSTALL_DIR} ${IDIR_GCC}/usr/lib/gcc ${IDIR_GCC}/usr/bin
  34. ${INSTALL_DIR} ${IDIR_GCC}/lib ${IDIR_GCC}/usr/include/c++
  35. ${INSTALL_BIN} ${WRKINST}/usr/bin/gcc ${IDIR_GCC}/usr/bin/
  36. ${INSTALL_BIN} ${WRKINST}/usr/bin/g++ ${IDIR_GCC}/usr/bin/
  37. cd ${IDIR_GCC}/usr/bin/ && ln -sf g++ c++
  38. cd ${IDIR_GCC}/usr/bin/ && ln -sf gcc cc
  39. ${INSTALL_BIN} ${WRKINST}/usr/bin/cpp ${IDIR_GCC}/usr/bin/
  40. ${CP} ${WRKINST}/usr/lib/libstdc++*so* ${IDIR_GCC}/usr/lib/
  41. ${CP} ${WRKINST}/usr/include/c++/* ${IDIR_GCC}/usr/include/c++/
  42. cd ${IDIR_GCC}/lib && ln -sf ../usr/bin/cpp .
  43. ${CP} ${WRKINST}/usr/lib/gcc/* ${IDIR_GCC}/usr/lib/gcc/
  44. rm -rf ${IDIR_GCC}/usr/lib/gcc/*/*/install-tools
  45. include ${TOPDIR}/mk/pkg-bottom.mk