From nobody@FreeBSD.org  Sun May  4 23:49:02 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 496141065671
	for <freebsd-gnats-submit@FreeBSD.org>; Sun,  4 May 2008 23:49:01 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 96BA28FC15
	for <freebsd-gnats-submit@FreeBSD.org>; Sun,  4 May 2008 23:49:01 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m44NmCT8002798
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 4 May 2008 23:48:13 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m44NmCNu002797;
	Sun, 4 May 2008 23:48:12 GMT
	(envelope-from nobody)
Message-Id: <200805042348.m44NmCNu002797@www.freebsd.org>
Date: Sun, 4 May 2008 23:48:12 GMT
From: Tatsuki Makino <tatsuki_makino@hotmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [Patch] ports:multimedia/ffmpeg fix WITH_OPTIMIZED_CFLAGS problem if build with gcc 4.2
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         123409
>Category:       ports
>Synopsis:       [Patch] ports:multimedia/ffmpeg fix WITH_OPTIMIZED_CFLAGS problem if build with gcc 4.2
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-multimedia
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun May 04 23:50:00 UTC 2008
>Closed-Date:    Fri Sep 05 15:20:57 UTC 2008
>Last-Modified:  Fri Sep 05 15:20:57 UTC 2008
>Originator:     Tatsuki Makino
>Release:        FreeBSD 6.3-STABLE i386
>Organization:
>Environment:
FreeBSD FreeBSD-C2D.DHCP.test 6.3-STABLE FreeBSD 6.3-STABLE #0: Fri May  2 10:51:44 JST 2008     root@FreeBSD-C2D.DHCP.test:/usr/obj/usr/src/sys/SMP  i386
>Description:
ffmpeg compiled with gcc 4.2 and -ffast-math optimization fails parsing options.
>How-To-Repeat:
Please read this:
http://lists.mplayerhq.hu/pipermail/ffmpeg-user/2007-September/011492.html
>Fix:
ffmpeg has code as `double d; if (isnan(d)) { }'
If enable -ffinite-math-only included -ffast-math, isnan() is always returned false.

References:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25975

Patch attached with submission follows:

diff -u -r -N ../ffmpeg.orig/Makefile ./Makefile
--- ../ffmpeg.orig/Makefile	2008-04-27 10:22:56.000000000 +0000
+++ ./Makefile	2008-05-04 23:16:29.000000000 +0000
@@ -84,7 +84,7 @@
 .endif
 
 .ifdef(WITH_OPTIMIZED_CFLAGS)
-CFLAGS:=		${CFLAGS:N-O*} -O3 -ffast-math -fomit-frame-pointer
+CFLAGS:=		${CFLAGS:N-O*} -O3 -ffast-math -fno-finite-math-only -fomit-frame-pointer
 .else
 CFLAGS:=		${CFLAGS:N-O0} -O2
 DEBUG_FLAGS+=		 -O2


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->freebsd-multimedia 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sun May 4 23:50:05 UTC 2008 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=123409 
State-Changed-From-To: open->closed 
State-Changed-By: pav 
State-Changed-When: Fri Sep 5 15:20:14 UTC 2008 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=123409 
>Unformatted:
