Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 323815 - media-libs/libvpx injects extra compiler flags
Summary: media-libs/libvpx injects extra compiler flags
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 323727
  Show dependency tree
 
Reported: 2010-06-13 17:33 UTC by Jeroen Roovers (RETIRED)
Modified: 2013-06-25 15:14 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 Jeroen Roovers (RETIRED) gentoo-dev 2010-06-13 17:33:34 UTC
The configure script injects extra CFLAGS (-O3, -Wtype-limits and -Wcast-qual).

Index: libvpx-0.9.0_p20100612.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/media-libs/libvpx/libvpx-0.9.0_p20100612.ebuild,v
retrieving revision 1.3
diff -u -B -r1.3 libvpx-0.9.0_p20100612.ebuild
--- libvpx-0.9.0_p20100612.ebuild       12 Jun 2010 21:45:36 -0000      1.3
+++ libvpx-0.9.0_p20100612.ebuild       13 Jun 2010 17:31:42 -0000
@@ -30,6 +30,16 @@
        )
 "
 
+src_prepare() {
+       # support gcc 4.2
+       sed \
+               -i configure \
+               -e '/-Wtype-limits/d' \
+               -e '/-Wcast-qual/d' \
+               || die "sed failed"
+       sed -i build/make/configure.sh -e '/-O3/d' || die "sed failed"
+}
+
 src_configure() {
        tc-export CC
        ./configure \
Comment 1 Alexis Ballier gentoo-dev 2010-06-13 17:54:16 UTC
(In reply to comment #0)
> The configure script injects extra CFLAGS (-O3, -Wtype-limits and -Wcast-qual).

-O3 matters; -W* do not and I think it is unnecessary to disable them.
Comment 2 Alexis Ballier gentoo-dev 2010-06-13 17:55:31 UTC
(In reply to comment #1)
> (In reply to comment #0)
> > The configure script injects extra CFLAGS (-O3, -Wtype-limits and -Wcast-qual).
> 
> -O3 matters; -W* do not and I think it is unnecessary to disable them.
> 

Rah, sorry, I didn't see the comment in the diff; are those -W* stuff new in gcc 4.3 ?
Comment 3 Alexis Ballier gentoo-dev 2013-06-25 15:14:36 UTC
with libvpx-9999 I get flags like that:
x86_64-pc-linux-gnu-gcc -I/var/tmp/portage/media-libs/libvpx-9999/work/libvpx-9999/vp8 -I/var/tmp/portage/media-libs/libvpx-9999/work/libvpx-9999/vp8 -I/var/tmp/portage/media-libs/libvpx-9999/work/libvpx-9999/vp9 -I/var/tmp/portage/media-libs/libvpx-9999/work/libvpx-9999/vp9 -march=native -mssse3 -msse4 -msse4.1 -msse4.2 -mavx -maes -O2 -pipe -ggdb -m64 -O3 -fPIC -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -march=native -mssse3 -msse4 -msse4.1 -msse4.2 -mavx -maes -O2 -pipe -ggdb -Wall -Wdeclaration-after-statement -Wdisabled-optimization -Wpointer-arith -Wtype-limits -Wcast-qual -Wvla -Wimplicit-function-declaration -Wuninitialized -Wunused-variable -Wunused-but-set-variable -Wno-unused-function -I. -I"/var/tmp/portage/media-libs/libvpx-9999/work/libvpx-9999" -c -o vp8cx_set_ref.c.o vp8cx_set_ref.c


it injects -O3 but is overriden by my CFLAGS -> not a problem.
-W* flags are checked at configure -> not a prolem either.

fixed.