Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ssse3 included by default
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
destroyedlolo
Guru
Guru


Joined: 17 Jun 2011
Posts: 445
Location: Close to Annecy (France)

PostPosted: Sun Sep 25, 2011 9:45 am    Post subject: ssse3 included by default Reply with quote

Hello,

I'm currently installing Gentoo on an Athlon box :
Code:
flags      : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat pse36 mmx fxsr syscall mmxext 3dnowext 3dnow


Consequently, my USE contains only :
Code:
mmx 3dnow


But when I emerged ffmpeg, I saw it ssse3 in it USEs.
I added a global -ssse3 but it is normal ?

Bye

Laurent
Back to top
View user's profile Send private message
Kollin
Veteran
Veteran


Joined: 25 Feb 2006
Posts: 1103
Location: Sofia/Bulgaria

PostPosted: Sun Sep 25, 2011 10:17 am    Post subject: Reply with quote

It is safe.
If you don't want some feature don't enable it i.e. in most cases flags with '-' are not necessary.
My advice is to use as less as possible global USEflags.
_________________
"Dear Enemy: may the Lord hate you and all your kind, may you be turned orange in hue, and may your head fall off at an awkward moment."
"Linux is like a wigwam - no windows, no gates, apache inside..."
Back to top
View user's profile Send private message
krinn
Advocate
Advocate


Joined: 02 May 2003
Posts: 4274

PostPosted: Sun Sep 25, 2011 10:33 am    Post subject: Reply with quote

yes because the use flag doesn't depend on your cpu capabilities.

and no because this should be per default set to -ssse3
try looking at your emerge --info to see if it was globally set (and assuming it's not you, then it would be set by your current profile)
else filebug against ffmpeg as the default shouldn't enable that use flag as not all cpu handle it.
Back to top
View user's profile Send private message
mv
Advocate
Advocate


Joined: 20 Apr 2005
Posts: 4125

PostPosted: Sun Sep 25, 2011 10:46 am    Post subject: Reply with quote

krinn wrote:
else filebug against ffmpeg as the default shouldn't enable that use flag as not all cpu handle it.

ffmpeg enables ssse3 by default. (You can see this with eix or, in more detail, with eix -l). I don't know whether this is appropriate (i.e. whether the corresponding codepath will be automatically ignored if the cpu does not have this feature) - there is no obvious comment in the ChangeLog about it. Perhaps one should really file a bug, just to be sure that this is not a mistake.
Back to top
View user's profile Send private message
krinn
Advocate
Advocate


Joined: 02 May 2003
Posts: 4274

PostPosted: Sun Sep 25, 2011 11:00 am    Post subject: Reply with quote

Well for me this kind of stuff should always be OFF per default.

So we (user) don't have to guess how the ebuild is working and if enabling a use flag will be safe because the ebuild is checking its validity.

And having a use flag that would do some autodetection, then that use flag would then just be useful to disable the feature (when ON autodetect and ON if possible else OFF, when OFF = off) -> then name that use flag <nossse3, disablessse3, diessse3, ssse3off...> and not as <ssse3> name that imply a enable/disable switch
Back to top
View user's profile Send private message
adversity
n00b
n00b


Joined: 15 Aug 2011
Posts: 45
Location: Louisville, KY

PostPosted: Sun Sep 25, 2011 11:07 am    Post subject: Reply with quote

I'm thinking ffmpeg enables certain CPU USE flags by default, as 3dnow & 3dnowext where enabled by default for me even though my CPU does not support them and it was not specified anywhere in my USE flags (profile or make.conf). I'm wondering if the cpudetection flag then chooses which ones to actually use at runtime? However I don't think cpudetection is enabled by default.
Back to top
View user's profile Send private message
destroyedlolo
Guru
Guru


Joined: 17 Jun 2011
Posts: 445
Location: Close to Annecy (France)

PostPosted: Sun Sep 25, 2011 4:45 pm    Post subject: Reply with quote

Hi,

As per my emerge --info, there is no cpu flags in my profile :
Code:
USE="3dnow X a52 aac acl alsa archive bash-completion berkdb bzip2 cairo cdda cli consolekit cracklib crypt cups cxx dbus device-mapper dri dvd exif faac fbcon ffmpeg flac fuse gdbm gdu gif gphoto2 gpm gtk gvfs iconv imlib jpeg jpeg2k libcaca libnotify matroska mmx modules mp3 mpeg mudflap ncurses nls nptl nptlonly nsplugin ogg oggvorbis openmp pam pcre perl png policykit pppd python readline session speex ssl svg sysfs syslog tcpd theora threads tiff udev unicode usb vorbis win32codecs x264 x86 xml xorg xosd xv zlib"

So ... where does it come ?

My second wondering is related to "cpudetection".
If the build process decides by itself which cpu flags to use ... what will happen if I cross-compile ?
I mean, I'm on way to install Gentoo on old and slow Duron, so obviously, I'm thinking to build it on faster machine (P4). What will happen if it decides to add sse or such flags as "the build host supports it" and then if I place generated binary on the Duron (in addition, I'm not generating generic binary but --march=xxxx flags).
Back to top
View user's profile Send private message
destroyedlolo
Guru
Guru


Joined: 17 Jun 2011
Posts: 445
Location: Close to Annecy (France)

PostPosted: Sun Sep 25, 2011 5:59 pm    Post subject: Reply with quote

Hum, I'm building dt_gui and in compilation lines, I can see :
Code:
-DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_HAVE_SSE3 -DQT_HAVE_SSSE3 -DQT_HAVE_SSE4_1 -DQT_HAVE_SSE4_2

despite my USE containe -ssse3.
It seems for me it is generating generic stuffs ... and ignore my USEs :?
Back to top
View user's profile Send private message
mv
Advocate
Advocate


Joined: 20 Apr 2005
Posts: 4125

PostPosted: Sun Sep 25, 2011 6:02 pm    Post subject: Reply with quote

destroyedlolo wrote:
So ... where does it come?

As I have explained, have a look at the output of eix (or eix -l): The "+" means that the ebuild sets the useflag by default.
Quote:
If the build process decides by itself which cpu flags to use ... what will happen if I cross-compile?

We are not speaking about cpu flags but about use flags in the moment. What the ebuild/project (in this case ffmpeg) does with this useflags depends completely on the project/ebuild. My guess(!) is that certain manually written assembler code will be included if these flags are set. Since these flags are set by default, I would also guess that this codepath is not used if the cpu does not support it (and that this is tested at runtime even without cpudetection). However, these are both only guesses. To be sure, one would have to analyze the code or ask a corresponding developer. This is why I said that it might be a good idea to file a bug to make sure that the automatic default is not a mistake - at least, I would have expected a corresponding note in the ChangeLog which I have not seen.
Back to top
View user's profile Send private message
mv
Advocate
Advocate


Joined: 20 Apr 2005
Posts: 4125

PostPosted: Sun Sep 25, 2011 6:07 pm    Post subject: Reply with quote

destroyedlolo wrote:
It seems for me it is generating generic stuffs ... and ignore my USEs :?

ffmpeg outputs right at the beginning what is supported/enabled. I would rely only on this: The rest can mean a lot of thing (e.g. HAVE_... might not imply USE_... or whatever).
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum