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:= 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. TARGET_CPPFLAGS:= ''
  14. TARGET_CFLAGS:= ''
  15. TARGET_CXXFLAGS:= $(filter-out -fstack-protector,$(TARGET_CXXFLAGS))
  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. --enable-cxx-flags="${TARGET_LDFLAGS}"
  34. # disable honour cflags stuff
  35. XAKE_FLAGS+= GCC_HONOUR_COPTS=s
  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. cd ${IDIR_GCC}/usr/bin/ && ln -sf gcc cc
  43. ${INSTALL_BIN} ${WRKINST}/usr/bin/cpp ${IDIR_GCC}/usr/bin/
  44. ${CP} ${WRKINST}/usr/lib/libstdc++*so* ${IDIR_GCC}/usr/lib/
  45. ${CP} ${WRKINST}/usr/include/c++/* ${IDIR_GCC}/usr/include/c++/
  46. cd ${IDIR_GCC}/lib && ln -sf ../usr/bin/cpp .
  47. ${CP} ${WRKINST}/usr/lib/gcc/* ${IDIR_GCC}/usr/lib/gcc/
  48. rm -rf ${IDIR_GCC}/usr/lib/gcc/*/*/install-tools
  49. include ${TOPDIR}/mk/pkg-bottom.mk