Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 473814 - media-libs/x264: drop debug useflag
Summary: media-libs/x264: drop debug useflag
Status: RESOLVED FIXED
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: 2013-06-19 12:49 UTC by Alexis Ballier
Modified: 2013-08-01 16:41 UTC (History)
1 user (show)

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 Alexis Ballier gentoo-dev 2013-06-19 12:49:42 UTC
$ ./configure --help | grep debug
  --enable-debug           add -g


we can do this with CFLAGS.
Comment 1 Patrick McLean gentoo-dev 2013-06-19 18:13:10 UTC
Fair enough, fixed.
Comment 2 Nikoli 2013-06-20 16:50:49 UTC
You are wrong, read configure, USE debug should not be removed. '--enable-debug' also removes -ffast-math -fomit-frame-pointer from CFLAGS and replaces -O3 with -O1.
USE="-debug":
x86_64-pc-linux-gnu-gcc -Wshadow -O3 -ffast-math -m64 -march=corei7-avx -pipe -Wall -I. -I. -std=gnu99 -fPIC -fomit-frame-pointer -fno-tree-vectorize   -c -o common/mc.o common/mc.c
USE="debug":
x86_64-pc-linux-gnu-gcc -Wshadow -O1 -g -m64 -march=corei7-avx -pipe -Wall -I. -I. -std=gnu99 -fPIC -fno-tree-vectorize   -c -o common/mc.o common/mc.c

And we can not be sure, that upstream does not change behaviour of --enable-debug. Having this USE does not create any maintenance burden.
Comment 3 Alexis Ballier gentoo-dev 2013-06-20 16:56:51 UTC
(In reply to Nikoli from comment #2)

yes; this goes with the fact that it should also honour cflags :)
Comment 4 Nikoli 2013-06-20 17:01:56 UTC
Default upstream CFLAGS are fine, users normally want them for x264, not slow -O2.
Comment 5 Alexis Ballier gentoo-dev 2013-06-20 18:41:16 UTC
(In reply to Nikoli from comment #4)

users normally want the CFLAGS they have set in make.conf; some exceptions are -ffast-math because it cannot work globally and -fomit-frame-pointer when needed for inline asm
Comment 6 Nikoli 2013-06-22 19:54:27 UTC
x264 upstream is strongly against using -O2 for x264 packages. But we do not want -O3 for all packages.
Comment 7 Alexis Ballier gentoo-dev 2013-06-23 20:18:10 UTC
(In reply to Nikoli from comment #6)
> x264 upstream is strongly against using -O2 for x264 packages. But we do not
> want -O3 for all packages.

I'm sorry but this is just nonsense:
- we're talking about a flag that changes -O3 to -O1
- this is against gentoo policy
- the difference between O2 and O3 tends to change between gcc versions so this statement without gcc version is not well defined
- upstream used to have -O4 (omg so fast) until they realized clang produced bytecode with this
- -O3 can be enabled globally, it is generally not because it often produces slower programs

even if there were serious reasons for using -O3, replace-flags is much cleaner.
Comment 8 Alexis Ballier gentoo-dev 2013-08-01 16:41:31 UTC
  19 Jun 2013; Patrick McLean <chutz@gentoo.org> x264-0.0.20130506.ebuild,
  x264-9999.ebuild:
  Remove the debug USE flag as all it does is add -g to the CFLAGS (bug
  #473814).