gcc4.port.mk 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. # $OpenBSD: gcc4.port.mk,v 1.12 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 go
  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. .if ${_MODGCC4_ARCH_USES:L} == "yes"
  26. . if ${MODGCC4_LANGS:L:Mc}
  27. BUILD_DEPENDS += lang/gcc/4.6>=4.6,<4.7
  28. COMPILER_LINKS += gcc ${LOCALBASE}/bin/egcc cc ${LOCALBASE}/bin/egcc
  29. . endif
  30. . if ${MODGCC4_LANGS:L:Mc++}
  31. BUILD_DEPENDS += lang/gcc/4.6,-c++>=4.6,<4.7
  32. MODGCC4STDCPP = estdc++
  33. MODGCC4_CPPLIBDEP = lang/gcc/4.6,-estdc>=4.6,<4.7
  34. LIB_DEPENDS += ${MODGCC4_CPPLIBDEP}
  35. MODGCC4_CPPWANTLIB = estdc++>=14
  36. WANTLIB += ${MODGCC4_CPPWANTLIB}
  37. COMPILER_LINKS += c++ ${LOCALBASE}/bin/eg++ g++ ${LOCALBASE}/bin/eg++
  38. . endif
  39. . if ${MODGCC4_LANGS:L:Mfortran}
  40. BUILD_DEPENDS += lang/gcc/4.6,-f95>=4.6,<4.7
  41. WANTLIB += gfortran>=3
  42. LIB_DEPENDS += lang/gcc/4.6,-f95>=4.6,<4.7
  43. COMPILER_LINKS += gfortran ${LOCALBASE}/bin/egfortran
  44. . endif
  45. . if ${MODGCC4_LANGS:L:Mjava}
  46. BUILD_DEPENDS += lang/gcc/4.6,-java>=4.6,<4.7
  47. MODGCC4_GCJWANTLIB = gcj
  48. MODGCC4_GCJLIBDEP = lang/gcc/4.6,-java>=4.6,<4.7
  49. COMPILER_LINKS += gcj ${LOCALBASE}/bin/egcj
  50. _MODGCC4_LINKS += gcjh gjar gij
  51. . endif
  52. . if ${MODGCC4_LANGS:L:Mgo}
  53. BUILD_DEPENDS += lang/gcc/4.6,-go>=4.6,<4.7
  54. WANTLIB += go
  55. LIB_DEPENDS += lang/gcc/4.6,-go>=4.6,<4.7
  56. COMPILER_LINKS += gccgo ${LOCALBASE}/bin/egccgo
  57. . endif
  58. .endif
  59. .if !empty(_MODGCC4_LINKS)
  60. . for _src in ${_MODGCC4_LINKS}
  61. MODGCC4_post-patch += ln -sf ${LOCALBASE}/bin/e${_src} ${WRKDIR}/bin/${_src};
  62. . endfor
  63. .endif