gcc4.port.mk 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. # $OpenBSD: gcc4.port.mk,v 1.8 2017/06/04 23:22:57 sthen Exp $
  2. MODGCC4_ARCHS ?=
  3. MODGCC4_LANGS ?=
  4. .if ${MODGCC4_LANGS:L} != "java" && !${MODGCC4_LANGS:L:Mc}
  5. # Always include support for this
  6. # unless only java is needed
  7. MODGCC4_LANGS += c
  8. .endif
  9. _MODGCC4_OKAY = c c++ java fortran
  10. .for _l in ${MODGCC4_LANGS:L}
  11. . if !${_MODGCC4_OKAY:M${_l}}
  12. ERRORS += "Fatal: unknown language ${_l}"
  13. . endif
  14. .endfor
  15. _MODGCC4_ARCH_USES = No
  16. .if ${MODGCC4_ARCHS:L} != ""
  17. . for _i in ${MODGCC4_ARCHS}
  18. . if !empty(MACHINE_ARCH:M${_i})
  19. _MODGCC4_ARCH_USES = Yes
  20. . endif
  21. . endfor
  22. .endif
  23. COMPILER_VERSION ?= gcc2
  24. _MODGCC4_LINKS =
  25. MODGCC4STDCPP = estdc++
  26. MODGCC4_CPPLIBDEP = lang/gcc/4.9,-libs>=4.9,<4.10
  27. MODGCC4_CPPDEP = lang/gcc/4.9,-c++>=4.9,<4.10
  28. MODGCC4_CPPWANTLIB = estdc++>=17
  29. MODGCC4_ATOMICWANTLIB = atomic
  30. .if ${_MODGCC4_ARCH_USES:L} == "yes"
  31. . if ${MODGCC4_LANGS:L:Mc}
  32. BUILD_DEPENDS += lang/gcc/4.9>=4.9,<4.10
  33. COMPILER_LINKS += gcc ${LOCALBASE}/bin/egcc cc ${LOCALBASE}/bin/egcc
  34. . endif
  35. . if ${MODGCC4_LANGS:L:Mc++}
  36. BUILD_DEPENDS += ${MODGCC4_CPPDEP}
  37. LIB_DEPENDS += ${MODGCC4_CPPLIBDEP}
  38. WANTLIB += ${MODGCC4_CPPWANTLIB}
  39. COMPILER_LINKS += c++ ${LOCALBASE}/bin/eg++ g++ ${LOCALBASE}/bin/eg++
  40. . endif
  41. . if ${MODGCC4_LANGS:L:Mfortran}
  42. BUILD_DEPENDS += lang/gcc/4.9,-f95>=4.9,<4.10
  43. WANTLIB += gfortran>=3
  44. # XXX sync with Makefile
  45. .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
  46. WANTLIB += quadmath
  47. .endif
  48. LIB_DEPENDS += lang/gcc/4.9,-libs>=4.9,<4.10
  49. COMPILER_LINKS += gfortran ${LOCALBASE}/bin/egfortran
  50. . endif
  51. . if ${MODGCC4_LANGS:L:Mjava}
  52. BUILD_DEPENDS += lang/gcc/4.9,-java>=4.9,<4.10
  53. MODGCC4_GCJWANTLIB = gcj
  54. MODGCC4_GCJLIBDEP = lang/gcc/4.9,-java>=4.9,<4.10
  55. COMPILER_LINKS += gcj ${LOCALBASE}/bin/egcj
  56. _MODGCC4_LINKS += gcjh gjar gij
  57. . endif
  58. #. if ${MODGCC4_LANGS:L:Mgo}
  59. #BUILD_DEPENDS += lang/gcc/4.9,-go>=4.9,<4.10
  60. #WANTLIB += go
  61. #LIB_DEPENDS += lang/gcc/4.9,-go>=4.9,<4.10
  62. #COMPILER_LINKS += gccgo ${LOCALBASE}/bin/egccgo
  63. #. endif
  64. .endif
  65. .if !empty(_MODGCC4_LINKS)
  66. . for _src in ${_MODGCC4_LINKS}
  67. MODGCC4_post-patch += ln -sf ${LOCALBASE}/bin/e${_src} ${WRKDIR}/bin/${_src};
  68. . endfor
  69. .endif