Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 603714 - media-libs/x264-0.0.20160712: global CFLAGS=-O2 overrides local -O3
Summary: media-libs/x264-0.0.20160712: global CFLAGS=-O2 overrides local -O3
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-25 18:34 UTC by Dainius Masiliūnas
Modified: 2020-09-07 13:07 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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