| @@ -1,29 +1,46 @@ | | | @@ -1,29 +1,46 @@ |
1 | # $NetBSD: options.mk,v 1.8 2012/04/13 11:02:47 hans Exp $ | | 1 | # $NetBSD: options.mk,v 1.9 2014/02/25 21:24:51 wiz Exp $ |
2 | | | 2 | |
3 | PKG_OPTIONS_VAR= PKG_OPTIONS.gcc46 | | 3 | PKG_OPTIONS_VAR= PKG_OPTIONS.gcc46 |
4 | PKG_SUPPORTED_OPTIONS= nls gcc-inplace-math gcc-c++ gcc-fortran gcc-java gcc-objc #gcc-ada | | 4 | PKG_SUPPORTED_OPTIONS= nls gcc-inplace-math gcc-c++ gcc-fortran gcc-java gcc-objc #gcc-ada |
5 | PKG_SUGGESTED_OPTIONS= gcc-c++ gcc-fortran gcc-objc | | 5 | PKG_SUGGESTED_OPTIONS= gcc-c++ gcc-fortran gcc-objc |
6 | .if ${OPSYS} == "NetBSD" | | 6 | .if ${OPSYS} == "NetBSD" |
7 | PKG_SUGGESTED_OPTIONS+= nls | | 7 | PKG_SUGGESTED_OPTIONS+= nls |
8 | .elif ${OPSYS} == "SunOS" | | 8 | .elif ${OPSYS} == "SunOS" |
9 | PKG_SUGGESTED_OPTIONS+= gcc-inplace-math | | 9 | PKG_SUGGESTED_OPTIONS+= gcc-inplace-math |
10 | .endif | | 10 | .endif |
11 | | | 11 | |
12 | PKG_OPTIONS_LEGACY_VARS+= BUILD_CXX:gcc-c++ | | 12 | PKG_OPTIONS_LEGACY_VARS+= BUILD_CXX:gcc-c++ |
13 | PKG_OPTIONS_LEGACY_VARS+= BUILD_FORTRAN:gcc-fortran | | 13 | PKG_OPTIONS_LEGACY_VARS+= BUILD_FORTRAN:gcc-fortran |
14 | PKG_OPTIONS_LEGACY_VARS+= BUILD_JAVA:gcc-java | | 14 | PKG_OPTIONS_LEGACY_VARS+= BUILD_JAVA:gcc-java |
15 | PKG_OPTIONS_LEGACY_VARS+= BUILD_OBJC:gcc-objc | | 15 | PKG_OPTIONS_LEGACY_VARS+= BUILD_OBJC:gcc-objc |
16 | | | 16 | |
| | | 17 | ### |
| | | 18 | ### Determine if multilib is avalible. |
| | | 19 | ### |
| | | 20 | MULTILIB_SUPPORTED?= unknown |
| | | 21 | .if !empty(MACHINE_PLATFORM:MLinux-*-x86_64) |
| | | 22 | . if exists(/usr/include/gnu/stubs-64.h) && \ |
| | | 23 | !exists(/usr/include/gnu/stubs-32.h) |
| | | 24 | MULTILIB_SUPPORTED=No |
| | | 25 | . else |
| | | 26 | MULTILIB_SUPPORTED=Yes |
| | | 27 | . endif |
| | | 28 | .endif |
| | | 29 | .if !empty(MULTILIB_SUPPORTED:M[Yy][Ee][Ss]) |
| | | 30 | PKG_SUPPORTED_OPTIONS+= gcc-multilib |
| | | 31 | PKG_SUGGESTED_OPTIONS+= gcc-multilib |
| | | 32 | .endif |
| | | 33 | |
17 | .include "../../mk/bsd.options.mk" | | 34 | .include "../../mk/bsd.options.mk" |
18 | | | 35 | |
19 | ### | | 36 | ### |
20 | ### Build math libraries in place | | 37 | ### Build math libraries in place |
21 | ### | | 38 | ### |
22 | .if !empty(PKG_OPTIONS:Mgcc-inplace-math) | | 39 | .if !empty(PKG_OPTIONS:Mgcc-inplace-math) |
23 | .include "../../devel/gmp/inplace.mk" | | 40 | .include "../../devel/gmp/inplace.mk" |
24 | .include "../../math/mpcomplex/inplace.mk" | | 41 | .include "../../math/mpcomplex/inplace.mk" |
25 | .include "../../math/mpfr/inplace.mk" | | 42 | .include "../../math/mpfr/inplace.mk" |
26 | .else | | 43 | .else |
27 | CONFIGURE_ARGS+= --with-gmp=${BUILDLINK_PREFIX.gmp} | | 44 | CONFIGURE_ARGS+= --with-gmp=${BUILDLINK_PREFIX.gmp} |
28 | CONFIGURE_ARGS+= --with-mpc=${BUILDLINK_PREFIX.mpcomplex} | | 45 | CONFIGURE_ARGS+= --with-mpc=${BUILDLINK_PREFIX.mpcomplex} |
29 | CONFIGURE_ARGS+= --with-mpfr=${BUILDLINK_PREFIX.mpfr} | | 46 | CONFIGURE_ARGS+= --with-mpfr=${BUILDLINK_PREFIX.mpfr} |
| @@ -38,26 +55,35 @@ LIBS.SunOS+= -lgmp | | | @@ -38,26 +55,35 @@ LIBS.SunOS+= -lgmp |
38 | ### | | 55 | ### |
39 | .if !empty(PKG_OPTIONS:Mnls) | | 56 | .if !empty(PKG_OPTIONS:Mnls) |
40 | USE_TOOLS+= msgfmt | | 57 | USE_TOOLS+= msgfmt |
41 | CONFIGURE_ARGS+= --enable-nls | | 58 | CONFIGURE_ARGS+= --enable-nls |
42 | CONFIGURE_ARGS+= --with-libiconv-prefix=${BUILDLINK_PREFIX.libiconv} | | 59 | CONFIGURE_ARGS+= --with-libiconv-prefix=${BUILDLINK_PREFIX.libiconv} |
43 | MAKE_ENV+= ICONVPREFIX=${BUILDLINK_PREFIX.iconv} | | 60 | MAKE_ENV+= ICONVPREFIX=${BUILDLINK_PREFIX.iconv} |
44 | .include "../../converters/libiconv/buildlink3.mk" | | 61 | .include "../../converters/libiconv/buildlink3.mk" |
45 | .include "../../devel/gettext-lib/buildlink3.mk" | | 62 | .include "../../devel/gettext-lib/buildlink3.mk" |
46 | .else | | 63 | .else |
47 | CONFIGURE_ARGS+= --disable-nls | | 64 | CONFIGURE_ARGS+= --disable-nls |
48 | .endif | | 65 | .endif |
49 | | | 66 | |
50 | ### | | 67 | ### |
| | | 68 | ### Multilib Support |
| | | 69 | ### |
| | | 70 | .if (!empty(MULTILIB_SUPPORTED:M[Yy][Ee][Ss]) && \ |
| | | 71 | empty(PKG_OPTIONS:Mgcc-multilib) ) || \ |
| | | 72 | !empty(MULTILIB_SUPPORTED:M[Nn][Oo]) |
| | | 73 | CONFIGURE_ARGS+= --disable-multilib |
| | | 74 | .endif |
| | | 75 | |
| | | 76 | ### |
51 | ### Optional languages | | 77 | ### Optional languages |
52 | ### Ada could be added although there is a bootstrapping issue. See | | 78 | ### Ada could be added although there is a bootstrapping issue. See |
53 | ### ../gcc34-ada for guidance | | 79 | ### ../gcc34-ada for guidance |
54 | ### | | 80 | ### |
55 | | | 81 | |
56 | LANGS= c | | 82 | LANGS= c |
57 | | | 83 | |
58 | .if !empty(PKG_OPTIONS:Mgcc-java) | | 84 | .if !empty(PKG_OPTIONS:Mgcc-java) |
59 | . if empty(PKG_OPTIONS:Mgcc-c++) | | 85 | . if empty(PKG_OPTIONS:Mgcc-c++) |
60 | PKG_OPTIONS+= gcc-c++ | | 86 | PKG_OPTIONS+= gcc-c++ |
61 | . endif | | 87 | . endif |
62 | | | 88 | |
63 | LANGS+= java | | 89 | LANGS+= java |