summaryrefslogtreecommitdiff
path: root/lang/gcc3-java/Makefile
blob: d1bce1e0525b00a95f2f8f97ffbf86d42b31aaf5 (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
# $NetBSD: Makefile,v 1.7 2003/08/11 14:16:05 drochner Exp $
#

PKGNAME=		gcc3${GCC3_PKGMODIF}-java-${GCC_VERSION}
COMMENT=		GNU Compiler Collection, version 3, Java compiler

INFO_FILES=		gcj.info

.include "../../lang/gcc3-c/buildaddon.mk"

BUILD_DEPENDS+=		gcc3${GCC3_PKGMODIF}-c++-3.3.1:../../lang/gcc3-c++
CONFIGURE_ARGS+=	--enable-languages="java"
CONFIGURE_ARGS+=	--with-system-zlib
# done manually in do-build
#UNLIMIT_RESOURCES=	datasize

do-build:
	(cd ${WRKSRC}/gcc && ${GMAKE} java)
	(${ULIMIT_CMD_datasize}; cd ${WRKSRC} && ${GMAKE} all-target-libjava)

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/gcc/jc1 ${GCC_ARCHDIR}
	${INSTALL_PROGRAM} ${WRKSRC}/gcc/gcj ${GCC_ARCHDIR}
	${INSTALL_PROGRAM} ${WRKSRC}/gcc/jvgenmain ${GCC_ARCHDIR}
	${INSTALL_PROGRAM} ${WRKSRC}/gcc/gcjh ${GCC_ARCHDIR}
	(cd ${WRKSRC}/gcc && ${SETENV} ${MAKE_ENV} ${GMAKE} \
		java.install-common java.install-info)
	(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} \
		install-target-libjava)

.include "../../devel/zlib/buildlink2.mk"
.include "../../mk/bsd.pkg.mk"

# On NetBSD, the gcc-2.95.3 for:
#
#     alpha
#
# have an optimization bug when compiling with -O2 that is tickled by:
#
#   java/parse.o
#
# note that we don't override CFLAGS and CPPFLAGS because we want the
# crosscompiled compiler to be build with optimization.  This only
# disables optimization for the stage 1 build.
#
.if ${OPSYS} == "NetBSD"
.  if ${MACHINE_ARCH} == "alpha"
CONFIG_CFLAGS=	${CFLAGS:C/-O[0-9]*//g}
CONFIG_CPPFLAGS=	${CPPFLAGS:C/-O[0-9]*//g}
CONFIGURE_ENV+=	CFLAGS="${CONFIG_CFLAGS}" CPPFLAGS="${CONFIG_CPPFLAGS}"
.  endif
.endif