Restrict gcc gsed usage to NetBSD (NetBSD/mips64 progress further with gsed) Adding gsed as a tool creates circular dependencies if pkgsrc gcc is used as the bootstrap compiler. Pointed out by jperkin, sorry.diff -r1.33 -r1.34 pkgsrc/lang/gcc48/Makefile
(maya)
@@ -1,175 +1,176 @@ | @@ -1,175 +1,176 @@ | |||
1 | # $NetBSD: Makefile,v 1.33 2017/06/21 21:16:35 maya Exp $ | 1 | # $NetBSD: Makefile,v 1.34 2017/06/22 21:44:49 maya Exp $ | |
2 | 2 | |||
3 | GCC_PKGNAME= gcc48 | 3 | GCC_PKGNAME= gcc48 | |
4 | .include "version.mk" | 4 | .include "version.mk" | |
5 | 5 | |||
6 | DISTNAME= gcc-${GCC48_DIST_VERSION} | 6 | DISTNAME= gcc-${GCC48_DIST_VERSION} | |
7 | PKGNAME= ${GCC_PKGNAME}-${GCC48_DIST_VERSION} | 7 | PKGNAME= ${GCC_PKGNAME}-${GCC48_DIST_VERSION} | |
8 | ## When bumping the PKGREVISION of this package the PKGREVISION of | 8 | ## When bumping the PKGREVISION of this package the PKGREVISION of | |
9 | ## lang/gcc48-libs needs to be bump to be at least 1 more than the | 9 | ## lang/gcc48-libs needs to be bump to be at least 1 more than the | |
10 | ## PKGREVISION of this package! | 10 | ## PKGREVISION of this package! | |
11 | PKGREVISION= 1 | 11 | PKGREVISION= 1 | |
12 | CATEGORIES= lang | 12 | CATEGORIES= lang | |
13 | MASTER_SITES= ${MASTER_SITE_GNU:=gcc/gcc-${GCC48_DIST_VERSION}/} | 13 | MASTER_SITES= ${MASTER_SITE_GNU:=gcc/gcc-${GCC48_DIST_VERSION}/} | |
14 | EXTRACT_SUFX= .tar.bz2 | 14 | EXTRACT_SUFX= .tar.bz2 | |
15 | 15 | |||
16 | MAINTAINER= maya@NetBSD.org | 16 | MAINTAINER= maya@NetBSD.org | |
17 | HOMEPAGE= http://gcc.gnu.org/ | 17 | HOMEPAGE= http://gcc.gnu.org/ | |
18 | COMMENT= The GNU Compiler Collection (GCC) - 4.8 Release Series | 18 | COMMENT= The GNU Compiler Collection (GCC) - 4.8 Release Series | |
19 | LICENSE= gnu-gpl-v2 AND gnu-gpl-v3 AND gnu-lgpl-v2 AND gnu-lgpl-v3 | 19 | LICENSE= gnu-gpl-v2 AND gnu-gpl-v3 AND gnu-lgpl-v2 AND gnu-lgpl-v3 | |
20 | 20 | |||
21 | DISTFILES= ${DEFAULT_DISTFILES} | 21 | DISTFILES= ${DEFAULT_DISTFILES} | |
22 | EXTRACT_ONLY= ${DEFAULT_DISTFILES} | 22 | EXTRACT_ONLY= ${DEFAULT_DISTFILES} | |
23 | 23 | |||
24 | NOT_FOR_PLATFORM= Interix-*-* | 24 | NOT_FOR_PLATFORM= Interix-*-* | |
25 | 25 | |||
26 | USE_LANGUAGES= c c++ | 26 | USE_LANGUAGES= c c++ | |
27 | USE_TOOLS+= gmake makeinfo gsed | 27 | USE_TOOLS+= gmake makeinfo sed:run | |
28 | USE_TOOLS.NetBSD+= gsed | |||
28 | GNU_CONFIGURE= yes | 29 | GNU_CONFIGURE= yes | |
29 | GCC_REQD+= 4.4 | 30 | GCC_REQD+= 4.4 | |
30 | ## Build outside ${WRKSRC} | 31 | ## Build outside ${WRKSRC} | |
31 | OBJDIR= ../build | 32 | OBJDIR= ../build | |
32 | CONFIGURE_DIRS= ${OBJDIR} | 33 | CONFIGURE_DIRS= ${OBJDIR} | |
33 | CONFIGURE_SCRIPT= ../${DISTNAME}/configure | 34 | CONFIGURE_SCRIPT= ../${DISTNAME}/configure | |
34 | GCC_SUBPREFIX= ${GCC_PKGNAME} | 35 | GCC_SUBPREFIX= ${GCC_PKGNAME} | |
35 | GCC_PREFIX= ${PREFIX}/${GCC_SUBPREFIX} | 36 | GCC_PREFIX= ${PREFIX}/${GCC_SUBPREFIX} | |
36 | GCC_TARGET_MACHINE?= ${MACHINE_GNU_PLATFORM} | 37 | GCC_TARGET_MACHINE?= ${MACHINE_GNU_PLATFORM} | |
37 | GNU_CONFIGURE_PREFIX= ${GCC_PREFIX} | 38 | GNU_CONFIGURE_PREFIX= ${GCC_PREFIX} | |
38 | INFO_FILES= yes | 39 | INFO_FILES= yes | |
39 | 40 | |||
40 | UNLIMIT_RESOURCES+= datasize | 41 | UNLIMIT_RESOURCES+= datasize | |
41 | UNLIMIT_RESOURCES+= stacksize | 42 | UNLIMIT_RESOURCES+= stacksize | |
42 | 43 | |||
43 | SUBST_CLASSES+= vars | 44 | SUBST_CLASSES+= vars | |
44 | SUBST_MESSAGE.vars= Setting target machine name path in ${SUBST_FILES.vars} | 45 | SUBST_MESSAGE.vars= Setting target machine name path in ${SUBST_FILES.vars} | |
45 | SUBST_STAGE.vars= pre-configure | 46 | SUBST_STAGE.vars= pre-configure | |
46 | SUBST_FILES.vars= gcc/Makefile.in | 47 | SUBST_FILES.vars= gcc/Makefile.in | |
47 | SUBST_VARS.vars= GCC_TARGET_MACHINE | 48 | SUBST_VARS.vars= GCC_TARGET_MACHINE | |
48 | 49 | |||
49 | .include "../../mk/bsd.prefs.mk" | 50 | .include "../../mk/bsd.prefs.mk" | |
50 | 51 | |||
51 | LANGS= c | 52 | LANGS= c | |
52 | 53 | |||
53 | # In some cases LINKER_RPATH_FLAG needs a trailing space. | 54 | # In some cases LINKER_RPATH_FLAG needs a trailing space. | |
54 | LINKER_RPATH_FLAG:= ${LINKER_RPATH_FLAG:S/-rpath/& /} | 55 | LINKER_RPATH_FLAG:= ${LINKER_RPATH_FLAG:S/-rpath/& /} | |
55 | 56 | |||
56 | ## The Library rpath to use in end programs. | 57 | ## The Library rpath to use in end programs. | |
57 | LDFLAGS_FOR_TARGET= ${LDFLAGS:M${COMPILER_RPATH_FLAG}*:N*/usr/lib*} | 58 | LDFLAGS_FOR_TARGET= ${LDFLAGS:M${COMPILER_RPATH_FLAG}*:N*/usr/lib*} | |
58 | 59 | |||
59 | # The "-static-libstdc++ -static-libgcc" flags are normally added to the | 60 | # The "-static-libstdc++ -static-libgcc" flags are normally added to the | |
60 | # boot-ldflags by configure but because we are supply the boot-ldflags | 61 | # boot-ldflags by configure but because we are supply the boot-ldflags | |
61 | # we mash supply them. | 62 | # we mash supply them. | |
62 | BOOT_LDFLAGS= -static-libstdc++ -static-libgcc ${LDFLAGS_FOR_TARGET} | 63 | BOOT_LDFLAGS= -static-libstdc++ -static-libgcc ${LDFLAGS_FOR_TARGET} | |
63 | # Needed on Darwin when LDFLAGS point to a SDK | 64 | # Needed on Darwin when LDFLAGS point to a SDK | |
64 | BOOT_LDFLAGS+= ${LDFLAGS:M-Wl,-syslibroot*} | 65 | BOOT_LDFLAGS+= ${LDFLAGS:M-Wl,-syslibroot*} | |
65 | # GCC does not understand this option; remove it, or stage build will fail | 66 | # GCC does not understand this option; remove it, or stage build will fail | |
66 | BUILDLINK_TRANSFORM+= rm:-stdlib=libc++ | 67 | BUILDLINK_TRANSFORM+= rm:-stdlib=libc++ | |
67 | 68 | |||
68 | # Ignore missing rpaths in "fake" library. | 69 | # Ignore missing rpaths in "fake" library. | |
69 | CHECK_SHLIBS_SKIP+= ${GCC_PKGNAME}/lib*/libgcj_bc.so* | 70 | CHECK_SHLIBS_SKIP+= ${GCC_PKGNAME}/lib*/libgcj_bc.so* | |
70 | 71 | |||
71 | ## For target librarys and libjava programs. | 72 | ## For target librarys and libjava programs. | |
72 | CONFIGURE_ENV+= LDFLAGS_FOR_TARGET=${LDFLAGS_FOR_TARGET:Q} | 73 | CONFIGURE_ENV+= LDFLAGS_FOR_TARGET=${LDFLAGS_FOR_TARGET:Q} | |
73 | 74 | |||
74 | CONFIGURE_ARGS+= --enable-languages=${LANGS:Q} | 75 | CONFIGURE_ARGS+= --enable-languages=${LANGS:Q} | |
75 | CONFIGURE_ARGS+= --enable-shared | 76 | CONFIGURE_ARGS+= --enable-shared | |
76 | CONFIGURE_ARGS+= --enable-long-long | 77 | CONFIGURE_ARGS+= --enable-long-long | |
77 | CONFIGURE_ARGS+= --with-local-prefix=${GCC_PREFIX:Q} | 78 | CONFIGURE_ARGS+= --with-local-prefix=${GCC_PREFIX:Q} | |
78 | 79 | |||
79 | MAKE_ENV.NetBSD+= ac_cv_func_gethostbyname_r=no | 80 | MAKE_ENV.NetBSD+= ac_cv_func_gethostbyname_r=no | |
80 | .if !empty(MACHINE_PLATFORM:MNetBSD-*-*) | 81 | .if !empty(MACHINE_PLATFORM:MNetBSD-*-*) | |
81 | # use the native SSP code in netbsd libc | 82 | # use the native SSP code in netbsd libc | |
82 | CONFIGURE_ARGS+= --disable-libssp | 83 | CONFIGURE_ARGS+= --disable-libssp | |
83 | .else | 84 | .else | |
84 | CONFIGURE_ARGS+= --enable-libssp | 85 | CONFIGURE_ARGS+= --enable-libssp | |
85 | .endif | 86 | .endif | |
86 | 87 | |||
87 | CONFIGURE_ARGS+= --enable-threads=posix | 88 | CONFIGURE_ARGS+= --enable-threads=posix | |
88 | CONFIGURE_ARGS+= --with-boot-ldflags=${BOOT_LDFLAGS:Q} | 89 | CONFIGURE_ARGS+= --with-boot-ldflags=${BOOT_LDFLAGS:Q} | |
89 | 90 | |||
90 | CONFIGURE_ARGS.NetBSD+= --with-gnu-ld --with-ld=/usr/bin/ld | 91 | CONFIGURE_ARGS.NetBSD+= --with-gnu-ld --with-ld=/usr/bin/ld | |
91 | CONFIGURE_ARGS.NetBSD+= --with-gnu-as --with-as=/usr/bin/as | 92 | CONFIGURE_ARGS.NetBSD+= --with-gnu-as --with-as=/usr/bin/as | |
92 | MAKE_ENV.NetBSD+= ac_cv_func_clock_gettime=yes | 93 | MAKE_ENV.NetBSD+= ac_cv_func_clock_gettime=yes | |
93 | 94 | |||
94 | CONFIGURE_ARGS.DragonFly+= --disable-bootstrap | 95 | CONFIGURE_ARGS.DragonFly+= --disable-bootstrap | |
95 | 96 | |||
96 | .if ${OPSYS} == "Darwin" && !empty(OSX_SDK_PATH) | 97 | .if ${OPSYS} == "Darwin" && !empty(OSX_SDK_PATH) | |
97 | CONFIGURE_ARGS+= --with-native-system-header-dir=${OSX_SDK_PATH}/usr/include | 98 | CONFIGURE_ARGS+= --with-native-system-header-dir=${OSX_SDK_PATH}/usr/include | |
98 | # From FreeBSD, avoids compare issues with clang | 99 | # From FreeBSD, avoids compare issues with clang | |
99 | CONFIGURE_ARGS+= --with-build-config=bootstrap-debug | 100 | CONFIGURE_ARGS+= --with-build-config=bootstrap-debug | |
100 | .endif | 101 | .endif | |
101 | 102 | |||
102 | .if !empty(MACHINE_PLATFORM:MNetBSD-*-i386) || !empty(MACHINE_PLATFORM:MLinux-*-i386) | 103 | .if !empty(MACHINE_PLATFORM:MNetBSD-*-i386) || !empty(MACHINE_PLATFORM:MLinux-*-i386) | |
103 | CONFIGURE_ARGS+= --with-arch=i486 --with-tune=i486 | 104 | CONFIGURE_ARGS+= --with-arch=i486 --with-tune=i486 | |
104 | .endif | 105 | .endif | |
105 | 106 | |||
106 | .include "options.mk" | 107 | .include "options.mk" | |
107 | 108 | |||
108 | # ${WRKSRC}/fixincludes/ looks for sed and compiles the path to sed into | 109 | # ${WRKSRC}/fixincludes/ looks for sed and compiles the path to sed into | |
109 | # a binary so we need to make sure we give it the installed sed and not | 110 | # a binary so we need to make sure we give it the installed sed and not | |
110 | # the tool wrapped one. | 111 | # the tool wrapped one. | |
111 | MAKE_ENV+= ac_cv_path_SED=${TOOLS_SED} | 112 | MAKE_ENV+= ac_cv_path_SED=${TOOLS_SED} | |
112 | MAKE_ENV+= lt_cv_path_SED=${TOOLS_SED} | 113 | MAKE_ENV+= lt_cv_path_SED=${TOOLS_SED} | |
113 | 114 | |||
114 | # Determine whether to use binutils | 115 | # Determine whether to use binutils | |
115 | .if ${OPSYS} == "SunOS" | 116 | .if ${OPSYS} == "SunOS" | |
116 | . if exists(/usr/sfw/bin/gobjdump) | 117 | . if exists(/usr/sfw/bin/gobjdump) | |
117 | CONFIGURE_ENV+= OBJDUMP=/usr/sfw/bin/gobjdump | 118 | CONFIGURE_ENV+= OBJDUMP=/usr/sfw/bin/gobjdump | |
118 | . endif | 119 | . endif | |
119 | . if exists(/usr/bin/ld) | 120 | . if exists(/usr/bin/ld) | |
120 | CONFIGURE_ARGS+= --without-gnu-ld --with-ld=/usr/bin/ld | 121 | CONFIGURE_ARGS+= --without-gnu-ld --with-ld=/usr/bin/ld | |
121 | . else | 122 | . else | |
122 | CONFIGURE_ARGS+= --without-gnu-ld --with-ld=/usr/ccs/bin/ld | 123 | CONFIGURE_ARGS+= --without-gnu-ld --with-ld=/usr/ccs/bin/ld | |
123 | . endif | 124 | . endif | |
124 | . if exists(/usr/sfw/bin/gas) | 125 | . if exists(/usr/sfw/bin/gas) | |
125 | CONFIGURE_ARGS+= --with-gnu-as --with-as=/usr/sfw/bin/gas | 126 | CONFIGURE_ARGS+= --with-gnu-as --with-as=/usr/sfw/bin/gas | |
126 | . elif exists(/usr/ccs/bin/as) | 127 | . elif exists(/usr/ccs/bin/as) | |
127 | CONFIGURE_ARGS+= --without-gnu-as --with-as=/usr/ccs/bin/as | 128 | CONFIGURE_ARGS+= --without-gnu-as --with-as=/usr/ccs/bin/as | |
128 | . else | 129 | . else | |
129 | BUILDLINK_DEPMETHOD.binutils= full | 130 | BUILDLINK_DEPMETHOD.binutils= full | |
130 | . include "../../devel/binutils/buildlink3.mk" | 131 | . include "../../devel/binutils/buildlink3.mk" | |
131 | CONFIGURE_ARGS+= --with-gnu-as --with-as=${PREFIX}/bin/gas | 132 | CONFIGURE_ARGS+= --with-gnu-as --with-as=${PREFIX}/bin/gas | |
132 | . endif | 133 | . endif | |
133 | .endif | 134 | .endif | |
134 | 135 | |||
135 | pre-configure: | 136 | pre-configure: | |
136 | .if ${OPSYS} == "OpenBSD" | 137 | .if ${OPSYS} == "OpenBSD" | |
137 | cd ${WRKSRC}/gcc && \ | 138 | cd ${WRKSRC}/gcc && \ | |
138 | patch -p1 < ${FILESDIR}/patch-gcc_targhooks.c-openbsd.diff | 139 | patch -p1 < ${FILESDIR}/patch-gcc_targhooks.c-openbsd.diff | |
139 | .endif | 140 | .endif | |
140 | ${RUN} cd ${WRKSRC} && ${MKDIR} ${OBJDIR} | 141 | ${RUN} cd ${WRKSRC} && ${MKDIR} ${OBJDIR} | |
141 | 142 | |||
142 | TEST_TARGET= -k check || ${TRUE} | 143 | TEST_TARGET= -k check || ${TRUE} | |
143 | pre-test: | 144 | pre-test: | |
144 | ${RUN} \ | 145 | ${RUN} \ | |
145 | if runtest --version >/dev/null 2>/dev/null ; then \ | 146 | if runtest --version >/dev/null 2>/dev/null ; then \ | |
146 | : ; \ | 147 | : ; \ | |
147 | else \ | 148 | else \ | |
148 | ${ECHO} "ERROR: Please install devel/dejagnu in order to run the test suite." ; \ | 149 | ${ECHO} "ERROR: Please install devel/dejagnu in order to run the test suite." ; \ | |
149 | exit 1 ; \ | 150 | exit 1 ; \ | |
150 | fi | 151 | fi | |
151 | post-test: | 152 | post-test: | |
152 | ${RUN} cd ${WRKSRC} && cd ${OBJDIR} && \ | 153 | ${RUN} cd ${WRKSRC} && cd ${OBJDIR} && \ | |
153 | ${SHELL} ${WRKSRC}/contrib/test_summary >${WRKDIR}/test_summary.log | 154 | ${SHELL} ${WRKSRC}/contrib/test_summary >${WRKDIR}/test_summary.log | |
154 | @${INFO_MSG} "Test summary are available in ${WRKDIR}/test_summary.log" | 155 | @${INFO_MSG} "Test summary are available in ${WRKDIR}/test_summary.log" | |
155 | 156 | |||
156 | post-install: | 157 | post-install: | |
157 | ${TEST} -f ${DESTDIR}${GCC_PREFIX}/bin/cc || \ | 158 | ${TEST} -f ${DESTDIR}${GCC_PREFIX}/bin/cc || \ | |
158 | ( cd ${DESTDIR}${GCC_PREFIX}/bin ; ${LN} -f gcc cc ) | 159 | ( cd ${DESTDIR}${GCC_PREFIX}/bin ; ${LN} -f gcc cc ) | |
159 | .if !empty(PKG_OPTIONS:Mgcc-java) | 160 | .if !empty(PKG_OPTIONS:Mgcc-java) | |
160 | ${RM} -f ${DESTDIR}${JAVA_HOME}/bin/javadoc | 161 | ${RM} -f ${DESTDIR}${JAVA_HOME}/bin/javadoc | |
161 | ${RM} -f ${DESTDIR}${JAVA_HOME}/jre/lib/${JAVA_ARCH}/libjawt.so | 162 | ${RM} -f ${DESTDIR}${JAVA_HOME}/jre/lib/${JAVA_ARCH}/libjawt.so | |
162 | .endif | 163 | .endif | |
163 | .if !empty(MACHINE_PLATFORM:MSunOS-*-*86*) && ${OS_VERSION} != "5.11" | 164 | .if !empty(MACHINE_PLATFORM:MSunOS-*-*86*) && ${OS_VERSION} != "5.11" | |
164 | ${SH} files/values.c ${DESTDIR}${GCC_PREFIX}/bin/gcc -m32 || ${TRUE} | 165 | ${SH} files/values.c ${DESTDIR}${GCC_PREFIX}/bin/gcc -m32 || ${TRUE} | |
165 | ${SH} files/values.c ${DESTDIR}${GCC_PREFIX}/bin/gcc -m64 || ${TRUE} | 166 | ${SH} files/values.c ${DESTDIR}${GCC_PREFIX}/bin/gcc -m64 || ${TRUE} | |
166 | .endif | 167 | .endif | |
167 | 168 | |||
168 | GENERATE_PLIST+= \ | 169 | GENERATE_PLIST+= \ | |
169 | cd ${DESTDIR}${PREFIX} && \ | 170 | cd ${DESTDIR}${PREFIX} && \ | |
170 | ${FIND} ${GCC_SUBPREFIX} \( -type f -o -type l \) -print | ${SORT} ; | 171 | ${FIND} ${GCC_SUBPREFIX} \( -type f -o -type l \) -print | ${SORT} ; | |
171 | 172 | |||
172 | .include "../../converters/libiconv/buildlink3.mk" | 173 | .include "../../converters/libiconv/buildlink3.mk" | |
173 | .include "../../mk/dlopen.buildlink3.mk" | 174 | .include "../../mk/dlopen.buildlink3.mk" | |
174 | .include "../../mk/pthread.buildlink3.mk" | 175 | .include "../../mk/pthread.buildlink3.mk" | |
175 | .include "../../mk/bsd.pkg.mk" | 176 | .include "../../mk/bsd.pkg.mk" |
@@ -1,197 +1,199 @@ | @@ -1,197 +1,199 @@ | |||
1 | # $NetBSD: Makefile,v 1.17 2017/06/21 21:16:35 maya Exp $ | 1 | # $NetBSD: Makefile,v 1.18 2017/06/22 21:44:49 maya Exp $ | |
2 | 2 | |||
3 | GCC_PKGNAME= gcc49 | 3 | GCC_PKGNAME= gcc49 | |
4 | .include "version.mk" | 4 | .include "version.mk" | |
5 | 5 | |||
6 | DISTNAME= gcc-${GCC49_DIST_VERSION} | 6 | DISTNAME= gcc-${GCC49_DIST_VERSION} | |
7 | PKGNAME= ${GCC_PKGNAME}-${GCC49_DIST_VERSION} | 7 | PKGNAME= ${GCC_PKGNAME}-${GCC49_DIST_VERSION} | |
8 | 8 | |||
9 | ## When bumping the PKGREVISION of this package the PKGREVISION of | 9 | ## When bumping the PKGREVISION of this package the PKGREVISION of | |
10 | ## lang/gcc49-libs needs to be bump to be at least 1 more than the | 10 | ## lang/gcc49-libs needs to be bump to be at least 1 more than the | |
11 | ## PKGREVISION of this package! | 11 | ## PKGREVISION of this package! | |
12 | PKGREVISION= 1 | 12 | PKGREVISION= 1 | |
13 | CATEGORIES= lang | 13 | CATEGORIES= lang | |
14 | MASTER_SITES= ${MASTER_SITE_GNU:=gcc/gcc-${GCC49_DIST_VERSION}/} | 14 | MASTER_SITES= ${MASTER_SITE_GNU:=gcc/gcc-${GCC49_DIST_VERSION}/} | |
15 | EXTRACT_SUFX= .tar.bz2 | 15 | EXTRACT_SUFX= .tar.bz2 | |
16 | 16 | |||
17 | MAINTAINER= maya@NetBSD.org | 17 | MAINTAINER= maya@NetBSD.org | |
18 | HOMEPAGE= http://gcc.gnu.org/ | 18 | HOMEPAGE= http://gcc.gnu.org/ | |
19 | COMMENT= The GNU Compiler Collection (GCC) - 4.9 Release Series | 19 | COMMENT= The GNU Compiler Collection (GCC) - 4.9 Release Series | |
20 | LICENSE= gnu-gpl-v2 AND gnu-gpl-v3 AND gnu-lgpl-v2 AND gnu-lgpl-v3 | 20 | LICENSE= gnu-gpl-v2 AND gnu-gpl-v3 AND gnu-lgpl-v2 AND gnu-lgpl-v3 | |
21 | 21 | |||
22 | DISTFILES= ${DEFAULT_DISTFILES} | 22 | DISTFILES= ${DEFAULT_DISTFILES} | |
23 | EXTRACT_ONLY= ${DEFAULT_DISTFILES} | 23 | EXTRACT_ONLY= ${DEFAULT_DISTFILES} | |
24 | 24 | |||
25 | NOT_FOR_PLATFORM= Interix-*-* | 25 | NOT_FOR_PLATFORM= Interix-*-* | |
26 | 26 | |||
27 | USE_LANGUAGES= c c++ | 27 | USE_LANGUAGES= c c++ | |
28 | USE_TOOLS+= gmake makeinfo gsed | 28 | USE_TOOLS+= gmake makeinfo sed:run | |
29 | USE_TOOLS.NetBSD+= gsed | |||
30 | ||||
29 | 31 | |||
30 | GNU_CONFIGURE= yes | 32 | GNU_CONFIGURE= yes | |
31 | ## Build outside ${WRKSRC} | 33 | ## Build outside ${WRKSRC} | |
32 | OBJDIR= ../build | 34 | OBJDIR= ../build | |
33 | CONFIGURE_DIRS= ${OBJDIR} | 35 | CONFIGURE_DIRS= ${OBJDIR} | |
34 | CONFIGURE_SCRIPT= ../${DISTNAME}/configure | 36 | CONFIGURE_SCRIPT= ../${DISTNAME}/configure | |
35 | GCC_SUBPREFIX= ${GCC_PKGNAME} | 37 | GCC_SUBPREFIX= ${GCC_PKGNAME} | |
36 | GCC_PREFIX= ${PREFIX}/${GCC_SUBPREFIX} | 38 | GCC_PREFIX= ${PREFIX}/${GCC_SUBPREFIX} | |
37 | GCC_TARGET_MACHINE?= ${MACHINE_GNU_PLATFORM} | 39 | GCC_TARGET_MACHINE?= ${MACHINE_GNU_PLATFORM} | |
38 | GNU_CONFIGURE_PREFIX= ${GCC_PREFIX} | 40 | GNU_CONFIGURE_PREFIX= ${GCC_PREFIX} | |
39 | INFO_FILES= yes | 41 | INFO_FILES= yes | |
40 | CONFIGURE_ARGS+= --disable-libstdcxx-pch | 42 | CONFIGURE_ARGS+= --disable-libstdcxx-pch | |
41 | 43 | |||
42 | UNLIMIT_RESOURCES+= datasize | 44 | UNLIMIT_RESOURCES+= datasize | |
43 | UNLIMIT_RESOURCES+= stacksize | 45 | UNLIMIT_RESOURCES+= stacksize | |
44 | 46 | |||
45 | SUBST_CLASSES+= vars | 47 | SUBST_CLASSES+= vars | |
46 | SUBST_STAGE.vars= pre-configure | 48 | SUBST_STAGE.vars= pre-configure | |
47 | SUBST_FILES.vars= gcc/Makefile.in | 49 | SUBST_FILES.vars= gcc/Makefile.in | |
48 | SUBST_VARS.vars= GCC_TARGET_MACHINE | 50 | SUBST_VARS.vars= GCC_TARGET_MACHINE | |
49 | 51 | |||
50 | .include "../../mk/bsd.prefs.mk" | 52 | .include "../../mk/bsd.prefs.mk" | |
51 | 53 | |||
52 | LANGS= c | 54 | LANGS= c | |
53 | 55 | |||
54 | # In some cases LINKER_RPATH_FLAG needs a trailing space. | 56 | # In some cases LINKER_RPATH_FLAG needs a trailing space. | |
55 | LINKER_RPATH_FLAG:= ${LINKER_RPATH_FLAG:S/-rpath/& /} | 57 | LINKER_RPATH_FLAG:= ${LINKER_RPATH_FLAG:S/-rpath/& /} | |
56 | 58 | |||
57 | ## The Library rpath to use in end programs. | 59 | ## The Library rpath to use in end programs. | |
58 | LDFLAGS_FOR_TARGET= ${LDFLAGS:M${COMPILER_RPATH_FLAG}*:N*/usr/lib*} | 60 | LDFLAGS_FOR_TARGET= ${LDFLAGS:M${COMPILER_RPATH_FLAG}*:N*/usr/lib*} | |
59 | 61 | |||
60 | # The "-static-libstdc++ -static-libgcc" flags are normally added to the | 62 | # The "-static-libstdc++ -static-libgcc" flags are normally added to the | |
61 | # boot-ldflags by configure but because we are supply the boot-ldflags | 63 | # boot-ldflags by configure but because we are supply the boot-ldflags | |
62 | # we mash supply them. | 64 | # we mash supply them. | |
63 | BOOT_LDFLAGS= -static-libstdc++ -static-libgcc ${LDFLAGS_FOR_TARGET} | 65 | BOOT_LDFLAGS= -static-libstdc++ -static-libgcc ${LDFLAGS_FOR_TARGET} | |
64 | # Needed on Darwin when LDFLAGS point to a SDK | 66 | # Needed on Darwin when LDFLAGS point to a SDK | |
65 | BOOT_LDFLAGS+= ${LDFLAGS:M-Wl,-syslibroot*} | 67 | BOOT_LDFLAGS+= ${LDFLAGS:M-Wl,-syslibroot*} | |
66 | 68 | |||
67 | # Ignore missing rpaths in "fake" library. | 69 | # Ignore missing rpaths in "fake" library. | |
68 | CHECK_SHLIBS_SKIP+= ${GCC_PKGNAME}/lib*/libgcj_bc.so* | 70 | CHECK_SHLIBS_SKIP+= ${GCC_PKGNAME}/lib*/libgcj_bc.so* | |
69 | 71 | |||
70 | ## For target librarys and libjava programs. | 72 | ## For target librarys and libjava programs. | |
71 | CONFIGURE_ENV+= LDFLAGS_FOR_TARGET=${LDFLAGS_FOR_TARGET:Q} | 73 | CONFIGURE_ENV+= LDFLAGS_FOR_TARGET=${LDFLAGS_FOR_TARGET:Q} | |
72 | 74 | |||
73 | .if !empty(MACHINE_PLATFORM:MNetBSD-*-*) # use the native SSP code in netbsd libc, gcc libssp conflicts with it. | 75 | .if !empty(MACHINE_PLATFORM:MNetBSD-*-*) # use the native SSP code in netbsd libc, gcc libssp conflicts with it. | |
74 | CONFIGURE_ARGS+= --disable-libssp | 76 | CONFIGURE_ARGS+= --disable-libssp | |
75 | .else | 77 | .else | |
76 | CONFIGURE_ARGS+= --enable-libssp | 78 | CONFIGURE_ARGS+= --enable-libssp | |
77 | .endif | 79 | .endif | |
78 | 80 | |||
79 | CONFIGURE_ARGS+= --enable-languages=${LANGS:Q} | 81 | CONFIGURE_ARGS+= --enable-languages=${LANGS:Q} | |
80 | CONFIGURE_ARGS+= --enable-shared | 82 | CONFIGURE_ARGS+= --enable-shared | |
81 | CONFIGURE_ARGS+= --enable-long-long | 83 | CONFIGURE_ARGS+= --enable-long-long | |
82 | CONFIGURE_ARGS+= --with-local-prefix=${GCC_PREFIX:Q} | 84 | CONFIGURE_ARGS+= --with-local-prefix=${GCC_PREFIX:Q} | |
83 | CONFIGURE_ARGS+= --enable-threads=posix | 85 | CONFIGURE_ARGS+= --enable-threads=posix | |
84 | CONFIGURE_ARGS+= --with-boot-ldflags=${BOOT_LDFLAGS:Q} | 86 | CONFIGURE_ARGS+= --with-boot-ldflags=${BOOT_LDFLAGS:Q} | |
85 | 87 | |||
86 | CONFIGURE_ARGS.NetBSD+= --with-gnu-ld --with-ld=/usr/bin/ld | 88 | CONFIGURE_ARGS.NetBSD+= --with-gnu-ld --with-ld=/usr/bin/ld | |
87 | CONFIGURE_ARGS.NetBSD+= --with-gnu-as --with-as=/usr/bin/as | 89 | CONFIGURE_ARGS.NetBSD+= --with-gnu-as --with-as=/usr/bin/as | |
88 | MAKE_ENV.NetBSD+= ac_cv_func_clock_gettime=yes | 90 | MAKE_ENV.NetBSD+= ac_cv_func_clock_gettime=yes | |
89 | MAKE_ENV.NetBSD+= ac_cv_func_gethostbyname_r=no | 91 | MAKE_ENV.NetBSD+= ac_cv_func_gethostbyname_r=no | |
90 | 92 | |||
91 | CONFIGURE_ARGS.DragonFly+= --disable-bootstrap | 93 | CONFIGURE_ARGS.DragonFly+= --disable-bootstrap | |
92 | 94 | |||
93 | # See ${WRKSRC}/libgcc/config/t-slibgcc-darwin: It uses strip(1) to | 95 | # See ${WRKSRC}/libgcc/config/t-slibgcc-darwin: It uses strip(1) to | |
94 | # create a stub library, not just to remove symbols, so we must not | 96 | # create a stub library, not just to remove symbols, so we must not | |
95 | # let strip(1) be a no-op regardless of ${INSTALL_UNSTRIPPED} or the | 97 | # let strip(1) be a no-op regardless of ${INSTALL_UNSTRIPPED} or the | |
96 | # build fails for missing files. | 98 | # build fails for missing files. | |
97 | CONFIGURE_ARGS.Darwin+= STRIP_FOR_TARGET=${TOOLS_PLATFORM.strip} | 99 | CONFIGURE_ARGS.Darwin+= STRIP_FOR_TARGET=${TOOLS_PLATFORM.strip} | |
98 | 100 | |||
99 | .if !empty(MACHINE_PLATFORM:MDarwin-[0-8].*-*) | 101 | .if !empty(MACHINE_PLATFORM:MDarwin-[0-8].*-*) | |
100 | CONFIGURE_ARGS+= --with-dwarf2 | 102 | CONFIGURE_ARGS+= --with-dwarf2 | |
101 | CONFIGURE_ARGS+= --disable-libitm | 103 | CONFIGURE_ARGS+= --disable-libitm | |
102 | .endif | 104 | .endif | |
103 | 105 | |||
104 | .if !empty(MACHINE_PLATFORM:MDarwin-[0-8].*-powerpc) | 106 | .if !empty(MACHINE_PLATFORM:MDarwin-[0-8].*-powerpc) | |
105 | CONFIGURE_ARGS+= --disable-multilib | 107 | CONFIGURE_ARGS+= --disable-multilib | |
106 | .endif | 108 | .endif | |
107 | 109 | |||
108 | .if !empty(MACHINE_PLATFORM:MNetBSD-*-i386) || !empty(MACHINE_PLATFORM:MLinux-*-i386) | 110 | .if !empty(MACHINE_PLATFORM:MNetBSD-*-i386) || !empty(MACHINE_PLATFORM:MLinux-*-i386) | |
109 | CONFIGURE_ARGS+= --with-arch=i486 --with-tune=i486 | 111 | CONFIGURE_ARGS+= --with-arch=i486 --with-tune=i486 | |
110 | .endif | 112 | .endif | |
111 | 113 | |||
112 | # Disable fixincludes on SmartOS, header changes result in broken includes | 114 | # Disable fixincludes on SmartOS, header changes result in broken includes | |
113 | # being generated, see https://github.com/joyent/pkgsrc/issues/270 | 115 | # being generated, see https://github.com/joyent/pkgsrc/issues/270 | |
114 | .if ${OS_VARIANT} == "SmartOS" | 116 | .if ${OS_VARIANT} == "SmartOS" | |
115 | SUBST_CLASSES+= fixinc | 117 | SUBST_CLASSES+= fixinc | |
116 | SUBST_STAGE.fixinc= pre-configure | 118 | SUBST_STAGE.fixinc= pre-configure | |
117 | SUBST_FILES.fixinc= gcc/Makefile.in | 119 | SUBST_FILES.fixinc= gcc/Makefile.in | |
118 | SUBST_SED.fixinc= -e "s,\./fixinc.sh,-c true," | 120 | SUBST_SED.fixinc= -e "s,\./fixinc.sh,-c true," | |
119 | .endif | 121 | .endif | |
120 | 122 | |||
121 | .include "options.mk" | 123 | .include "options.mk" | |
122 | 124 | |||
123 | # ${WRKSRC}/fixincludes/ looks for sed and compiles the path to sed into | 125 | # ${WRKSRC}/fixincludes/ looks for sed and compiles the path to sed into | |
124 | # a binary so we need to make sure we give it the installed sed and not | 126 | # a binary so we need to make sure we give it the installed sed and not | |
125 | # the tool wrapped one. | 127 | # the tool wrapped one. | |
126 | MAKE_ENV+= ac_cv_path_SED=${TOOLS_SED} | 128 | MAKE_ENV+= ac_cv_path_SED=${TOOLS_SED} | |
127 | MAKE_ENV+= lt_cv_path_SED=${TOOLS_SED} | 129 | MAKE_ENV+= lt_cv_path_SED=${TOOLS_SED} | |
128 | 130 | |||
129 | .if !empty(MACHINE_PLATFORM:MSunOS-5.1[123456789]-*) | 131 | .if !empty(MACHINE_PLATFORM:MSunOS-5.1[123456789]-*) | |
130 | # Causes multilib build problems with specific compiler combinations | 132 | # Causes multilib build problems with specific compiler combinations | |
131 | MAKE_ENV+= gcc_cv_ld_as_needed=no | 133 | MAKE_ENV+= gcc_cv_ld_as_needed=no | |
132 | # Determine whether to use binutils | 134 | # Determine whether to use binutils | |
133 | . if exists(/usr/sfw/bin/gobjdump) | 135 | . if exists(/usr/sfw/bin/gobjdump) | |
134 | CONFIGURE_ENV+= OBJDUMP=/usr/sfw/bin/gobjdump | 136 | CONFIGURE_ENV+= OBJDUMP=/usr/sfw/bin/gobjdump | |
135 | . endif | 137 | . endif | |
136 | . if exists(/usr/bin/ld) | 138 | . if exists(/usr/bin/ld) | |
137 | CONFIGURE_ARGS+= --without-gnu-ld --with-ld=/usr/bin/ld | 139 | CONFIGURE_ARGS+= --without-gnu-ld --with-ld=/usr/bin/ld | |
138 | . else | 140 | . else | |
139 | CONFIGURE_ARGS+= --without-gnu-ld --with-ld=/usr/ccs/bin/ld | 141 | CONFIGURE_ARGS+= --without-gnu-ld --with-ld=/usr/ccs/bin/ld | |
140 | . endif | 142 | . endif | |
141 | . if exists(/usr/sfw/bin/gas) | 143 | . if exists(/usr/sfw/bin/gas) | |
142 | CONFIGURE_ARGS+= --with-gnu-as --with-as=/usr/sfw/bin/gas | 144 | CONFIGURE_ARGS+= --with-gnu-as --with-as=/usr/sfw/bin/gas | |
143 | . elif exists(/usr/ccs/bin/as) | 145 | . elif exists(/usr/ccs/bin/as) | |
144 | CONFIGURE_ARGS+= --without-gnu-as --with-as=/usr/ccs/bin/as | 146 | CONFIGURE_ARGS+= --without-gnu-as --with-as=/usr/ccs/bin/as | |
145 | . else | 147 | . else | |
146 | BUILDLINK_DEPMETHOD.binutils= full | 148 | BUILDLINK_DEPMETHOD.binutils= full | |
147 | . include "../../devel/binutils/buildlink3.mk" | 149 | . include "../../devel/binutils/buildlink3.mk" | |
148 | CONFIGURE_ARGS+= --with-gnu-as --with-as=${PREFIX}/bin/gas | 150 | CONFIGURE_ARGS+= --with-gnu-as --with-as=${PREFIX}/bin/gas | |
149 | . endif | 151 | . endif | |
150 | .elif !empty(MACHINE_PLATFORM:MSunOS-5.10-*) | 152 | .elif !empty(MACHINE_PLATFORM:MSunOS-5.10-*) | |
151 | . if exists(/usr/sfw/bin/gobjdump) | 153 | . if exists(/usr/sfw/bin/gobjdump) | |
152 | CONFIGURE_ENV+= OBJDUMP=/usr/sfw/bin/gobjdump | 154 | CONFIGURE_ENV+= OBJDUMP=/usr/sfw/bin/gobjdump | |
153 | . endif | 155 | . endif | |
154 | BUILDLINK_API_DEPENDS.binutils+= binutils>=2.23 | 156 | BUILDLINK_API_DEPENDS.binutils+= binutils>=2.23 | |
155 | BUILDLINK_DEPMETHOD.binutils= full | 157 | BUILDLINK_DEPMETHOD.binutils= full | |
156 | . include "../../devel/binutils/buildlink3.mk" | 158 | . include "../../devel/binutils/buildlink3.mk" | |
157 | CONFIGURE_ENV+= OBJCOPY=${PREFIX}/bin/gobjcopy | 159 | CONFIGURE_ENV+= OBJCOPY=${PREFIX}/bin/gobjcopy | |
158 | CONFIGURE_ARGS+= --with-gnu-as --with-as=${PREFIX}/bin/gas | 160 | CONFIGURE_ARGS+= --with-gnu-as --with-as=${PREFIX}/bin/gas | |
159 | CONFIGURE_ARGS+= --without-gnu-ld --with-ld=/usr/ccs/bin/ld | 161 | CONFIGURE_ARGS+= --without-gnu-ld --with-ld=/usr/ccs/bin/ld | |
160 | .endif | 162 | .endif | |
161 | 163 | |||
162 | pre-configure: | 164 | pre-configure: | |
163 | ${RUN} cd ${WRKSRC} && ${MKDIR} ${OBJDIR} | 165 | ${RUN} cd ${WRKSRC} && ${MKDIR} ${OBJDIR} | |
164 | 166 | |||
165 | TEST_TARGET= -k check || ${TRUE} | 167 | TEST_TARGET= -k check || ${TRUE} | |
166 | pre-test: | 168 | pre-test: | |
167 | ${RUN} \ | 169 | ${RUN} \ | |
168 | if runtest --version >/dev/null 2>/dev/null ; then \ | 170 | if runtest --version >/dev/null 2>/dev/null ; then \ | |
169 | : ; \ | 171 | : ; \ | |
170 | else \ | 172 | else \ | |
171 | ${ECHO} "ERROR: Please install devel/dejagnu in order to run the test suite." ; \ | 173 | ${ECHO} "ERROR: Please install devel/dejagnu in order to run the test suite." ; \ | |
172 | exit 1 ; \ | 174 | exit 1 ; \ | |
173 | fi | 175 | fi | |
174 | post-test: | 176 | post-test: | |
175 | ${RUN} cd ${WRKSRC} && cd ${OBJDIR} && \ | 177 | ${RUN} cd ${WRKSRC} && cd ${OBJDIR} && \ | |
176 | ${SHELL} ${WRKSRC}/contrib/test_summary >${WRKDIR}/test_summary.log | 178 | ${SHELL} ${WRKSRC}/contrib/test_summary >${WRKDIR}/test_summary.log | |
177 | @${INFO_MSG} "Test summary are available in ${WRKDIR}/test_summary.log" | 179 | @${INFO_MSG} "Test summary are available in ${WRKDIR}/test_summary.log" | |
178 | 180 | |||
179 | post-install: | 181 | post-install: | |
180 | ${TEST} -f ${DESTDIR}${GCC_PREFIX}/bin/cc || \ | 182 | ${TEST} -f ${DESTDIR}${GCC_PREFIX}/bin/cc || \ | |
181 | ( cd ${DESTDIR}${GCC_PREFIX}/bin ; ${LN} -f gcc cc ) | 183 | ( cd ${DESTDIR}${GCC_PREFIX}/bin ; ${LN} -f gcc cc ) | |
182 | .if !empty(PKG_OPTIONS:Mgcc-java) | 184 | .if !empty(PKG_OPTIONS:Mgcc-java) | |
183 | ${RM} -f ${DESTDIR}${JAVA_HOME}/bin/javadoc | 185 | ${RM} -f ${DESTDIR}${JAVA_HOME}/bin/javadoc | |
184 | ${RM} -f ${DESTDIR}${JAVA_HOME}/jre/lib/${JAVA_ARCH}/libjawt.so | 186 | ${RM} -f ${DESTDIR}${JAVA_HOME}/jre/lib/${JAVA_ARCH}/libjawt.so | |
185 | .endif | 187 | .endif | |
186 | .if !empty(MACHINE_PLATFORM:MSunOS-*-*86*) && ${OS_VERSION} != "5.11" | 188 | .if !empty(MACHINE_PLATFORM:MSunOS-*-*86*) && ${OS_VERSION} != "5.11" | |
187 | ${SH} files/values.c ${DESTDIR}${GCC_PREFIX}/bin/gcc -m32 || ${TRUE} | 189 | ${SH} files/values.c ${DESTDIR}${GCC_PREFIX}/bin/gcc -m32 || ${TRUE} | |
188 | ${SH} files/values.c ${DESTDIR}${GCC_PREFIX}/bin/gcc -m64 || ${TRUE} | 190 | ${SH} files/values.c ${DESTDIR}${GCC_PREFIX}/bin/gcc -m64 || ${TRUE} | |
189 | .endif | 191 | .endif | |
190 | 192 | |||
191 | GENERATE_PLIST+= \ | 193 | GENERATE_PLIST+= \ | |
192 | cd ${DESTDIR}${PREFIX} && \ | 194 | cd ${DESTDIR}${PREFIX} && \ | |
193 | ${FIND} ${GCC_SUBPREFIX} \( -type f -o -type l \) -print | ${SORT} ; | 195 | ${FIND} ${GCC_SUBPREFIX} \( -type f -o -type l \) -print | ${SORT} ; | |
194 | 196 | |||
195 | .include "../../mk/dlopen.buildlink3.mk" | 197 | .include "../../mk/dlopen.buildlink3.mk" | |
196 | .include "../../mk/pthread.buildlink3.mk" | 198 | .include "../../mk/pthread.buildlink3.mk" | |
197 | .include "../../mk/bsd.pkg.mk" | 199 | .include "../../mk/bsd.pkg.mk" |
@@ -1,190 +1,191 @@ | @@ -1,190 +1,191 @@ | |||
1 | # $NetBSD: Makefile,v 1.18 2017/06/21 21:16:36 maya Exp $ | 1 | # $NetBSD: Makefile,v 1.19 2017/06/22 21:44:49 maya Exp $ | |
2 | 2 | |||
3 | GCC_PKGNAME= gcc5 | 3 | GCC_PKGNAME= gcc5 | |
4 | PKGREVISION= 3 | 4 | PKGREVISION= 3 | |
5 | .include "version.mk" | 5 | .include "version.mk" | |
6 | 6 | |||
7 | DISTNAME= gcc-${GCC5_DIST_VERSION} | 7 | DISTNAME= gcc-${GCC5_DIST_VERSION} | |
8 | PKGNAME= ${GCC_PKGNAME}-${GCC5_DIST_VERSION} | 8 | PKGNAME= ${GCC_PKGNAME}-${GCC5_DIST_VERSION} | |
9 | ## When bumping the PKGREVISION of this package the PKGREVISION of | 9 | ## When bumping the PKGREVISION of this package the PKGREVISION of | |
10 | ## lang/gcc5-libs needs to be bump to be at least 1 more than the | 10 | ## lang/gcc5-libs needs to be bump to be at least 1 more than the | |
11 | ## PKGREVISION of this package! | 11 | ## PKGREVISION of this package! | |
12 | CATEGORIES= lang | 12 | CATEGORIES= lang | |
13 | MASTER_SITES= ${MASTER_SITE_GNU:=gcc/gcc-${GCC5_DIST_VERSION}/} | 13 | MASTER_SITES= ${MASTER_SITE_GNU:=gcc/gcc-${GCC5_DIST_VERSION}/} | |
14 | EXTRACT_SUFX= .tar.bz2 | 14 | EXTRACT_SUFX= .tar.bz2 | |
15 | 15 | |||
16 | MAINTAINER= maya@NetBSD.org | 16 | MAINTAINER= maya@NetBSD.org | |
17 | HOMEPAGE= http://gcc.gnu.org/ | 17 | HOMEPAGE= http://gcc.gnu.org/ | |
18 | COMMENT= The GNU Compiler Collection (GCC) - 5 Release Series | 18 | COMMENT= The GNU Compiler Collection (GCC) - 5 Release Series | |
19 | LICENSE= gnu-gpl-v2 AND gnu-gpl-v3 AND gnu-lgpl-v2 AND gnu-lgpl-v3 | 19 | LICENSE= gnu-gpl-v2 AND gnu-gpl-v3 AND gnu-lgpl-v2 AND gnu-lgpl-v3 | |
20 | 20 | |||
21 | DISTFILES= ${DEFAULT_DISTFILES} | 21 | DISTFILES= ${DEFAULT_DISTFILES} | |
22 | EXTRACT_ONLY= ${DEFAULT_DISTFILES} | 22 | EXTRACT_ONLY= ${DEFAULT_DISTFILES} | |
23 | 23 | |||
24 | NOT_FOR_PLATFORM= Interix-*-* | 24 | NOT_FOR_PLATFORM= Interix-*-* | |
25 | 25 | |||
26 | USE_LANGUAGES= c c++ | 26 | USE_LANGUAGES= c c++ | |
27 | USE_TOOLS+= gmake makeinfo gsed tar:build | 27 | USE_TOOLS+= gmake makeinfo sed:run tar:build | |
28 | USE_TOOLS.NetBSD+= gsed | |||
28 | 29 | |||
29 | GNU_CONFIGURE= yes | 30 | GNU_CONFIGURE= yes | |
30 | ## Build outside ${WRKSRC} | 31 | ## Build outside ${WRKSRC} | |
31 | OBJDIR= ../build | 32 | OBJDIR= ../build | |
32 | CONFIGURE_DIRS= ${OBJDIR} | 33 | CONFIGURE_DIRS= ${OBJDIR} | |
33 | CONFIGURE_SCRIPT= ../${DISTNAME}/configure | 34 | CONFIGURE_SCRIPT= ../${DISTNAME}/configure | |
34 | GCC_SUBPREFIX= ${GCC_PKGNAME} | 35 | GCC_SUBPREFIX= ${GCC_PKGNAME} | |
35 | GCC_PREFIX= ${PREFIX}/${GCC_SUBPREFIX} | 36 | GCC_PREFIX= ${PREFIX}/${GCC_SUBPREFIX} | |
36 | GNU_CONFIGURE_PREFIX= ${GCC_PREFIX} | 37 | GNU_CONFIGURE_PREFIX= ${GCC_PREFIX} | |
37 | INFO_FILES= yes | 38 | INFO_FILES= yes | |
38 | CONFIGURE_ARGS+= --disable-libstdcxx-pch | 39 | CONFIGURE_ARGS+= --disable-libstdcxx-pch | |
39 | 40 | |||
40 | UNLIMIT_RESOURCES+= datasize | 41 | UNLIMIT_RESOURCES+= datasize | |
41 | UNLIMIT_RESOURCES+= stacksize | 42 | UNLIMIT_RESOURCES+= stacksize | |
42 | 43 | |||
43 | SUBST_CLASSES+= vars | 44 | SUBST_CLASSES+= vars | |
44 | SUBST_MESSAGE.vars= Setting target machine name path in ${SUBST_FILES.vars} | 45 | SUBST_MESSAGE.vars= Setting target machine name path in ${SUBST_FILES.vars} | |
45 | SUBST_STAGE.vars= pre-configure | 46 | SUBST_STAGE.vars= pre-configure | |
46 | SUBST_FILES.vars= gcc/Makefile.in | 47 | SUBST_FILES.vars= gcc/Makefile.in | |
47 | SUBST_VARS.vars= GCC_TARGET_MACHINE | 48 | SUBST_VARS.vars= GCC_TARGET_MACHINE | |
48 | 49 | |||
49 | .include "../../mk/bsd.prefs.mk" | 50 | .include "../../mk/bsd.prefs.mk" | |
50 | 51 | |||
51 | LANGS= c | 52 | LANGS= c | |
52 | 53 | |||
53 | # In some cases LINKER_RPATH_FLAG needs a trailing space. | 54 | # In some cases LINKER_RPATH_FLAG needs a trailing space. | |
54 | LINKER_RPATH_FLAG:= ${LINKER_RPATH_FLAG:S/-rpath/& /} | 55 | LINKER_RPATH_FLAG:= ${LINKER_RPATH_FLAG:S/-rpath/& /} | |
55 | 56 | |||
56 | ## The Library rpath to use in end programs. | 57 | ## The Library rpath to use in end programs. | |
57 | LDFLAGS_FOR_TARGET= ${LDFLAGS:M${COMPILER_RPATH_FLAG}*:N*/usr/lib*} | 58 | LDFLAGS_FOR_TARGET= ${LDFLAGS:M${COMPILER_RPATH_FLAG}*:N*/usr/lib*} | |
58 | 59 | |||
59 | # The "-static-libstdc++ -static-libgcc" flags are normally added to the | 60 | # The "-static-libstdc++ -static-libgcc" flags are normally added to the | |
60 | # boot-ldflags by configure but because we are supply the boot-ldflags | 61 | # boot-ldflags by configure but because we are supply the boot-ldflags | |
61 | # we mash supply them. | 62 | # we mash supply them. | |
62 | BOOT_LDFLAGS= -static-libstdc++ -static-libgcc ${LDFLAGS_FOR_TARGET} | 63 | BOOT_LDFLAGS= -static-libstdc++ -static-libgcc ${LDFLAGS_FOR_TARGET} | |
63 | # Needed on Darwin when LDFLAGS point to a SDK | 64 | # Needed on Darwin when LDFLAGS point to a SDK | |
64 | BOOT_LDFLAGS+= ${LDFLAGS:M-Wl,-syslibroot*} | 65 | BOOT_LDFLAGS+= ${LDFLAGS:M-Wl,-syslibroot*} | |
65 | # GCC does not understand this option; remove it, or stage build will fail | 66 | # GCC does not understand this option; remove it, or stage build will fail | |
66 | BUILDLINK_TRANSFORM+= rm:-stdlib=libc++ | 67 | BUILDLINK_TRANSFORM+= rm:-stdlib=libc++ | |
67 | 68 | |||
68 | .include "options.mk" | 69 | .include "options.mk" | |
69 | 70 | |||
70 | ## For graphite support. | 71 | ## For graphite support. | |
71 | .if !empty(PKG_OPTIONS:Mgcc-graphite) | 72 | .if !empty(PKG_OPTIONS:Mgcc-graphite) | |
72 | 73 | |||
73 | post-extract: | 74 | post-extract: | |
74 | ${TAR} -jxf ${DISTDIR}/${ISL14}.tar.bz2 -C ${WRKSRC} | 75 | ${TAR} -jxf ${DISTDIR}/${ISL14}.tar.bz2 -C ${WRKSRC} | |
75 | ${MV} ${WRKSRC}/${ISL14} ${WRKSRC}/isl | 76 | ${MV} ${WRKSRC}/${ISL14} ${WRKSRC}/isl | |
76 | .endif | 77 | .endif | |
77 | 78 | |||
78 | ## For target librarys and libjava programs. | 79 | ## For target librarys and libjava programs. | |
79 | CONFIGURE_ENV+= LDFLAGS_FOR_TARGET=${LDFLAGS_FOR_TARGET:Q} | 80 | CONFIGURE_ENV+= LDFLAGS_FOR_TARGET=${LDFLAGS_FOR_TARGET:Q} | |
80 | 81 | |||
81 | CONFIGURE_ARGS+= --enable-languages=${LANGS:Q} | 82 | CONFIGURE_ARGS+= --enable-languages=${LANGS:Q} | |
82 | CONFIGURE_ARGS+= --enable-shared | 83 | CONFIGURE_ARGS+= --enable-shared | |
83 | CONFIGURE_ARGS+= --enable-long-long | 84 | CONFIGURE_ARGS+= --enable-long-long | |
84 | CONFIGURE_ARGS+= --with-local-prefix=${GCC_PREFIX:Q} | 85 | CONFIGURE_ARGS+= --with-local-prefix=${GCC_PREFIX:Q} | |
85 | .if !empty(MACHINE_PLATFORM:MNetBSD-*-*) | 86 | .if !empty(MACHINE_PLATFORM:MNetBSD-*-*) | |
86 | # on NetBSD, use the native SSP code in libc | 87 | # on NetBSD, use the native SSP code in libc | |
87 | CONFIGURE_ARGS+= --disable-libssp | 88 | CONFIGURE_ARGS+= --disable-libssp | |
88 | .else | 89 | .else | |
89 | CONFIGURE_ARGS+= --enable-libssp | 90 | CONFIGURE_ARGS+= --enable-libssp | |
90 | .endif | 91 | .endif | |
91 | CONFIGURE_ARGS+= --enable-threads=posix | 92 | CONFIGURE_ARGS+= --enable-threads=posix | |
92 | CONFIGURE_ARGS+= --with-boot-ldflags=${BOOT_LDFLAGS:Q} | 93 | CONFIGURE_ARGS+= --with-boot-ldflags=${BOOT_LDFLAGS:Q} | |
93 | 94 | |||
94 | # multilib on Darwin requires fat-binaries | 95 | # multilib on Darwin requires fat-binaries | |
95 | CONFIGURE_ARGS.Darwin+= --disable-multilib | 96 | CONFIGURE_ARGS.Darwin+= --disable-multilib | |
96 | .if !empty(OSX_SDK_PATH) | 97 | .if !empty(OSX_SDK_PATH) | |
97 | CONFIGURE_ARGS.Darwin+= --with-sysroot=${OSX_SDK_PATH} | 98 | CONFIGURE_ARGS.Darwin+= --with-sysroot=${OSX_SDK_PATH} | |
98 | .endif | 99 | .endif | |
99 | CONFIGURE_ARGS.NetBSD+= --with-gnu-ld --with-ld=/usr/bin/ld | 100 | CONFIGURE_ARGS.NetBSD+= --with-gnu-ld --with-ld=/usr/bin/ld | |
100 | CONFIGURE_ARGS.NetBSD+= --with-gnu-as --with-as=/usr/bin/as | 101 | CONFIGURE_ARGS.NetBSD+= --with-gnu-as --with-as=/usr/bin/as | |
101 | MAKE_ENV.NetBSD+= ac_cv_func_clock_gettime=yes | 102 | MAKE_ENV.NetBSD+= ac_cv_func_clock_gettime=yes | |
102 | MAKE_ENV.NetBSD+= ac_cv_func_gethostbyname_r=no | 103 | MAKE_ENV.NetBSD+= ac_cv_func_gethostbyname_r=no | |
103 | MAKE_ENV.NetBSD+= ac_cv_func_freelocale=no | 104 | MAKE_ENV.NetBSD+= ac_cv_func_freelocale=no | |
104 | MAKE_ENV.NetBSD+= ac_cv_func_newlocale=no | 105 | MAKE_ENV.NetBSD+= ac_cv_func_newlocale=no | |
105 | MAKE_ENV.NetBSD+= ac_cv_func_uselocale=no | 106 | MAKE_ENV.NetBSD+= ac_cv_func_uselocale=no | |
106 | 107 | |||
107 | CONFIGURE_ARGS.DragonFly+= --disable-bootstrap | 108 | CONFIGURE_ARGS.DragonFly+= --disable-bootstrap | |
108 | 109 | |||
109 | .if !empty(MACHINE_PLATFORM:MNetBSD-*-i386) || !empty(MACHINE_PLATFORM:MLinux-*-i386) | 110 | .if !empty(MACHINE_PLATFORM:MNetBSD-*-i386) || !empty(MACHINE_PLATFORM:MLinux-*-i386) | |
110 | CONFIGURE_ARGS+= --with-arch=i486 --with-tune=i486 | 111 | CONFIGURE_ARGS+= --with-arch=i486 --with-tune=i486 | |
111 | .endif | 112 | .endif | |
112 | 113 | |||
113 | .if !empty(MACHINE_PLATFORM:MNetBSD-*-x86_64) || !empty(MACHINE_PLATFORM:MLinux-*-x86_64) | 114 | .if !empty(MACHINE_PLATFORM:MNetBSD-*-x86_64) || !empty(MACHINE_PLATFORM:MLinux-*-x86_64) | |
114 | CONFIGURE_ARGS+= --with-arch=nocona --with-tune=nocona --with-fpmath=sse | 115 | CONFIGURE_ARGS+= --with-arch=nocona --with-tune=nocona --with-fpmath=sse | |
115 | .endif | 116 | .endif | |
116 | 117 | |||
117 | .if !empty(MACHINE_PLATFORM:MDarwin-[0-8].*-*) | 118 | .if !empty(MACHINE_PLATFORM:MDarwin-[0-8].*-*) | |
118 | CONFIGURE_ARGS+= --with-dwarf2 | 119 | CONFIGURE_ARGS+= --with-dwarf2 | |
119 | .endif | 120 | .endif | |
120 | 121 | |||
121 | # ${WRKSRC}/fixincludes/ looks for sed and compiles the path to sed into | 122 | # ${WRKSRC}/fixincludes/ looks for sed and compiles the path to sed into | |
122 | # a binary so we need to make sure we give it the installed sed and not | 123 | # a binary so we need to make sure we give it the installed sed and not | |
123 | # the tool wrapped one. | 124 | # the tool wrapped one. | |
124 | MAKE_ENV+= ac_cv_path_SED=${TOOLS_SED} | 125 | MAKE_ENV+= ac_cv_path_SED=${TOOLS_SED} | |
125 | MAKE_ENV+= lt_cv_path_SED=${TOOLS_SED} | 126 | MAKE_ENV+= lt_cv_path_SED=${TOOLS_SED} | |
126 | 127 | |||
127 | # Determine whether to use binutils | 128 | # Determine whether to use binutils | |
128 | .if ${OPSYS} == "SunOS" | 129 | .if ${OPSYS} == "SunOS" | |
129 | . if exists(/usr/sfw/bin/gobjdump) | 130 | . if exists(/usr/sfw/bin/gobjdump) | |
130 | CONFIGURE_ENV+= OBJDUMP=/usr/sfw/bin/gobjdump | 131 | CONFIGURE_ENV+= OBJDUMP=/usr/sfw/bin/gobjdump | |
131 | . endif | 132 | . endif | |
132 | . if exists(/usr/bin/ld) | 133 | . if exists(/usr/bin/ld) | |
133 | CONFIGURE_ARGS+= --without-gnu-ld --with-ld=/usr/bin/ld | 134 | CONFIGURE_ARGS+= --without-gnu-ld --with-ld=/usr/bin/ld | |
134 | . else | 135 | . else | |
135 | CONFIGURE_ARGS+= --without-gnu-ld --with-ld=/usr/ccs/bin/ld | 136 | CONFIGURE_ARGS+= --without-gnu-ld --with-ld=/usr/ccs/bin/ld | |
136 | . endif | 137 | . endif | |
137 | . if exists(/usr/sfw/bin/gas) | 138 | . if exists(/usr/sfw/bin/gas) | |
138 | CONFIGURE_ARGS+= --with-gnu-as --with-as=/usr/sfw/bin/gas | 139 | CONFIGURE_ARGS+= --with-gnu-as --with-as=/usr/sfw/bin/gas | |
139 | . elif exists(/usr/ccs/bin/as) | 140 | . elif exists(/usr/ccs/bin/as) | |
140 | CONFIGURE_ARGS+= --without-gnu-as --with-as=/usr/ccs/bin/as | 141 | CONFIGURE_ARGS+= --without-gnu-as --with-as=/usr/ccs/bin/as | |
141 | . else | 142 | . else | |
142 | BUILDLINK_DEPMETHOD.binutils= full | 143 | BUILDLINK_DEPMETHOD.binutils= full | |
143 | . include "../../devel/binutils/buildlink3.mk" | 144 | . include "../../devel/binutils/buildlink3.mk" | |
144 | CONFIGURE_ARGS+= --with-gnu-as --with-as=${PREFIX}/bin/gas | 145 | CONFIGURE_ARGS+= --with-gnu-as --with-as=${PREFIX}/bin/gas | |
145 | . endif | 146 | . endif | |
146 | .endif | 147 | .endif | |
147 | 148 | |||
148 | .if ${OS_VARIANT} == "SmartOS" | 149 | .if ${OS_VARIANT} == "SmartOS" | |
149 | SUBST_CLASSES+= ccs | 150 | SUBST_CLASSES+= ccs | |
150 | SUBST_STAGE.ccs= pre-configure | 151 | SUBST_STAGE.ccs= pre-configure | |
151 | SUBST_FILES.ccs= contrib/make_sunver.pl | 152 | SUBST_FILES.ccs= contrib/make_sunver.pl | |
152 | SUBST_SED.ccs= -e 's,/usr/ccs/bin,/usr/bin,g' | 153 | SUBST_SED.ccs= -e 's,/usr/ccs/bin,/usr/bin,g' | |
153 | .endif | 154 | .endif | |
154 | 155 | |||
155 | pre-configure: | 156 | pre-configure: | |
156 | ${RUN} cd ${WRKSRC} && ${MKDIR} ${OBJDIR} | 157 | ${RUN} cd ${WRKSRC} && ${MKDIR} ${OBJDIR} | |
157 | 158 | |||
158 | TEST_TARGET= -k check || ${TRUE} | 159 | TEST_TARGET= -k check || ${TRUE} | |
159 | pre-test: | 160 | pre-test: | |
160 | ${RUN} \ | 161 | ${RUN} \ | |
161 | if runtest --version >/dev/null 2>/dev/null ; then \ | 162 | if runtest --version >/dev/null 2>/dev/null ; then \ | |
162 | : ; \ | 163 | : ; \ | |
163 | else \ | 164 | else \ | |
164 | ${ECHO} "ERROR: Please install devel/dejagnu in order to run the test suite." ; \ | 165 | ${ECHO} "ERROR: Please install devel/dejagnu in order to run the test suite." ; \ | |
165 | exit 1 ; \ | 166 | exit 1 ; \ | |
166 | fi | 167 | fi | |
167 | post-test: | 168 | post-test: | |
168 | ${RUN} cd ${WRKSRC} && cd ${OBJDIR} && \ | 169 | ${RUN} cd ${WRKSRC} && cd ${OBJDIR} && \ | |
169 | ${SHELL} ${WRKSRC}/contrib/test_summary >${WRKDIR}/test_summary.log | 170 | ${SHELL} ${WRKSRC}/contrib/test_summary >${WRKDIR}/test_summary.log | |
170 | ${INFO_MSG} "Test summary are available in ${WRKDIR}/test_summary.log" | 171 | ${INFO_MSG} "Test summary are available in ${WRKDIR}/test_summary.log" | |
171 | 172 | |||
172 | post-install: | 173 | post-install: | |
173 | ${TEST} -f ${DESTDIR}${GCC_PREFIX}/bin/cc || \ | 174 | ${TEST} -f ${DESTDIR}${GCC_PREFIX}/bin/cc || \ | |
174 | ( cd ${DESTDIR}${GCC_PREFIX}/bin ; ${LN} -f gcc cc ) | 175 | ( cd ${DESTDIR}${GCC_PREFIX}/bin ; ${LN} -f gcc cc ) | |
175 | .if !empty(PKG_OPTIONS:Mgcc-java) | 176 | .if !empty(PKG_OPTIONS:Mgcc-java) | |
176 | ${RM} -f ${DESTDIR}${JAVA_HOME}/bin/javadoc | 177 | ${RM} -f ${DESTDIR}${JAVA_HOME}/bin/javadoc | |
177 | ${RM} -f ${DESTDIR}${JAVA_HOME}/jre/lib/${JAVA_ARCH}/libjawt.so | 178 | ${RM} -f ${DESTDIR}${JAVA_HOME}/jre/lib/${JAVA_ARCH}/libjawt.so | |
178 | .endif | 179 | .endif | |
179 | .if !empty(MACHINE_PLATFORM:MSunOS-*-*86*) && ${OS_VERSION} != "5.11" | 180 | .if !empty(MACHINE_PLATFORM:MSunOS-*-*86*) && ${OS_VERSION} != "5.11" | |
180 | ${SH} files/values.c ${DESTDIR}${GCC_PREFIX}/bin/gcc -m32 || ${TRUE} | 181 | ${SH} files/values.c ${DESTDIR}${GCC_PREFIX}/bin/gcc -m32 || ${TRUE} | |
181 | ${SH} files/values.c ${DESTDIR}${GCC_PREFIX}/bin/gcc -m64 || ${TRUE} | 182 | ${SH} files/values.c ${DESTDIR}${GCC_PREFIX}/bin/gcc -m64 || ${TRUE} | |
182 | .endif | 183 | .endif | |
183 | 184 | |||
184 | GENERATE_PLIST+= \ | 185 | GENERATE_PLIST+= \ | |
185 | cd ${DESTDIR}${PREFIX} && \ | 186 | cd ${DESTDIR}${PREFIX} && \ | |
186 | ${FIND} ${GCC_SUBPREFIX} \( -type f -o -type l \) -print | ${SORT} ; | 187 | ${FIND} ${GCC_SUBPREFIX} \( -type f -o -type l \) -print | ${SORT} ; | |
187 | 188 | |||
188 | .include "../../mk/dlopen.buildlink3.mk" | 189 | .include "../../mk/dlopen.buildlink3.mk" | |
189 | .include "../../mk/pthread.buildlink3.mk" | 190 | .include "../../mk/pthread.buildlink3.mk" | |
190 | .include "../../mk/bsd.pkg.mk" | 191 | .include "../../mk/bsd.pkg.mk" |
@@ -1,190 +1,191 @@ | @@ -1,190 +1,191 @@ | |||
1 | # $NetBSD: Makefile,v 1.5 2017/06/21 21:16:36 maya Exp $ | 1 | # $NetBSD: Makefile,v 1.6 2017/06/22 21:44:49 maya Exp $ | |
2 | 2 | |||
3 | GCC_PKGNAME= gcc6 | 3 | GCC_PKGNAME= gcc6 | |
4 | .include "version.mk" | 4 | .include "version.mk" | |
5 | 5 | |||
6 | DISTNAME= gcc-${GCC6_DIST_VERSION} | 6 | DISTNAME= gcc-${GCC6_DIST_VERSION} | |
7 | PKGNAME= ${GCC_PKGNAME}-${GCC6_DIST_VERSION} | 7 | PKGNAME= ${GCC_PKGNAME}-${GCC6_DIST_VERSION} | |
8 | ## When bumping the PKGREVISION of this package the PKGREVISION of | 8 | ## When bumping the PKGREVISION of this package the PKGREVISION of | |
9 | ## lang/gcc6-libs needs to be bump to be at least 1 more than the | 9 | ## lang/gcc6-libs needs to be bump to be at least 1 more than the | |
10 | ## PKGREVISION of this package! | 10 | ## PKGREVISION of this package! | |
11 | PKGREVISION= 1 | 11 | PKGREVISION= 1 | |
12 | CATEGORIES= lang | 12 | CATEGORIES= lang | |
13 | MASTER_SITES= ${MASTER_SITE_GNU:=gcc/gcc-${GCC6_DIST_VERSION}/} | 13 | MASTER_SITES= ${MASTER_SITE_GNU:=gcc/gcc-${GCC6_DIST_VERSION}/} | |
14 | EXTRACT_SUFX= .tar.bz2 | 14 | EXTRACT_SUFX= .tar.bz2 | |
15 | 15 | |||
16 | MAINTAINER= maya@NetBSD.org | 16 | MAINTAINER= maya@NetBSD.org | |
17 | HOMEPAGE= http://gcc.gnu.org/ | 17 | HOMEPAGE= http://gcc.gnu.org/ | |
18 | COMMENT= The GNU Compiler Collection (GCC) - 6 Release Series | 18 | COMMENT= The GNU Compiler Collection (GCC) - 6 Release Series | |
19 | LICENSE= gnu-gpl-v2 AND gnu-gpl-v3 AND gnu-lgpl-v2 AND gnu-lgpl-v3 | 19 | LICENSE= gnu-gpl-v2 AND gnu-gpl-v3 AND gnu-lgpl-v2 AND gnu-lgpl-v3 | |
20 | 20 | |||
21 | DISTFILES= ${DEFAULT_DISTFILES} | 21 | DISTFILES= ${DEFAULT_DISTFILES} | |
22 | EXTRACT_ONLY= ${DEFAULT_DISTFILES} | 22 | EXTRACT_ONLY= ${DEFAULT_DISTFILES} | |
23 | 23 | |||
24 | NOT_FOR_PLATFORM= Interix-*-* | 24 | NOT_FOR_PLATFORM= Interix-*-* | |
25 | 25 | |||
26 | USE_LANGUAGES= c c++ | 26 | USE_LANGUAGES= c c++ | |
27 | USE_TOOLS+= gmake makeinfo gsed tar:build | 27 | USE_TOOLS+= gmake makeinfo sed:run tar:build | |
28 | USE_TOOLS.NetBSD+= gsed | |||
28 | 29 | |||
29 | GNU_CONFIGURE= yes | 30 | GNU_CONFIGURE= yes | |
30 | ## Build outside ${WRKSRC} | 31 | ## Build outside ${WRKSRC} | |
31 | OBJDIR= ../build | 32 | OBJDIR= ../build | |
32 | CONFIGURE_DIRS= ${OBJDIR} | 33 | CONFIGURE_DIRS= ${OBJDIR} | |
33 | CONFIGURE_SCRIPT= ../${DISTNAME}/configure | 34 | CONFIGURE_SCRIPT= ../${DISTNAME}/configure | |
34 | GCC_SUBPREFIX= ${GCC_PKGNAME} | 35 | GCC_SUBPREFIX= ${GCC_PKGNAME} | |
35 | GCC_PREFIX= ${PREFIX}/${GCC_SUBPREFIX} | 36 | GCC_PREFIX= ${PREFIX}/${GCC_SUBPREFIX} | |
36 | GNU_CONFIGURE_PREFIX= ${GCC_PREFIX} | 37 | GNU_CONFIGURE_PREFIX= ${GCC_PREFIX} | |
37 | INFO_FILES= yes | 38 | INFO_FILES= yes | |
38 | CONFIGURE_ARGS+= --disable-libstdcxx-pch | 39 | CONFIGURE_ARGS+= --disable-libstdcxx-pch | |
39 | 40 | |||
40 | UNLIMIT_RESOURCES+= datasize | 41 | UNLIMIT_RESOURCES+= datasize | |
41 | UNLIMIT_RESOURCES+= stacksize | 42 | UNLIMIT_RESOURCES+= stacksize | |
42 | 43 | |||
43 | SUBST_CLASSES+= vars | 44 | SUBST_CLASSES+= vars | |
44 | SUBST_MESSAGE.vars= Setting target machine name path in ${SUBST_FILES.vars} | 45 | SUBST_MESSAGE.vars= Setting target machine name path in ${SUBST_FILES.vars} | |
45 | SUBST_STAGE.vars= pre-configure | 46 | SUBST_STAGE.vars= pre-configure | |
46 | SUBST_FILES.vars= gcc/Makefile.in | 47 | SUBST_FILES.vars= gcc/Makefile.in | |
47 | SUBST_VARS.vars= GCC_TARGET_MACHINE | 48 | SUBST_VARS.vars= GCC_TARGET_MACHINE | |
48 | 49 | |||
49 | .include "../../mk/bsd.prefs.mk" | 50 | .include "../../mk/bsd.prefs.mk" | |
50 | 51 | |||
51 | LANGS= c | 52 | LANGS= c | |
52 | 53 | |||
53 | # In some cases LINKER_RPATH_FLAG needs a trailing space. | 54 | # In some cases LINKER_RPATH_FLAG needs a trailing space. | |
54 | LINKER_RPATH_FLAG:= ${LINKER_RPATH_FLAG:S/-rpath/& /} | 55 | LINKER_RPATH_FLAG:= ${LINKER_RPATH_FLAG:S/-rpath/& /} | |
55 | 56 | |||
56 | ## The Library rpath to use in end programs. | 57 | ## The Library rpath to use in end programs. | |
57 | LDFLAGS_FOR_TARGET= ${LDFLAGS:M${COMPILER_RPATH_FLAG}*:N*/usr/lib*} | 58 | LDFLAGS_FOR_TARGET= ${LDFLAGS:M${COMPILER_RPATH_FLAG}*:N*/usr/lib*} | |
58 | 59 | |||
59 | # The "-static-libstdc++ -static-libgcc" flags are normally added to the | 60 | # The "-static-libstdc++ -static-libgcc" flags are normally added to the | |
60 | # boot-ldflags by configure but because we are supply the boot-ldflags | 61 | # boot-ldflags by configure but because we are supply the boot-ldflags | |
61 | # we mash supply them. | 62 | # we mash supply them. | |
62 | BOOT_LDFLAGS= -static-libstdc++ -static-libgcc ${LDFLAGS_FOR_TARGET} | 63 | BOOT_LDFLAGS= -static-libstdc++ -static-libgcc ${LDFLAGS_FOR_TARGET} | |
63 | # Needed on Darwin when LDFLAGS point to a SDK | 64 | # Needed on Darwin when LDFLAGS point to a SDK | |
64 | BOOT_LDFLAGS+= ${LDFLAGS:M-Wl,-syslibroot*} | 65 | BOOT_LDFLAGS+= ${LDFLAGS:M-Wl,-syslibroot*} | |
65 | # GCC does not understand this option; remove it, or stage build will fail | 66 | # GCC does not understand this option; remove it, or stage build will fail | |
66 | BUILDLINK_TRANSFORM+= rm:-stdlib=libc++ | 67 | BUILDLINK_TRANSFORM+= rm:-stdlib=libc++ | |
67 | 68 | |||
68 | .include "options.mk" | 69 | .include "options.mk" | |
69 | 70 | |||
70 | ## For graphite support. | 71 | ## For graphite support. | |
71 | .if !empty(PKG_OPTIONS:Mgcc-graphite) | 72 | .if !empty(PKG_OPTIONS:Mgcc-graphite) | |
72 | 73 | |||
73 | post-extract: | 74 | post-extract: | |
74 | ${TAR} -jxf ${DISTDIR}/${ISL14}.tar.bz2 -C ${WRKSRC} | 75 | ${TAR} -jxf ${DISTDIR}/${ISL14}.tar.bz2 -C ${WRKSRC} | |
75 | ${MV} ${WRKSRC}/${ISL14} ${WRKSRC}/isl | 76 | ${MV} ${WRKSRC}/${ISL14} ${WRKSRC}/isl | |
76 | .endif | 77 | .endif | |
77 | 78 | |||
78 | ## For target librarys and libjava programs. | 79 | ## For target librarys and libjava programs. | |
79 | CONFIGURE_ENV+= LDFLAGS_FOR_TARGET=${LDFLAGS_FOR_TARGET:Q} | 80 | CONFIGURE_ENV+= LDFLAGS_FOR_TARGET=${LDFLAGS_FOR_TARGET:Q} | |
80 | 81 | |||
81 | CONFIGURE_ARGS+= --enable-languages=${LANGS:Q} | 82 | CONFIGURE_ARGS+= --enable-languages=${LANGS:Q} | |
82 | CONFIGURE_ARGS+= --enable-shared | 83 | CONFIGURE_ARGS+= --enable-shared | |
83 | CONFIGURE_ARGS+= --enable-long-long | 84 | CONFIGURE_ARGS+= --enable-long-long | |
84 | CONFIGURE_ARGS+= --with-local-prefix=${GCC_PREFIX:Q} | 85 | CONFIGURE_ARGS+= --with-local-prefix=${GCC_PREFIX:Q} | |
85 | .if !empty(MACHINE_PLATFORM:MNetBSD-*-*) | 86 | .if !empty(MACHINE_PLATFORM:MNetBSD-*-*) | |
86 | # on NetBSD, use the native SSP code in libc | 87 | # on NetBSD, use the native SSP code in libc | |
87 | CONFIGURE_ARGS+= --disable-libssp | 88 | CONFIGURE_ARGS+= --disable-libssp | |
88 | .else | 89 | .else | |
89 | CONFIGURE_ARGS+= --enable-libssp | 90 | CONFIGURE_ARGS+= --enable-libssp | |
90 | .endif | 91 | .endif | |
91 | CONFIGURE_ARGS+= --enable-threads=posix | 92 | CONFIGURE_ARGS+= --enable-threads=posix | |
92 | CONFIGURE_ARGS+= --with-boot-ldflags=${BOOT_LDFLAGS:Q} | 93 | CONFIGURE_ARGS+= --with-boot-ldflags=${BOOT_LDFLAGS:Q} | |
93 | 94 | |||
94 | # multilib on Darwin requires fat-binaries | 95 | # multilib on Darwin requires fat-binaries | |
95 | CONFIGURE_ARGS.Darwin+= --disable-multilib | 96 | CONFIGURE_ARGS.Darwin+= --disable-multilib | |
96 | .if !empty(OSX_SDK_PATH) | 97 | .if !empty(OSX_SDK_PATH) | |
97 | CONFIGURE_ARGS.Darwin+= --with-sysroot=${OSX_SDK_PATH} | 98 | CONFIGURE_ARGS.Darwin+= --with-sysroot=${OSX_SDK_PATH} | |
98 | .endif | 99 | .endif | |
99 | CONFIGURE_ARGS.NetBSD+= --with-gnu-ld --with-ld=/usr/bin/ld | 100 | CONFIGURE_ARGS.NetBSD+= --with-gnu-ld --with-ld=/usr/bin/ld | |
100 | CONFIGURE_ARGS.NetBSD+= --with-gnu-as --with-as=/usr/bin/as | 101 | CONFIGURE_ARGS.NetBSD+= --with-gnu-as --with-as=/usr/bin/as | |
101 | MAKE_ENV.NetBSD+= ac_cv_func_clock_gettime=yes | 102 | MAKE_ENV.NetBSD+= ac_cv_func_clock_gettime=yes | |
102 | MAKE_ENV.NetBSD+= ac_cv_func_gethostbyname_r=no | 103 | MAKE_ENV.NetBSD+= ac_cv_func_gethostbyname_r=no | |
103 | MAKE_ENV.NetBSD+= ac_cv_func_freelocale=no | 104 | MAKE_ENV.NetBSD+= ac_cv_func_freelocale=no | |
104 | MAKE_ENV.NetBSD+= ac_cv_func_newlocale=no | 105 | MAKE_ENV.NetBSD+= ac_cv_func_newlocale=no | |
105 | MAKE_ENV.NetBSD+= ac_cv_func_uselocale=no | 106 | MAKE_ENV.NetBSD+= ac_cv_func_uselocale=no | |
106 | 107 | |||
107 | CONFIGURE_ARGS.DragonFly+= --disable-bootstrap | 108 | CONFIGURE_ARGS.DragonFly+= --disable-bootstrap | |
108 | 109 | |||
109 | .if !empty(MACHINE_PLATFORM:MNetBSD-*-i386) || !empty(MACHINE_PLATFORM:MLinux-*-i386) | 110 | .if !empty(MACHINE_PLATFORM:MNetBSD-*-i386) || !empty(MACHINE_PLATFORM:MLinux-*-i386) | |
110 | CONFIGURE_ARGS+= --with-arch=i486 --with-tune=i486 | 111 | CONFIGURE_ARGS+= --with-arch=i486 --with-tune=i486 | |
111 | .endif | 112 | .endif | |
112 | 113 | |||
113 | .if !empty(MACHINE_PLATFORM:MNetBSD-*-x86_64) || !empty(MACHINE_PLATFORM:MLinux-*-x86_64) | 114 | .if !empty(MACHINE_PLATFORM:MNetBSD-*-x86_64) || !empty(MACHINE_PLATFORM:MLinux-*-x86_64) | |
114 | CONFIGURE_ARGS+= --with-arch=nocona --with-tune=nocona --with-fpmath=sse | 115 | CONFIGURE_ARGS+= --with-arch=nocona --with-tune=nocona --with-fpmath=sse | |
115 | .endif | 116 | .endif | |
116 | 117 | |||
117 | .if !empty(MACHINE_PLATFORM:MDarwin-[0-8].*-*) | 118 | .if !empty(MACHINE_PLATFORM:MDarwin-[0-8].*-*) | |
118 | CONFIGURE_ARGS+= --with-dwarf2 | 119 | CONFIGURE_ARGS+= --with-dwarf2 | |
119 | .endif | 120 | .endif | |
120 | 121 | |||
121 | # ${WRKSRC}/fixincludes/ looks for sed and compiles the path to sed into | 122 | # ${WRKSRC}/fixincludes/ looks for sed and compiles the path to sed into | |
122 | # a binary so we need to make sure we give it the installed sed and not | 123 | # a binary so we need to make sure we give it the installed sed and not | |
123 | # the tool wrapped one. | 124 | # the tool wrapped one. | |
124 | MAKE_ENV+= ac_cv_path_SED=${TOOLS_SED} | 125 | MAKE_ENV+= ac_cv_path_SED=${TOOLS_SED} | |
125 | MAKE_ENV+= lt_cv_path_SED=${TOOLS_SED} | 126 | MAKE_ENV+= lt_cv_path_SED=${TOOLS_SED} | |
126 | 127 | |||
127 | # Determine whether to use binutils | 128 | # Determine whether to use binutils | |
128 | .if ${OPSYS} == "SunOS" | 129 | .if ${OPSYS} == "SunOS" | |
129 | . if exists(/usr/sfw/bin/gobjdump) | 130 | . if exists(/usr/sfw/bin/gobjdump) | |
130 | CONFIGURE_ENV+= OBJDUMP=/usr/sfw/bin/gobjdump | 131 | CONFIGURE_ENV+= OBJDUMP=/usr/sfw/bin/gobjdump | |
131 | . endif | 132 | . endif | |
132 | . if exists(/usr/bin/ld) | 133 | . if exists(/usr/bin/ld) | |
133 | CONFIGURE_ARGS+= --without-gnu-ld --with-ld=/usr/bin/ld | 134 | CONFIGURE_ARGS+= --without-gnu-ld --with-ld=/usr/bin/ld | |
134 | . else | 135 | . else | |
135 | CONFIGURE_ARGS+= --without-gnu-ld --with-ld=/usr/ccs/bin/ld | 136 | CONFIGURE_ARGS+= --without-gnu-ld --with-ld=/usr/ccs/bin/ld | |
136 | . endif | 137 | . endif | |
137 | . if exists(/usr/sfw/bin/gas) | 138 | . if exists(/usr/sfw/bin/gas) | |
138 | CONFIGURE_ARGS+= --with-gnu-as --with-as=/usr/sfw/bin/gas | 139 | CONFIGURE_ARGS+= --with-gnu-as --with-as=/usr/sfw/bin/gas | |
139 | . elif exists(/usr/ccs/bin/as) | 140 | . elif exists(/usr/ccs/bin/as) | |
140 | CONFIGURE_ARGS+= --without-gnu-as --with-as=/usr/ccs/bin/as | 141 | CONFIGURE_ARGS+= --without-gnu-as --with-as=/usr/ccs/bin/as | |
141 | . else | 142 | . else | |
142 | BUILDLINK_DEPMETHOD.binutils= full | 143 | BUILDLINK_DEPMETHOD.binutils= full | |
143 | . include "../../devel/binutils/buildlink3.mk" | 144 | . include "../../devel/binutils/buildlink3.mk" | |
144 | CONFIGURE_ARGS+= --with-gnu-as --with-as=${PREFIX}/bin/gas | 145 | CONFIGURE_ARGS+= --with-gnu-as --with-as=${PREFIX}/bin/gas | |
145 | . endif | 146 | . endif | |
146 | .endif | 147 | .endif | |
147 | 148 | |||
148 | .if ${OS_VARIANT} == "SmartOS" | 149 | .if ${OS_VARIANT} == "SmartOS" | |
149 | SUBST_CLASSES+= ccs | 150 | SUBST_CLASSES+= ccs | |
150 | SUBST_STAGE.ccs= pre-configure | 151 | SUBST_STAGE.ccs= pre-configure | |
151 | SUBST_FILES.ccs= contrib/make_sunver.pl | 152 | SUBST_FILES.ccs= contrib/make_sunver.pl | |
152 | SUBST_SED.ccs= -e 's,/usr/ccs/bin,/usr/bin,g' | 153 | SUBST_SED.ccs= -e 's,/usr/ccs/bin,/usr/bin,g' | |
153 | .endif | 154 | .endif | |
154 | 155 | |||
155 | pre-configure: | 156 | pre-configure: | |
156 | ${RUN} cd ${WRKSRC} && ${MKDIR} ${OBJDIR} | 157 | ${RUN} cd ${WRKSRC} && ${MKDIR} ${OBJDIR} | |
157 | 158 | |||
158 | TEST_TARGET= -k check || ${TRUE} | 159 | TEST_TARGET= -k check || ${TRUE} | |
159 | pre-test: | 160 | pre-test: | |
160 | ${RUN} \ | 161 | ${RUN} \ | |
161 | if runtest --version >/dev/null 2>/dev/null ; then \ | 162 | if runtest --version >/dev/null 2>/dev/null ; then \ | |
162 | : ; \ | 163 | : ; \ | |
163 | else \ | 164 | else \ | |
164 | ${ECHO} "ERROR: Please install devel/dejagnu in order to run the test suite." ; \ | 165 | ${ECHO} "ERROR: Please install devel/dejagnu in order to run the test suite." ; \ | |
165 | exit 1 ; \ | 166 | exit 1 ; \ | |
166 | fi | 167 | fi | |
167 | post-test: | 168 | post-test: | |
168 | ${RUN} cd ${WRKSRC} && cd ${OBJDIR} && \ | 169 | ${RUN} cd ${WRKSRC} && cd ${OBJDIR} && \ | |
169 | ${SHELL} ${WRKSRC}/contrib/test_summary >${WRKDIR}/test_summary.log | 170 | ${SHELL} ${WRKSRC}/contrib/test_summary >${WRKDIR}/test_summary.log | |
170 | ${INFO_MSG} "Test summary are available in ${WRKDIR}/test_summary.log" | 171 | ${INFO_MSG} "Test summary are available in ${WRKDIR}/test_summary.log" | |
171 | 172 | |||
172 | post-install: | 173 | post-install: | |
173 | ${TEST} -f ${DESTDIR}${GCC_PREFIX}/bin/cc || \ | 174 | ${TEST} -f ${DESTDIR}${GCC_PREFIX}/bin/cc || \ | |
174 | ( cd ${DESTDIR}${GCC_PREFIX}/bin ; ${LN} -f gcc cc ) | 175 | ( cd ${DESTDIR}${GCC_PREFIX}/bin ; ${LN} -f gcc cc ) | |
175 | .if !empty(PKG_OPTIONS:Mgcc-java) | 176 | .if !empty(PKG_OPTIONS:Mgcc-java) | |
176 | ${RM} -f ${DESTDIR}${JAVA_HOME}/bin/javadoc | 177 | ${RM} -f ${DESTDIR}${JAVA_HOME}/bin/javadoc | |
177 | ${RM} -f ${DESTDIR}${JAVA_HOME}/jre/lib/${JAVA_ARCH}/libjawt.so | 178 | ${RM} -f ${DESTDIR}${JAVA_HOME}/jre/lib/${JAVA_ARCH}/libjawt.so | |
178 | .endif | 179 | .endif | |
179 | .if !empty(MACHINE_PLATFORM:MSunOS-*-*86*) && ${OS_VERSION} != "5.11" | 180 | .if !empty(MACHINE_PLATFORM:MSunOS-*-*86*) && ${OS_VERSION} != "5.11" | |
180 | ${SH} files/values.c ${DESTDIR}${GCC_PREFIX}/bin/gcc -m32 || ${TRUE} | 181 | ${SH} files/values.c ${DESTDIR}${GCC_PREFIX}/bin/gcc -m32 || ${TRUE} | |
181 | ${SH} files/values.c ${DESTDIR}${GCC_PREFIX}/bin/gcc -m64 || ${TRUE} | 182 | ${SH} files/values.c ${DESTDIR}${GCC_PREFIX}/bin/gcc -m64 || ${TRUE} | |
182 | .endif | 183 | .endif | |
183 | 184 | |||
184 | GENERATE_PLIST+= \ | 185 | GENERATE_PLIST+= \ | |
185 | cd ${DESTDIR}${PREFIX} && \ | 186 | cd ${DESTDIR}${PREFIX} && \ | |
186 | ${FIND} ${GCC_SUBPREFIX} \( -type f -o -type l \) -print | ${SORT} ; | 187 | ${FIND} ${GCC_SUBPREFIX} \( -type f -o -type l \) -print | ${SORT} ; | |
187 | 188 | |||
188 | .include "../../mk/dlopen.buildlink3.mk" | 189 | .include "../../mk/dlopen.buildlink3.mk" | |
189 | .include "../../mk/pthread.buildlink3.mk" | 190 | .include "../../mk/pthread.buildlink3.mk" | |
190 | .include "../../mk/bsd.pkg.mk" | 191 | .include "../../mk/bsd.pkg.mk" |
@@ -1,182 +1,183 @@ | @@ -1,182 +1,183 @@ | |||
1 | # $NetBSD: Makefile,v 1.6 2017/06/21 21:16:36 maya Exp $ | 1 | # $NetBSD: Makefile,v 1.7 2017/06/22 21:44:49 maya Exp $ | |
2 | 2 | |||
3 | GCC_PKGNAME= gcc7 | 3 | GCC_PKGNAME= gcc7 | |
4 | .include "version.mk" | 4 | .include "version.mk" | |
5 | 5 | |||
6 | DISTNAME= gcc-${GCC7S_DIST_VERSION} | 6 | DISTNAME= gcc-${GCC7S_DIST_VERSION} | |
7 | PKGNAME= ${GCC_PKGNAME}-${GCC7S_DIST_VERSION} | 7 | PKGNAME= ${GCC_PKGNAME}-${GCC7S_DIST_VERSION} | |
8 | ## When bumping the PKGREVISION of this package the PKGREVISION of | 8 | ## When bumping the PKGREVISION of this package the PKGREVISION of | |
9 | ## lang/gcc7-libs needs to be bump to be at least 1 more than the | 9 | ## lang/gcc7-libs needs to be bump to be at least 1 more than the | |
10 | ## PKGREVISION of this package! | 10 | ## PKGREVISION of this package! | |
11 | PKGREVISION= 3 | 11 | PKGREVISION= 3 | |
12 | CATEGORIES= lang | 12 | CATEGORIES= lang | |
13 | MASTER_SITES= ${MASTER_SITE_GNU:=gcc/gcc-${GCC7S_DIST_VERSION}/} | 13 | MASTER_SITES= ${MASTER_SITE_GNU:=gcc/gcc-${GCC7S_DIST_VERSION}/} | |
14 | EXTRACT_SUFX= .tar.bz2 | 14 | EXTRACT_SUFX= .tar.bz2 | |
15 | 15 | |||
16 | MAINTAINER= maya@NetBSD.org | 16 | MAINTAINER= maya@NetBSD.org | |
17 | HOMEPAGE= http://gcc.gnu.org/ | 17 | HOMEPAGE= http://gcc.gnu.org/ | |
18 | COMMENT= The GNU Compiler Collection (GCC) - 7.0 Release Series | 18 | COMMENT= The GNU Compiler Collection (GCC) - 7.0 Release Series | |
19 | LICENSE= gnu-gpl-v2 AND gnu-gpl-v3 AND gnu-lgpl-v2 AND gnu-lgpl-v3 | 19 | LICENSE= gnu-gpl-v2 AND gnu-gpl-v3 AND gnu-lgpl-v2 AND gnu-lgpl-v3 | |
20 | 20 | |||
21 | DISTFILES= ${DEFAULT_DISTFILES} | 21 | DISTFILES= ${DEFAULT_DISTFILES} | |
22 | EXTRACT_ONLY= ${DEFAULT_DISTFILES} | 22 | EXTRACT_ONLY= ${DEFAULT_DISTFILES} | |
23 | 23 | |||
24 | NOT_FOR_PLATFORM= Interix-*-* | 24 | NOT_FOR_PLATFORM= Interix-*-* | |
25 | 25 | |||
26 | USE_LANGUAGES= c c++ | 26 | USE_LANGUAGES= c c++ | |
27 | USE_TOOLS+= gmake makeinfo gsed tar:build | 27 | USE_TOOLS+= gmake makeinfo sed:run tar:build | |
28 | USE_TOOLS.NetBSD+= gsed | |||
28 | 29 | |||
29 | GNU_CONFIGURE= yes | 30 | GNU_CONFIGURE= yes | |
30 | ## Build outside ${WRKSRC} | 31 | ## Build outside ${WRKSRC} | |
31 | OBJDIR= ../build | 32 | OBJDIR= ../build | |
32 | CONFIGURE_DIRS= ${OBJDIR} | 33 | CONFIGURE_DIRS= ${OBJDIR} | |
33 | CONFIGURE_SCRIPT= ../${DISTNAME}/configure | 34 | CONFIGURE_SCRIPT= ../${DISTNAME}/configure | |
34 | GCC_SUBPREFIX= ${GCC_PKGNAME} | 35 | GCC_SUBPREFIX= ${GCC_PKGNAME} | |
35 | GCC_PREFIX= ${PREFIX}/${GCC_SUBPREFIX} | 36 | GCC_PREFIX= ${PREFIX}/${GCC_SUBPREFIX} | |
36 | GNU_CONFIGURE_PREFIX= ${GCC_PREFIX} | 37 | GNU_CONFIGURE_PREFIX= ${GCC_PREFIX} | |
37 | INFO_FILES= yes | 38 | INFO_FILES= yes | |
38 | CONFIGURE_ARGS+= --disable-libstdcxx-pch | 39 | CONFIGURE_ARGS+= --disable-libstdcxx-pch | |
39 | 40 | |||
40 | UNLIMIT_RESOURCES+= datasize | 41 | UNLIMIT_RESOURCES+= datasize | |
41 | UNLIMIT_RESOURCES+= stacksize | 42 | UNLIMIT_RESOURCES+= stacksize | |
42 | 43 | |||
43 | SUBST_CLASSES+= vars | 44 | SUBST_CLASSES+= vars | |
44 | SUBST_MESSAGE.vars= Setting target machine name path in ${SUBST_FILES.vars} | 45 | SUBST_MESSAGE.vars= Setting target machine name path in ${SUBST_FILES.vars} | |
45 | SUBST_STAGE.vars= pre-configure | 46 | SUBST_STAGE.vars= pre-configure | |
46 | SUBST_FILES.vars= gcc/Makefile.in | 47 | SUBST_FILES.vars= gcc/Makefile.in | |
47 | SUBST_VARS.vars= GCC_TARGET_MACHINE | 48 | SUBST_VARS.vars= GCC_TARGET_MACHINE | |
48 | 49 | |||
49 | .include "../../mk/bsd.prefs.mk" | 50 | .include "../../mk/bsd.prefs.mk" | |
50 | 51 | |||
51 | LANGS= c | 52 | LANGS= c | |
52 | 53 | |||
53 | # In some cases LINKER_RPATH_FLAG needs a trailing space. | 54 | # In some cases LINKER_RPATH_FLAG needs a trailing space. | |
54 | LINKER_RPATH_FLAG:= ${LINKER_RPATH_FLAG:S/-rpath/& /} | 55 | LINKER_RPATH_FLAG:= ${LINKER_RPATH_FLAG:S/-rpath/& /} | |
55 | 56 | |||
56 | ## The Library rpath to use in end programs. | 57 | ## The Library rpath to use in end programs. | |
57 | LDFLAGS_FOR_TARGET= ${LDFLAGS:M${COMPILER_RPATH_FLAG}*:N*/usr/lib*} | 58 | LDFLAGS_FOR_TARGET= ${LDFLAGS:M${COMPILER_RPATH_FLAG}*:N*/usr/lib*} | |
58 | 59 | |||
59 | # The "-static-libstdc++ -static-libgcc" flags are normally added to the | 60 | # The "-static-libstdc++ -static-libgcc" flags are normally added to the | |
60 | # boot-ldflags by configure but because we are supply the boot-ldflags | 61 | # boot-ldflags by configure but because we are supply the boot-ldflags | |
61 | # we mash supply them. | 62 | # we mash supply them. | |
62 | BOOT_LDFLAGS= -static-libstdc++ -static-libgcc ${LDFLAGS_FOR_TARGET} | 63 | BOOT_LDFLAGS= -static-libstdc++ -static-libgcc ${LDFLAGS_FOR_TARGET} | |
63 | # Needed on Darwin when LDFLAGS point to a SDK | 64 | # Needed on Darwin when LDFLAGS point to a SDK | |
64 | BOOT_LDFLAGS+= ${LDFLAGS:M-Wl,-syslibroot*} | 65 | BOOT_LDFLAGS+= ${LDFLAGS:M-Wl,-syslibroot*} | |
65 | # GCC does not understand this option; remove it, or stage build will fail | 66 | # GCC does not understand this option; remove it, or stage build will fail | |
66 | BUILDLINK_TRANSFORM+= rm:-stdlib=libc++ | 67 | BUILDLINK_TRANSFORM+= rm:-stdlib=libc++ | |
67 | 68 | |||
68 | .include "options.mk" | 69 | .include "options.mk" | |
69 | 70 | |||
70 | ## For graphite support. | 71 | ## For graphite support. | |
71 | .if !empty(PKG_OPTIONS:Mgcc-graphite) | 72 | .if !empty(PKG_OPTIONS:Mgcc-graphite) | |
72 | 73 | |||
73 | post-extract: | 74 | post-extract: | |
74 | ${TAR} -jxf ${DISTDIR}/${ISL16}.tar.bz2 -C ${WRKSRC} | 75 | ${TAR} -jxf ${DISTDIR}/${ISL16}.tar.bz2 -C ${WRKSRC} | |
75 | ${MV} ${WRKSRC}/${ISL16} ${WRKSRC}/isl | 76 | ${MV} ${WRKSRC}/${ISL16} ${WRKSRC}/isl | |
76 | .endif | 77 | .endif | |
77 | 78 | |||
78 | .if !empty(MACHINE_PLATFORM:MNetBSD-*-*) | 79 | .if !empty(MACHINE_PLATFORM:MNetBSD-*-*) | |
79 | # on NetBSD, use the native SSP code in libc | 80 | # on NetBSD, use the native SSP code in libc | |
80 | CONFIGURE_ARGS+= --disable-libssp | 81 | CONFIGURE_ARGS+= --disable-libssp | |
81 | .else | 82 | .else | |
82 | CONFIGURE_ARGS+= --enable-libssp | 83 | CONFIGURE_ARGS+= --enable-libssp | |
83 | .endif | 84 | .endif | |
84 | 85 | |||
85 | ## For target librarys and libjava programs. | 86 | ## For target librarys and libjava programs. | |
86 | CONFIGURE_ENV+= LDFLAGS_FOR_TARGET=${LDFLAGS_FOR_TARGET:Q} | 87 | CONFIGURE_ENV+= LDFLAGS_FOR_TARGET=${LDFLAGS_FOR_TARGET:Q} | |
87 | 88 | |||
88 | CONFIGURE_ARGS+= --enable-languages=${LANGS:Q} | 89 | CONFIGURE_ARGS+= --enable-languages=${LANGS:Q} | |
89 | CONFIGURE_ARGS+= --enable-shared | 90 | CONFIGURE_ARGS+= --enable-shared | |
90 | CONFIGURE_ARGS+= --enable-long-long | 91 | CONFIGURE_ARGS+= --enable-long-long | |
91 | CONFIGURE_ARGS+= --with-local-prefix=${GCC_PREFIX:Q} | 92 | CONFIGURE_ARGS+= --with-local-prefix=${GCC_PREFIX:Q} | |
92 | CONFIGURE_ARGS+= --enable-threads=posix | 93 | CONFIGURE_ARGS+= --enable-threads=posix | |
93 | CONFIGURE_ARGS+= --with-boot-ldflags=${BOOT_LDFLAGS:Q} | 94 | CONFIGURE_ARGS+= --with-boot-ldflags=${BOOT_LDFLAGS:Q} | |
94 | CONFIGURE_ARGS.NetBSD+= --with-gnu-ld --with-ld=/usr/bin/ld | 95 | CONFIGURE_ARGS.NetBSD+= --with-gnu-ld --with-ld=/usr/bin/ld | |
95 | CONFIGURE_ARGS.NetBSD+= --with-gnu-as --with-as=/usr/bin/as | 96 | CONFIGURE_ARGS.NetBSD+= --with-gnu-as --with-as=/usr/bin/as | |
96 | MAKE_ENV.NetBSD+= ac_cv_func_clock_gettime=yes | 97 | MAKE_ENV.NetBSD+= ac_cv_func_clock_gettime=yes | |
97 | MAKE_ENV.NetBSD+= ac_cv_func_gethostbyname_r=no | 98 | MAKE_ENV.NetBSD+= ac_cv_func_gethostbyname_r=no | |
98 | MAKE_ENV.NetBSD+= ac_cv_func_freelocale=no | 99 | MAKE_ENV.NetBSD+= ac_cv_func_freelocale=no | |
99 | MAKE_ENV.NetBSD+= ac_cv_func_newlocale=no | 100 | MAKE_ENV.NetBSD+= ac_cv_func_newlocale=no | |
100 | MAKE_ENV.NetBSD+= ac_cv_func_uselocale=no | 101 | MAKE_ENV.NetBSD+= ac_cv_func_uselocale=no | |
101 | 102 | |||
102 | CONFIGURE_ARGS.DragonFly+= --disable-bootstrap | 103 | CONFIGURE_ARGS.DragonFly+= --disable-bootstrap | |
103 | 104 | |||
104 | .if !empty(MACHINE_PLATFORM:MNetBSD-*-i386) || !empty(MACHINE_PLATFORM:MLinux-*-i386) | 105 | .if !empty(MACHINE_PLATFORM:MNetBSD-*-i386) || !empty(MACHINE_PLATFORM:MLinux-*-i386) | |
105 | CONFIGURE_ARGS+= --with-arch=i486 --with-tune=i486 | 106 | CONFIGURE_ARGS+= --with-arch=i486 --with-tune=i486 | |
106 | .endif | 107 | .endif | |
107 | 108 | |||
108 | .if !empty(MACHINE_PLATFORM:MNetBSD-*-x86_64) || !empty(MACHINE_PLATFORM:MLinux-*-x86_64) | 109 | .if !empty(MACHINE_PLATFORM:MNetBSD-*-x86_64) || !empty(MACHINE_PLATFORM:MLinux-*-x86_64) | |
109 | CONFIGURE_ARGS+= --with-arch=nocona --with-tune=nocona --with-fpmath=sse | 110 | CONFIGURE_ARGS+= --with-arch=nocona --with-tune=nocona --with-fpmath=sse | |
110 | .endif | 111 | .endif | |
111 | 112 | |||
112 | .if !empty(MACHINE_PLATFORM:MDarwin-[0-8].*-*) | 113 | .if !empty(MACHINE_PLATFORM:MDarwin-[0-8].*-*) | |
113 | CONFIGURE_ARGS+= --with-dwarf2 | 114 | CONFIGURE_ARGS+= --with-dwarf2 | |
114 | .endif | 115 | .endif | |
115 | 116 | |||
116 | 117 | |||
117 | # ${WRKSRC}/fixincludes/ looks for sed and compiles the path to sed into | 118 | # ${WRKSRC}/fixincludes/ looks for sed and compiles the path to sed into | |
118 | # a binary so we need to make sure we give it the installed sed and not | 119 | # a binary so we need to make sure we give it the installed sed and not | |
119 | # the tool wrapped one. | 120 | # the tool wrapped one. | |
120 | MAKE_ENV+= ac_cv_path_SED=${TOOLS_SED} | 121 | MAKE_ENV+= ac_cv_path_SED=${TOOLS_SED} | |
121 | MAKE_ENV+= lt_cv_path_SED=${TOOLS_SED} | 122 | MAKE_ENV+= lt_cv_path_SED=${TOOLS_SED} | |
122 | 123 | |||
123 | # Determine whether to use binutils | 124 | # Determine whether to use binutils | |
124 | .if ${OPSYS} == "SunOS" | 125 | .if ${OPSYS} == "SunOS" | |
125 | . if exists(/usr/sfw/bin/gobjdump) | 126 | . if exists(/usr/sfw/bin/gobjdump) | |
126 | CONFIGURE_ENV+= OBJDUMP=/usr/sfw/bin/gobjdump | 127 | CONFIGURE_ENV+= OBJDUMP=/usr/sfw/bin/gobjdump | |
127 | . endif | 128 | . endif | |
128 | . if exists(/usr/bin/ld) | 129 | . if exists(/usr/bin/ld) | |
129 | CONFIGURE_ARGS+= --without-gnu-ld --with-ld=/usr/bin/ld | 130 | CONFIGURE_ARGS+= --without-gnu-ld --with-ld=/usr/bin/ld | |
130 | . else | 131 | . else | |
131 | CONFIGURE_ARGS+= --without-gnu-ld --with-ld=/usr/ccs/bin/ld | 132 | CONFIGURE_ARGS+= --without-gnu-ld --with-ld=/usr/ccs/bin/ld | |
132 | . endif | 133 | . endif | |
133 | . if exists(/usr/sfw/bin/gas) | 134 | . if exists(/usr/sfw/bin/gas) | |
134 | CONFIGURE_ARGS+= --with-gnu-as --with-as=/usr/sfw/bin/gas | 135 | CONFIGURE_ARGS+= --with-gnu-as --with-as=/usr/sfw/bin/gas | |
135 | . elif exists(/usr/ccs/bin/as) | 136 | . elif exists(/usr/ccs/bin/as) | |
136 | CONFIGURE_ARGS+= --without-gnu-as --with-as=/usr/ccs/bin/as | 137 | CONFIGURE_ARGS+= --without-gnu-as --with-as=/usr/ccs/bin/as | |
137 | . else | 138 | . else | |
138 | BUILDLINK_DEPMETHOD.binutils= full | 139 | BUILDLINK_DEPMETHOD.binutils= full | |
139 | . include "../../devel/binutils/buildlink3.mk" | 140 | . include "../../devel/binutils/buildlink3.mk" | |
140 | CONFIGURE_ARGS+= --with-gnu-as --with-as=${PREFIX}/bin/gas | 141 | CONFIGURE_ARGS+= --with-gnu-as --with-as=${PREFIX}/bin/gas | |
141 | . endif | 142 | . endif | |
142 | .endif | 143 | .endif | |
143 | 144 | |||
144 | .if ${OS_VARIANT} == "SmartOS" | 145 | .if ${OS_VARIANT} == "SmartOS" | |
145 | SUBST_CLASSES+= ccs | 146 | SUBST_CLASSES+= ccs | |
146 | SUBST_STAGE.ccs= pre-configure | 147 | SUBST_STAGE.ccs= pre-configure | |
147 | SUBST_FILES.ccs= contrib/make_sunver.pl | 148 | SUBST_FILES.ccs= contrib/make_sunver.pl | |
148 | SUBST_SED.ccs= -e 's,/usr/ccs/bin,/usr/bin,g' | 149 | SUBST_SED.ccs= -e 's,/usr/ccs/bin,/usr/bin,g' | |
149 | .endif | 150 | .endif | |
150 | 151 | |||
151 | pre-configure: | 152 | pre-configure: | |
152 | ${RUN} cd ${WRKSRC} && ${MKDIR} ${OBJDIR} | 153 | ${RUN} cd ${WRKSRC} && ${MKDIR} ${OBJDIR} | |
153 | 154 | |||
154 | TEST_TARGET= -k check || ${TRUE} | 155 | TEST_TARGET= -k check || ${TRUE} | |
155 | pre-test: | 156 | pre-test: | |
156 | ${RUN} \ | 157 | ${RUN} \ | |
157 | if runtest --version >/dev/null 2>/dev/null ; then \ | 158 | if runtest --version >/dev/null 2>/dev/null ; then \ | |
158 | : ; \ | 159 | : ; \ | |
159 | else \ | 160 | else \ | |
160 | ${ECHO} "ERROR: Please install devel/dejagnu in order to run the test suite." ; \ | 161 | ${ECHO} "ERROR: Please install devel/dejagnu in order to run the test suite." ; \ | |
161 | exit 1 ; \ | 162 | exit 1 ; \ | |
162 | fi | 163 | fi | |
163 | post-test: | 164 | post-test: | |
164 | ${RUN} cd ${WRKSRC} && cd ${OBJDIR} && \ | 165 | ${RUN} cd ${WRKSRC} && cd ${OBJDIR} && \ | |
165 | ${SHELL} ${WRKSRC}/contrib/test_summary >${WRKDIR}/test_summary.log | 166 | ${SHELL} ${WRKSRC}/contrib/test_summary >${WRKDIR}/test_summary.log | |
166 | ${INFO_MSG} "Test summary are available in ${WRKDIR}/test_summary.log" | 167 | ${INFO_MSG} "Test summary are available in ${WRKDIR}/test_summary.log" | |
167 | 168 | |||
168 | post-install: | 169 | post-install: | |
169 | ${TEST} -f ${DESTDIR}${GCC_PREFIX}/bin/cc || \ | 170 | ${TEST} -f ${DESTDIR}${GCC_PREFIX}/bin/cc || \ | |
170 | ( cd ${DESTDIR}${GCC_PREFIX}/bin ; ${LN} -f gcc cc ) | 171 | ( cd ${DESTDIR}${GCC_PREFIX}/bin ; ${LN} -f gcc cc ) | |
171 | .if !empty(MACHINE_PLATFORM:MSunOS-*-*86*) && ${OS_VERSION} != "5.11" | 172 | .if !empty(MACHINE_PLATFORM:MSunOS-*-*86*) && ${OS_VERSION} != "5.11" | |
172 | ${SH} files/values.c ${DESTDIR}${GCC_PREFIX}/bin/gcc -m32 || ${TRUE} | 173 | ${SH} files/values.c ${DESTDIR}${GCC_PREFIX}/bin/gcc -m32 || ${TRUE} | |
173 | ${SH} files/values.c ${DESTDIR}${GCC_PREFIX}/bin/gcc -m64 || ${TRUE} | 174 | ${SH} files/values.c ${DESTDIR}${GCC_PREFIX}/bin/gcc -m64 || ${TRUE} | |
174 | .endif | 175 | .endif | |
175 | 176 | |||
176 | GENERATE_PLIST+= \ | 177 | GENERATE_PLIST+= \ | |
177 | cd ${DESTDIR}${PREFIX} && \ | 178 | cd ${DESTDIR}${PREFIX} && \ | |
178 | ${FIND} ${GCC_SUBPREFIX} \( -type f -o -type l \) -print | ${SORT} ; | 179 | ${FIND} ${GCC_SUBPREFIX} \( -type f -o -type l \) -print | ${SORT} ; | |
179 | 180 | |||
180 | .include "../../mk/dlopen.buildlink3.mk" | 181 | .include "../../mk/dlopen.buildlink3.mk" | |
181 | .include "../../mk/pthread.buildlink3.mk" | 182 | .include "../../mk/pthread.buildlink3.mk" | |
182 | .include "../../mk/bsd.pkg.mk" | 183 | .include "../../mk/bsd.pkg.mk" |