ports/123409: [Patch] ports:multimedia/ffmpeg fix WITH_OPTIMIZED_CFLAGS problem if build with gcc 4.2
Tatsuki Makino
tatsuki_makino at hotmail.com
Sun May 4 23:50:01 UTC 2008
>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 at 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:
More information about the freebsd-ports-bugs
mailing list