ports/158191: [patch] audio/mpg123: disable vendor cflags
Pan Tsu
inyaoo at gmail.com
Thu Jun 23 02:10:10 UTC 2011
>Number: 158191
>Category: ports
>Synopsis: [patch] audio/mpg123: disable vendor cflags
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Thu Jun 23 02:10:09 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Pan Tsu
>Release: FreeBSD 9.0-CURRENT amd64
>Organization:
>Environment:
$ make -V CFLAGS
-O2 -pipe -O3 -g -fno-omit-frame-pointer -fstack-protector -march=native
>Description:
Vendor uses -funroll-all-loops that generates slower code which is
documented in gcc(1) manpage. If user cares about small optimization
(unlike asm) then he'd probably benefit more from plain `-O3' on gcc46.
>How-To-Repeat:
# user time from decoding an album's mp3 directory
$ ministat -n *
x base gcc, default cflags
+ base gcc, default cflags + --with-optimization=0
* gcc46 + my cflags
% gcc46 + my cflags + --with-optimization=0
# gcc46 + my cflags + generic_fpu
@ gcc46 + my cflags + generic_fpu + --with-optimization=0
N Min Max Median Avg Stddev
x 10 9.39 9.62 9.5 9.493 0.078464429
+ 10 9.3 9.54 9.43 9.436 0.083426614
* 10 8.7 8.92 8.78 8.781 0.071250731
% 10 8.3 8.54 8.5 8.459 0.076514341
# 10 12.97 13.23 13.12 13.104 0.094068533
@ 10 12.73 12.93 12.83 12.832 0.059029183
and numeric data generated by
#! /bin/sh
times=10
dir='/path/to/album'
while [ $((i+=1)) -le $times ]; do
find "$dir" -iname \*mp3 -exec time -p mpg123 -tq {} + 2>&1
done | while read desc time; do
case $desc in
user) echo $time
esac
done
>Fix:
--- a.diff begins here ---
Index: audio/mpg123/Makefile
===================================================================
RCS file: /a/.cvsup/ports/audio/mpg123/Makefile,v
retrieving revision 1.82
diff -u -p -r1.82 Makefile
--- audio/mpg123/Makefile 13 May 2011 12:01:55 -0000 1.82
+++ audio/mpg123/Makefile 21 Jun 2011 06:28:21 -0000
@@ -22,7 +22,8 @@ USE_AUTOTOOLS= libtool libltdl
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
-CONFIGURE_ARGS= --with-audio=oss \
+CONFIGURE_ARGS= --with-optimization=0 \
+ --with-audio=oss \
--with-default-audio=oss
CONFIGURE_ENV= CONFIG_SHELL=${SH} CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
--- a.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list