1
0

Makefile 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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_CFLAGS:= ''
  14. TARGET_CPPFLAGS:= ''
  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. --enable-cxx-flags="${TARGET_LDFLAGS}"
  33. # disable honour cflags stuff
  34. XAKE_FLAGS+= GCC_HONOUR_COPTS:=s
  35. post-install:
  36. ${INSTALL_DIR} ${IDIR_GCC}/usr/lib/gcc ${IDIR_GCC}/usr/bin
  37. ${INSTALL_DIR} ${IDIR_GCC}/lib ${IDIR_GCC}/usr/include/c++
  38. ${INSTALL_BIN} ${WRKINST}/usr/bin/gcc ${IDIR_GCC}/usr/bin/
  39. ${INSTALL_BIN} ${WRKINST}/usr/bin/g++ ${IDIR_GCC}/usr/bin/
  40. cd ${IDIR_GCC}/usr/bin/ && ln -sf g++ c++
  41. cd ${IDIR_GCC}/usr/bin/ && ln -sf gcc cc
  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. rm -rf ${IDIR_GCC}/usr/lib/gcc/*/*/install-tools
  48. include ${TOPDIR}/mk/pkg-bottom.mk