Makefile 1.9 KB

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