Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 May 2008 23:48:12 GMT
From:      Tatsuki Makino <tatsuki_makino@hotmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/123409: [Patch] ports:multimedia/ffmpeg fix WITH_OPTIMIZED_CFLAGS problem if build with gcc 4.2
Message-ID:  <200805042348.m44NmCNu002797@www.freebsd.org>
Resent-Message-ID: <200805042350.m44No0J5083518@freefall.freebsd.org>

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

>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-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun May 04 23:50:00 UTC 2008
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:



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