Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

USE flags and cpuinfo flags

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
5 posts • Page 1 of 1
Author
Message
paradigm-X
Apprentice
Apprentice
Posts: 168
Joined: Thu Sep 19, 2013 6:04 pm

USE flags and cpuinfo flags

  • Quote

Post by paradigm-X » Sat Feb 15, 2014 5:49 am

When I compare the kernel flags to the list of USE flags to see where I might be able to tweak the builds, etc., sometimes I see flags that have similar characteristics such as sse3, sse4, and others like that sort. If I want to enable whatever USE flags would match my kernel flags, if possible, should I put both sse2 and sse3 flags into the '/etc/portage/make.conf' file, or would if be better to put only the highest one of these, like only sse3?
Top
calavicci
n00b
n00b
Posts: 50
Joined: Tue Mar 28, 2006 11:35 pm

  • Quote

Post by calavicci » Sat Feb 15, 2014 3:36 pm

I admit that I'm not expert on the internals; I don't know whether, e.g., SSE3 is intended to mean "the entire SSE3 instruction set" or "the 13 instructions in SSE3 that are not in SSE2," but I'm not sure it matters; keep reading. The standard practice seems to be to use the flags for all of the instruction sets supported by one's CPU in make.conf.

An important note is that these sorts of USE flags are distinct from any related CFLAGS. The latter determines the instructions that GCC will output when building your code. The practice of using USE flags in an ebuild to affect the CFLAGS for a particular package is typically discouraged. These flags are supposed to be used, e.g., when a package can streamline itself by using assembly code to produce particularly fast binaries for some operations. If you have them disabled at build, the package should still run, but just be slower.

Recommended practices aside, it's really sort of up to the package what to do with combinations of these flags. Assuming that the intent is that SSE3 indicates all of SSE3, including the SSE2 subset, one would hope that packages that see the SSE3 USE flag would implement SSE2 code; their authors, after all, are the ones that included both flags. However, a package that might build code using SSE2 might have the SSE2 flag but not the SSE3, in which case it would not realize that your USE="SSE3" is supposed to mean that it should build the SSE2 code.
Top
aCOSwt
Bodhisattva
Bodhisattva
Posts: 2537
Joined: Fri Oct 19, 2007 1:48 pm
Location: Hilbert space

  • Quote

Post by aCOSwt » Sat Feb 15, 2014 9:59 pm

Code: Select all

acoswt@PrimaPratica ~ $ equery hasuse sse2
 * Searching for USE flag sse2 ... 
[IP-] [  ] dev-libs/openssl-1.0.1f:0
[I-O] [  ] kde-base/kdelibs-4.11.5:4/4.11
[I-O] [  ] kde-base/ksplash-4.11.5:4/4.11
[IP-] [  ] media-libs/lensfun-0.2.7:0
[IP-] [  ] media-libs/libsoundtouch-1.7.1:0
[IP-] [  ] media-libs/libvpx-1.1.0:0
[IP-] [  ] media-libs/qimageblitz-0.0.6-r1:0
[IP-] [  ] media-video/mplayer-1.1.1-r1:0
[IP-] [  ] media-video/transcode-1.1.7-r1:0
[IP-] [  ] sci-libs/fftw-3.3.3-r2:3.0
[IP-] [  ] www-plugins/adobe-flash-11.2.202.336:0
[IP-] [  ] x11-libs/pixman-0.32.4:0
acoswt@PrimaPratica ~ $ equery hasuse sse3
 * Searching for USE flag sse3 ... 
[IP-] [  ] media-libs/libvpx-1.1.0:0
So, we can see on this system that if I set the sse3 use flag AND NOT the sse2 use flag then only libvpx will be tweaked.
If I want the packages from the first list to make use of the sse2 instruction set, I must explicitly set the sse2 use flag, irrespective of the sse3 use flag settings.
Top
Anon-E-moose
Watchman
Watchman
User avatar
Posts: 6566
Joined: Fri May 23, 2008 7:31 pm
Location: Dallas area

  • Quote

Post by Anon-E-moose » Sat Feb 15, 2014 10:32 pm

sse & sse2 flags should be set in the default desktop profile ( emerge --info & look at USE= )

sse3/sse4 need to be set if you want to use them and your cpu can handle them
UM780 xtx, 6.18 zen kernel, gcc 15, openrc, wayland
minixforum m1-s1 max -- same software as above but used for ai learning


Zealots are gonna be zealots, just like haters are gonna be haters
Top
paradigm-X
Apprentice
Apprentice
Posts: 168
Joined: Thu Sep 19, 2013 6:04 pm

  • Quote

Post by paradigm-X » Sun Feb 16, 2014 11:17 pm

aCOSwt, hello. Your technique is excellent. I like how you can get to the crux of the issue promptly. The 'hasuse' equery is not something I have used much, until now. Thank you for the slick demo too.
Top
Post Reply

5 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic