blob: f528cde47b844c5d271d0fc793a760b808a2fc05 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
# $NetBSD: Makefile.common,v 1.10 2004/02/06 01:42:29 jlam Exp $
GCC_VERSION= 3.3.2
DISTNAME= gcc-${GCC_VERSION}
CATEGORIES= lang
MASTER_SITES= ${MASTER_SITE_GNU:=gcc/gcc-${GCC_VERSION}/}
EXTRACT_SUFX= .tar.bz2
MAINTAINER= tech-pkg@NetBSD.org
HOMEPAGE= http://www.gnu.org/software/gcc/gcc.html
NOT_FOR_PLATFORM= Darwin-*-*
USE_BUILDLINK3= yes
USE_PKGINSTALL= yes
USE_GNU_TOOLS+= make
HAS_CONFIGURE= yes
.include "../../mk/bsd.prefs.mk"
# Make location overridable, to allow ping-pong bootstraps.
GCC3_DEFAULT_SUBPREFIX= gcc3
GCC3_INSTALLTO_SUBPREFIX?= ${GCC3_DEFAULT_SUBPREFIX}
.if ${GCC3_INSTALLTO_SUBPREFIX} != ${GCC3_DEFAULT_SUBPREFIX}
GCC3_PKGMODIF= _${GCC3_INSTALLTO_SUBPREFIX}
.endif
GCC_SUBPREFIX= ${GCC3_INSTALLTO_SUBPREFIX}
GCC_PREFIX= ${PREFIX}/${GCC_SUBPREFIX}
CONFIGURE_ARGS+= --prefix=${GCC_PREFIX}
PLIST_SUBST+= GCC_SUBPREFIX=${GCC_SUBPREFIX}
FILES_SUBST+= GCC_PREFIX=${GCC_PREFIX}
FILES_SUBST+= PKGNAME=${PKGNAME}
MESSAGE_SUBST+= GCC_PREFIX=${GCC_PREFIX}
.if defined(INFO_FILES)
INFO_DIR= ${GCC_SUBPREFIX}/info
.endif
# Support threads and building of crt*.o on post-1.6 -current.
# Use buildlink to avoid a GNU pth package.
.if ${OPSYS} == "NetBSD" && exists(/usr/include/pthread.h)
GCC_PLATFORM= ${MACHINE_GNU_ARCH}--netbsdelf2.0
PTHREAD_OPTS+= require native
. include "../../mk/pthread.buildlink3.mk"
.else
GCC_PLATFORM= ${MACHINE_GNU_PLATFORM}
.endif
CONFIGURE_ARGS+= --host=${GCC_PLATFORM}
PLIST_SUBST+= GCC_PLATFORM=${GCC_PLATFORM}
.if ${OPSYS} == "NetBSD" && !defined(USE_BINUTILS)
AS_VERSION!= ${AS} --version | ${AWK} '{ \
split($$3, v, /[.]/); \
printf "%02d%02d%02d%02d\n",v[1],v[2],v[3],v[4]; \
exit; \
}'
USE_BINUTILS!= ${TEST} ${AS_VERSION} -lt 02130201 && echo YES || echo NO
.endif
.if defined(USE_BINUTILS) && !empty(USE_BINUTILS:M[yY][eE][sS])
DEPENDS+= binutils>=2.13.2.1:../../devel/binutils
CONFIGURE_ARGS+= --with-as=${PREFIX}/${MACHINE_GNU_PLATFORM}/bin/as
.endif
.if ${OPSYS} == "NetBSD" || ${OPSYS} == "Linux" || ${OPSYS} == "SunOS"
CONFIGURE_ARGS+= --enable-shared
.else
CONFIGURE_ARGS+= --disable-shared
.endif
GCC_ARCHSUBDIR= ${GCC_SUBPREFIX}/lib/gcc-lib/${GCC_PLATFORM}/${GCC_VERSION}
GCC_ARCHDIR= ${PREFIX}/${GCC_ARCHSUBDIR}
pre-configure:
${MKDIR} ${BUILD_DIRS}
cd ${WRKSRC} && contrib/gcc_update --touch
|