blob: 3bb7cfe9f0e0979b9f9d47928ba6c17e734a76e2 (
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
# $NetBSD: Makefile,v 1.37 2002/03/14 20:44:21 tron Exp $
# Make sure that the version number in "Makefile.gcc" matches this.
DISTNAME= gcc-2.95.3
CATEGORIES= lang
MASTER_SITES= ${MASTER_SITE_GNU:=gcc/}
MAINTAINER= packages@netbsd.org
HOMEPAGE= http://www.gnu.org/software/gcc/gcc.html
COMMENT= GNU Compiler Collection
BUILD_DEPENDS+= bison-[0-9]*:../../devel/bison
# The platforms listed below are the only tested platforms so far.
# If you get gcc working on other platforms, then please add them.
ONLY_FOR_PLATFORM= NetBSD-*-i386 SunOS-*-*
USE_GMAKE= YES
HAS_CONFIGURE= YES
CONFIGURE_ARGS= --host=${MACHINE_GNU_PLATFORM} \
--prefix=${GCC_PREFIX} \
--enable-shared
CONFIGURE_SCRIPT= ${SRCDIR}/configure
INFO_FILES= chill.info cpp.info g77.info gcc.info
PLIST_SUBST+= GCC_VERSION=${PKGVERSION}
SRCDIR= ${WRKDIR}/${DISTNAME}
WRKSRC= ${WRKDIR}/objdir
.include "../../mk/bsd.prefs.mk"
.if (${OPSYS} != SunOS)
CONFIGURE_ARGS+= --with-gnu-as --with-gnu-ld --infodir=${PREFIX}/info
GCC_PREFIX= ${LOCALBASE}/${PKGNAME}
.if ${MACHINE_PLATFORM:MNetBSD-*-sparc}
PLIST_SRC= ${PKGDIR}/PLIST.NetBSD-sparc
PLIST_SRC+= ${PKGDIR}/PLIST
.endif
.else
.if (${CC} != gcc)
ALL_TARGET= bootstrap
.endif
GCC_PREFIX= ${LOCALBASE}
PLIST_SRC= ${PKGDIR}/PLIST.SunOS
MESSAGE= ${PKGDIR}/MESSAGE.SunOS
CONFLICTS+= gcc-[0-9]* pgcc-[0-9]*
.endif
post-extract:
${MKDIR} ${WRKSRC}
cd ${WRKSRC}/../${DISTNAME}/gcc/config; \
${CP} ${FILESDIR}/xm-netbsd.h .; \
for ARCH in arm arm i386 m68k sh sparc vax; do \
${MKDIR} $${ARCH}; \
${CP} ${FILESDIR}/$${ARCH}_netbsd-elf.h $${ARCH}/netbsd-elf.h; \
done; \
${CP} ${FILESDIR}/sparc_netbsd-elf-common.h sparc/netbsd-elf-common.h
post-patch:
${ECHO} "bogus" >${WRKSRC}/../${DISTNAME}/gcc/cstamp-h.in
.if (${OPSYS} != SunOS)
post-build:
for FILE in ${FILESDIR}/gcc.mk; do \
${SED} -e 's#@@MAKE@@#${MAKE}#g' \
-e 's#@@PKGNAME@@#${PKGNAME}#g' \
-e 's#@@PREFIX@@#${PREFIX}#g' \
<$$FILE >${WRKDIR}/`basename $$FILE`; \
done
.endif
pre-install:
${SETENV} PKG_PREFIX="${PREFIX}" ${SH} ${INSTALL_FILE} any PRE-INSTALL
.if (${OPSYS} != SunOS)
post-install:
${RM} -f ${GCC_PREFIX}/lib/gcc-lib/${MACHINE_GNU_PLATFORM}/${PKGVERSION}/include/curses.h ${PREFIX}/${PKGNAME}/bin/cc
${LN} -s gcc ${PREFIX}/${PKGNAME}/bin/cc
${INSTALL_DATA} ${WRKDIR}/gcc.mk ${PREFIX}/etc/${PKGNAME}.mk
.else
# remove empy file and directories that show up when one
# does make install; make deinstall; make install
post-install:
-cd ${GCC_PREFIX}/lib/gcc-lib/${MACHINE_GNU_PLATFORM}/${PKGVERSION}/include && \
${RM} -f fixed && \
${RMDIR} v7 v9
.endif
.include "../../mk/texinfo.mk"
.include "../../mk/bsd.pkg.mk"
# Make bootstrap with compiler != gcc possible.
LDFLAGS= ${STRIPFLAG}
|