Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 603714

Summary: media-libs/x264-0.0.20160712: global CFLAGS=-O2 overrides local -O3
Product: Gentoo Linux Reporter: Dainius Masiliƫnas <pastas4>
Component: Current packagesAssignee: Gentoo Media-video project <media-video>
Status: RESOLVED WORKSFORME    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Dainius Masiliƫnas 2016-12-25 18:34:33 UTC
The latest stable x264 ebuild (0.0.20160712) now builds the package using the -O3 flag. However, user flags are not filtered out, so a standard setting of -O2 takes precedence (as it is put last in the compilation command), which is clearly not intended.

So either the user's -O flags should be filtered out (probably), or no -O3 should be passed.
Comment 1 Alexis Ballier gentoo-dev 2020-09-07 13:07:29 UTC
I get compile lines like this here in latest ebuild:

x86_64-pc-linux-gnu-gcc -Wno-maybe-uninitialized -Wshadow -O3 -ffast-math -m64 -march=skylake -mtune=skylake -O2 -pipe -ggdb -Wall -I. -I../x264-9999 -std=gnu99 -D_GNU_SOURCE -mpreferred-stack-boundary=6 -fPIC -fomit-frame-pointer -fno-tree-vectorize -fvisibility=hidden  -DX264_API_EXPORTS -c ../x264-9999/common/predict.c -o common/predict-8.o -DHIGH_BIT_DEPTH=0 -DBIT_DEPTH=8



-O3 is from upstream; -O2 -pipe etc. is from me.

It is fine that way: if user specifies something, then it takes precedence as being last, otherwise upstream default is used