Subject: pkg/17553: graphics/gdk-pixbuf does not build on 1.6_BETA4 for m68k
To: None <gnats-bugs@gnats.netbsd.org>
From: Klaus Heinz <k.heinz.jul.zwei@onlinehome.de>
List: netbsd-bugs
Date: 07/11/2002 03:36:24
>Number:         17553
>Category:       pkg
>Synopsis:       graphics/gdk-pixbuf does not build on 1.6_BETA4 for m68k
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jul 10 18:37:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Klaus Heinz
>Release:        NetBSD 1.6_BETA4
>Organization:
none
>Environment:
System: NetBSD rainbow.homedns.org 1.6_BETA4 NetBSD 1.6_BETA4 (GENERIC) #0:
Tue Jul 9 04:02:40 UTC 2002 autobuild@tgm.daemon.org:/autobuild/amiga/OBJ/
autobuild/src/sys/arch/amiga/compile/GENERIC amiga
Architecture: m68k
Machine: amiga
Amiga 3000 (68060 rev.1 CPU/MMU/FPU)
>Description:
	There's an optimization bug in gcc for m68k (see PR toolchain/17550)
	which prevents graphics/gdk-pixbuf from building.
	I have only tested this on NetBSD/amiga 1.6_BETA4 but I suppose it's
	a general problem for 1.6* on m68k.
	Reducing the optimization level from '-O2' to '-O' is a usable
	workaround.
>How-To-Repeat:
	On NetBSD/amiga 1.6_BETA4 go to /usr/pkgsrc/graphics/gdk-pixbuf and
	type 'make'. See how it fails to compile the file pixops.c.
>Fix:
	Apply the following patch to graphics/gdk-pixbuf/Makefile. It
	changes the optimization level from '-O2' to '-O' in the affected
	Makefile (in post-configure).

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	./gdk-pixbuf.diff
#
echo x - ./gdk-pixbuf.diff
sed 's/^X//' >./gdk-pixbuf.diff << 'END-of-./gdk-pixbuf.diff'
X+++ Makefile	Thu Jul 11 02:56:07 2002
X@@ -8,6 +8,8 @@
X 
X .include "Makefile.common"
X 
X+.include "../../mk/bsd.prefs.mk"
X+
X post-patch:
X 	${SED} -e 's/BUILD_CANVAS=yes/BUILD_CANVAS=no/g' \
X 	  ${WRKSRC}/configure.in >${WRKSRC}/.tmp && \
X@@ -16,6 +18,14 @@
X post-configure:
X 	${SED} -e 's/ doc$$//' ${WRKSRC}/Makefile >${WRKSRC}/.tmp && \
X 	${MV} ${WRKSRC}/.tmp ${WRKSRC}/Makefile
X+	#
X+	# works around optimization bug, see PR toolchain/17550	
X+	#
X+.if (${MACHINE_PLATFORM:MNetBSD-1.6*-m68k} != "")
X+	( cd ${WRKSRC}/gdk-pixbuf/pixops &&	 			    \
X+	   ${SED} -e 's@^\(CFLAGS.*-O\)2@\1@g' < Makefile > Makefile.fixed && \
X+	   ${MV} Makefile.fixed Makefile )
X+.endif
X 
X post-install:
X 	${TEST} ${PREFIX} = ${LOCALBASE} || \
END-of-./gdk-pixbuf.diff
exit

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