summaryrefslogtreecommitdiff
path: root/emulators/qemu-riscv/Makefile
blob: b47052b526a1d6e0252e0e5804ec034596e0caa4 (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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
DPB_PROPERTIES=	parallel

COMMENT=	multi system emulator

VERSION=	2.12.1
PKGNAME=	qemu-riscv-${VERSION}
DISTNAME=	qemu-${VERSION}
REVISION=	0
CATEGORIES=	emulators
MASTER_SITES=	https://download.qemu.org/
EXTRACT_SUFX=	.tar.xz

HOMEPAGE=	https://www.qemu.org/

MAINTAINER=	Brad Smith <brad@comstyle.com>

# GPLv2, LGPLv2 and BSD
PERMIT_PACKAGE=	Yes

WANTLIB=	c pthread fdt m util

DEBUG_PACKAGES=	${BUILD_PACKAGES}

# Using TLS emulation layer
COMPILER=	base-clang ports-gcc

LIB_DEPENDS= 	devel/dtc

MAKE_ENV=	V=1
FAKE_FLAGS=	qemu_confdir=${PREFIX}/share/examples/qemu

CFLAGS+=	-I${LOCALBASE}/include -I${X11BASE}/include
LDFLAGS+=	-L${LOCALBASE}/lib -L${X11BASE}/lib

# until the system headers are fixed properly.
CFLAGS+=	-Wno-redundant-decls

MODULES=	lang/python
MODPY_RUN_DEPENDS=	No

SEPARATE_BUILD=	Yes
USE_GMAKE=	Yes
CONFIGURE_STYLE=simple
CONFIGURE_ENV+=	LDFLAGS="${LDFLAGS}"
CONFIGURE_ARGS=	--localstatedir=${LOCALSTATEDIR} \
		--prefix=${PREFIX} \
		--sysconfdir=${SYSCONFDIR} \
		--mandir=${PREFIX}/man \
		--cc="${CC}" \
		--cxx=/dev/null \
		--host-cc="${CC}" \
		--target-list=riscv32-softmmu,riscv64-softmmu \
		--audio-drv-list= \
		--disable-user \
		--disable-linux-user \
		--disable-bsd-user \
		--disable-docs \
		--disable-guest-agent \
		--disable-modules \
		--disable-gnutls \
		--disable-nettle \
		--disable-gcrypt \
		--disable-sdl \
		--disable-gtk \
		--disable-vte \
		--disable-vnc \
		--disable-virtfs \
		--disable-mpath \
		--disable-xen \
		--disable-brlapi \
		--disable-curl \
		--disable-bluez \
		--disable-rdma \
		--disable-vde \
		--disable-netmap \
		--disable-cap-ng \
		--disable-attr \
		--disable-vhost-net \
		--disable-vhost-crypto \
		--disable-spice \
		--disable-rbd \
		--disable-libiscsi \
		--disable-libnfs \
		--disable-smartcard \
		--disable-libusb \
		--disable-live-block-migration \
		--disable-usb-redir \
		--disable-lzo \
		--disable-snappy \
		--disable-bzip2 \
		--disable-glusterfs \
		--disable-tpm \
		--disable-libssh2 \
		--disable-numa \
		--disable-libxml2 \
		--disable-replication \
		--disable-vhost-vsock \
		--disable-opengl \
		--disable-virglrenderer \
		--disable-xfsctl \
		--disable-qom-cast-debug \
		--disable-vxhs \
		--disable-crypto-afalg \
		--disable-vhost-user \
		--disable-capstone

FLAVORS=	debug
FLAVOR?=

.if ${FLAVOR:Mdebug}
CFLAGS+=	-O0
CONFIGURE_ARGS+=--enable-debug
INSTALL_STRIP=
.else
CONFIGURE_ARGS+=--disable-debug-info
.endif

TEST_TARGET=	check

# XXX Optimizer bug, using -O2 causes segfaults, -O1 linking errors
.if ${MACHINE_ARCH:Mpowerpc}
CFLAGS+=	-O0
.endif

.include <bsd.port.arch.mk>

post-install:
	${INSTALL_DATA_DIR} ${PREFIX}/share/examples/qemu

.include <bsd.port.mk>