ports/52347: fix build of emulators/bochs with CPU_LEVEL=4

Giorgos Keramidas keramida at FreeBSD.org
Fri May 16 22:00:34 UTC 2003


>Number:         52347
>Category:       ports
>Synopsis:       fix build of emulators/bochs with CPU_LEVEL=4
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri May 16 15:00:31 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Giorgos Keramidas
>Release:        FreeBSD 5.1-BETA i386
>Organization:
>Environment:
System: FreeBSD gothmog.gr 5.1-BETA FreeBSD 5.1-BETA #1: \
Thu May 15 14:02:10 EEST 2003 sysop at gothmog.gr:\
/usr/obj/usr/src/sys/CELERON i386

>Description:

	Building bochs with processor level < 5 fails because mmx
	instructions need to be disabled at configure time for such
	builds.  The third chunk of the attached patch fixes this error:

../config.h:719:2: #error With CPU level < 5, you must disable MMX support.
gmake[1]: *** [devices.o] Error 1
gmake[1]: Leaving directory `/usr/ports/emulators/bochs/work/bochs-2.0.2/iodev'
gmake: *** [iodev/libiodev.a] Error 2
*** Error code 2

	I've also added a few more WITH_XXX knobs to enable some of the
	features of bochs to my local copy.  WITH_BOCHS_TERM enables the
	terminal interface of bochs, WITH_BOCHS_VESA enables VESA BIOS
	extensions and WITH_BOCHS_READLINE enables readline support.

>How-To-Repeat:
>Fix:

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/emulators/bochs/Makefile,v
retrieving revision 1.55
diff -u -r1.55 Makefile
--- Makefile	14 Apr 2003 01:52:50 -0000	1.55
+++ Makefile	16 May 2003 19:34:40 -0000
@@ -27,7 +27,7 @@
 GNU_CONFIGURE=	yes
 CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
 CONFIGURE_ARGS=	--disable-split-hd \
-		--enable-all-optimizations
+		--enable-all-optimizations --with-x11
 
 CFLAGS+=	-fno-rtti -fno-exceptions -fomit-frame-pointer
 
@@ -36,6 +36,18 @@
 
 .include <bsd.port.pre.mk>
 
+.if defined(WITH_BOCHS_TERM)
+CONFIGURE_ARGS+=	--with-term
+.endif
+
+.if defined(WITH_BOCHS_VESA)
+CONFIGURE_ARGS+=	--enable-vbe
+.endif
+
+.if defined(WITH_BOCHS_READLINE)
+CONFIGURE_ARGS+=	--enable-readline
+.endif
+
 .if ${XFREE86_VERSION} == 4
 BUILD_DEPENDS+=	mkfontdir:${PORTSDIR}/x11/XFree86-4-clients
 RUN_DEPENDS+=	mkfontdir:${PORTSDIR}/x11/XFree86-4-clients
@@ -53,6 +65,9 @@
 .if ${WITH_BOCHS_CPU_LEVEL} < 3 || ${WITH_BOCHS_CPU_LEVEL} > 6
 .error "WITH_BOCHS_CPU_LEVEL must be an integer value between 3 and 6."
 .endif
+.if ${WITH_BOCHS_CPU_LEVEL} < 5
+CONFIGURE_ARGS+=	--disable-mmx
+.endif
 CONFIGURE_ARGS+=	--enable-cpu-level=${WITH_BOCHS_CPU_LEVEL}
 .endif
 
@@ -93,7 +108,8 @@
 pre-everything::
 .if !defined(WITH_BOCHS_CPU_LEVEL) || !defined(WITH_BOCHS_PROCESSORS) || \
     !defined(WITH_BOCHS_DEBUGGER) || !defined(WITH_BOCHS_X86_DEBUGGER) || \
-    !defined(WITH_SOUND)
+    !defined(WITH_SOUND) || !defined(WITH_BOCHS_TERM) || \
+    !defined(WITH_BOCHS_VESA) || !defined(WITH_BOCHS_READLINE)
 	@${ECHO_MSG}
 .if !defined(WITH_BOCHS_CPU_LEVEL)
 	@${ECHO_MSG} "If you want to change the processor level to emulate (default is 5, aka Pentium)"
@@ -129,6 +145,21 @@
 .if !defined(WITH_SOUND)
 	@${ECHO_MSG} "If you want to compile with sound (blaster 16) support."
 	@${ECHO_MSG} "hit Ctrl-C right now and use \"make WITH_SOUND=yes\""
+	@${ECHO_MSG}
+.endif
+.if !defined(WITH_BOCHS_TERM)
+	@${ECHO_MSG} "If you want to enable the plain text, console-based bochs interface"
+	@${ECHO_MSG} "hit Ctrl-C right now and use \"make WITH_BOCHS_GUI_TERM=yes\""
+	@${ECHO_MSG}
+.endif
+.if !defined(WITH_BOCHS_VESA)
+	@${ECHO_MSG} "If you want to enable the VESA BIOS video extensions of bochs,"
+	@${ECHO_MSG} "hit Ctrl-C right now and use \"make WITH_BOCHS_VESA=yes\""
+	@${ECHO_MSG}
+.endif
+.if !defined(WITH_BOCHS_READLINE)
+	@${ECHO_MSG} "If you want to enable readline support in the bochs command lines,"
+	@${ECHO_MSG} "hit Ctrl-C right now and use \"make WITH_BOCHS_READLINE=yes\""
 .endif
 	@${ECHO_MSG}
 .endif


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list