Skip site navigation (1)Skip section navigation (2)
Date:      31 Dec 2002 03:51:50 -0000
From:      Keith Jones <freebsd.dev@blueyonder.co.uk>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/46644: upgrade emulators/uae to GCC 3.2.1
Message-ID:  <20021231035150.21422.qmail@athlon.home>

next in thread | raw e-mail | index | archive | help

>Number:         46644
>Category:       ports
>Synopsis:       upgrade emulators/uae to GCC 3.2.1
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 30 20:00:09 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Keith Jones
>Release:        FreeBSD 5.0-RC2 i386
>Organization:
testers 'r' us
>Environment:
System: FreeBSD athlon.home 5.0-RC2 FreeBSD 5.0-RC2 #0: Wed Dec 18 13:43:24 GMT 2002 root@hollin.btc.adaptec.com:/usr/obj/usr/src/sys/GENERIC i386
>Description:
	Fix UAE so that it will build under GCC 3.2.1. This is desirable
	as we don't really want to force users to download and install
	another compiler just to install a relatively small port.

	Currently it won't, because the build process attempts to do some
	voodoo on the CPU emulation code between compilation and assembly
	in order to optimize it. AFAICT the optimization code makes a
	number of naive assumptions about the generated assembly which
	don't hold true anymore. The assembly GCC 3.2.1 generates causes
	this process to abort and dump core, halting the build process.
>How-To-Repeat:
	# cd /usr/ports/emulators/uae
	# vi Makefile
	/USE_GCC
	dd:wq		( to remove the "USE_GCC" line )
	# make
>Fix:
	Being of the firm belief that the compiler knows what it's doing
	(and being unable to tell the difference between the unpatched
	port under FreeBSD 4.x and my patches under -CURRENT), I think
	that removing the offending black magic is an acceptable fix:

[New file 'patch-ab']
--- src/Makefile.in.orig	Mon Nov 19 12:34:18 2001
+++ src/Makefile.in	Tue Dec 31 03:12:40 2002
@@ -121,9 +121,7 @@
 cputbl.h: cpuemu.c
 
 cpufast.s: cpuemu.c tools/cpuopti
-	$(CC) $(INCLUDES) -S $(INCDIRS) $(CFLAGS) $(X_CFLAGS) $(DEBUGFLAGS) $(NO_SCHED_CFLAGS) $< -o cputmp.s
-	./tools/cpuopti <cputmp.s >$@
-	rm cputmp.s
+	$(CC) $(INCLUDES) -S $(INCDIRS) $(CFLAGS) $(X_CFLAGS) $(DEBUGFLAGS) $(NO_SCHED_CFLAGS) $< -o $@
 
 console_missing.o: missing.c
 	$(CC) $(INCLUDES) -c $(INCDIRS) $(CFLAGS) $(X_CFLAGS) $(DEBUGFLAGS) $(CFLAGS_$@) $< -o $@
[End of file 'patch-ab']

	Then we can happily remove the dependency on GCC 2.95 from the
	port's own Makefile:

--- Makefile.orig	Sun Nov 24 20:42:03 2002
+++ Makefile	Tue Dec 31 03:25:33 2002
@@ -19,7 +19,6 @@
 USE_GNOMENG=	yes
 USE_GNOME=	gtk12
 USE_REINPLACE=	yes
-USE_GCC=	2.95
 
 CFLAGS+=	${PTHREAD_CFLAGS}
 
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021231035150.21422.qmail>