Makefile 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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_OPTS:= noremove
  8. PKG_DEPENDS:= libgmp mpfr
  9. PKG_BUILDDEP+= gmp mpfr
  10. PKG_HOST_DEPENDS:= !freebsd
  11. include ${TOPDIR}/mk/package.mk
  12. $(eval $(call PKG_template,GCC,gcc,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
  13. TCFLAGS:= ''
  14. TCPPFLAGS:= ''
  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. 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. ${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