mplayer with custom-cflags kills all custom set cflags, leaving only the -march intact, at the same time resetting any -O* to -O2 From the name custom-cflags i'd assume my cflags are taken and not the upstream-provided ones. But since the ebuild filteres all some safe? flags are chosen? Whats custom-cflags supposed to mean then? In other applications custom-...flags means the user provided flags are chosen, not other arbitrary ones. with USE=custom-cflags x86_64-pc-linux-gnu-gcc -MM -Wundef -Wdisabled-optimization -Wno-pointer-sign -Wdeclaration-after-statement -std=gnu99 -march=native -pipe -O2 -D__STDC_LIMIT_MACROS -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -I. -I/usr/X11R6/include -I/usr/include/ -I/usr/include/SDL -D_REENTRANT -I/usr/kde/3.5/include/artsc -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -D_REENTRANT -Ilibdvdread4 -I/usr/include/freetype2 -I/usr/include/dirac -I/usr/include/schroedinger-1.0 -I/usr/include/liboil-0.3 -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -Ilibdvdnav gui/mplayer/gtk/gtk_url.c | sed -e "s,[0-9a-z._-]*: \([a-z0-9/]*/\)[^/]* ,\1&," -e "s,\(.*\)\.o: ,\1.d &," > gui/mplayer/gtk/gtk_url.d
need emerge --info, emerge -pv mplayer
I don't have access to my system now, i'll post those infos later. But when looking at the ebuild it's already very clear that everything is killed: if use custom-cflags; then # let's play the filtration game! MPlayer hates on all! strip-flags # ugly optimizations cause MPlayer to cry on x86 systems! if use x86 || use x86-fbsd ; then replace-flags -O* -O2 filter-flags -fPIC -fPIE use debug || append-flags -fomit-frame-pointer fi append-flags -D__STDC_LIMIT_MACROS else unset CFLAGS CXXFLAGS fi I don't understand the strip-flags call at all since it's not anything custom anymore if everything is stripped. Even if upstream hates and does not support other flags than their own, it should still be possible, especially in gentoo and especially with the custom-cflags use-flag, to use own cflags.
Created attachment 183176 [details] emerge --info
emerge -p: [ebuild R ] media-video/mplayer-1.0_rc2_p28450 USE="X a52 aac aalib alsa amrnb amrwb arts ass bidi bl cddb cdio cdparanoia custom-cflags custom-cpuopts dga dirac doc dts dv dvd enca encode esd fbcon ftp ggi gif gtk iconv ipv6 jack jpeg ladspa libcaca lirc live lzo mad md5sum mmx mmxext mng mp2 mp3 musepack openal opengl oss png pnm pulseaudio quicktime radio rar rtc samba schroedinger sdl speex sse sse2 ssse3 teletext tga theora truetype unicode v4l v4l2 vorbis x264 xanim xinerama xscreensaver xv xvid xvmc -3dnow -3dnowext (-altivec) -bindist -cpudetection -debug -directfb -dvb (-dvdnav) -dxr3 -joystick -nas -nemesi -pvr (-real) (-svga) (-vidix) (-win32codecs) -zoran" VIDEO_CARDS="vesa -mga -s3virge -tdfx"
This is one of those many things in mplayer that, though not documented, there's a reason it's in there ... and for the life of me I can't remember why now. I'm going to lean towards not changing it, since I do at least remember it being in there for a reason. Also, since this is the first time anyone's complained, and it obviously works fine. If you really want to rice, I'd recommend an overlay or just tweaking the ebuild yourself. Either one would be trivial.
Then, why even offer the flag if it's doing something.... whatever it does, it's definitely not what anyone will expect if this flag is set. About your 'rice', I got a powerpc iBook, it will often bring strange color overflow errors when using mplayer with --ffast-math, so I'd rather set my own CFLAGS and surely not use just -O2 instead of use either -O2 or the default mplayer-generated flags which are available through the ebuild. Sure, an overlay is no problem, but it's the general approach, why offer a flag if it's effect is opposite to the same flag for all other ebuilds? qt-*-4.5 offers a similar flag but prints a warning if using the flag but not doing something unexpected as this one here.
> qt-*-4.5 offers a similar flag but prints a warning if using the flag but not > doing something unexpected as this one here. Patches welcome for more verbosity. > About your 'rice', I got a powerpc iBook, it will often bring strange color > overflow errors when using mplayer with --ffast-math Alright, well now we are getting close to a real bug report. I don't see ffast-math in there anyway, am I missing something? Or did you mean without it.
Created attachment 184603 [details] mplayer custom-cflags warning
--ffast-math is automagically being applied when building mplayer without custom-cflags set, it's being used by upstream in their auto-detection. But those errors are not my point. My point is, the general meaning of the flag custom-cflags and it's result in mplayer is opposite. E.g. if I want mplayer/mencoder to be accurate in their calculations and not use this flag, or use whatever compiler options I want (e.g. with icc), I will have to tweak the ebuild by myself even though the ebuild provides a flag to apply my very own custom cflags. Only because all my cflags are stripped unconditionally. Then whats the use of even having this flag at all?
Created attachment 184612 [details] restore mplayer custom-cflags functionality Restores the common behavior of custom-cflags and adds an additional warning for everyone setting this flag, including bug reporting advice.
alright, thanks for the patches. I'll get em in next release here, which should be soon.
Fixed in CVS