Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Possible to override default cflags when emerging[SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
anderlin
Tux's lil' helper
Tux's lil' helper


Joined: 29 Nov 2003
Posts: 149
Location: Trondheim, Norway

PostPosted: Tue Nov 01, 2005 11:19 am    Post subject: Possible to override default cflags when emerging[SOLVED] Reply with quote

Hi

I am doing a test with different cflags on povray performance for a statistic course I am taking. I have one problem. When I emerge povray with:

Code:
CFLAGS="-O0" emerge povray


the portage log still says things like

Quote:
i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../../source -I../../unix -pipe -Wno-multichar -O3 -msse -mfpmath=sse -msse2 -march=athlon -mtune=athlon -malign-double -minline-all-stringops -march=athlon-xp -msse2 -O2 -pipe -ftracer -c -o textstreambuffer.o `test -f 'textstreambuffer.cpp' || echo './'`textstreambuffer.cpp


Is there a way to override these default cflags?

I recognize
Code:
-march=athlon-xp -msse2 -O2 -pipe -ftracer
from /etc/make.conf.

Regards, Anders Båtstrand
_________________
http://anderlin.dyndns.org/
Back to top
View user's profile Send private message
anderlin
Tux's lil' helper
Tux's lil' helper


Joined: 29 Nov 2003
Posts: 149
Location: Trondheim, Norway

PostPosted: Tue Nov 01, 2005 1:07 pm    Post subject: Reply with quote

After i lot of testing, this modified ebuild works as I wanted:

Code:
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-gfx/povray/povray-3.6.1-r1.ebuild,v 1.14 2005/08/24 17:00:19 agriffis Exp $

inherit flag-o-matic

DESCRIPTION="The Persistence Of Vision Ray Tracer"
SRC_URI="ftp://ftp.povray.org/pub/povray/Official/Unix/povray-3.6.tar.bz2"
HOMEPAGE="http://www.povray.org/"

SLOT="0"
LICENSE="povlegal-3.6"
KEYWORDS="alpha amd64 hppa ia64 ~mips ppc ppc64 sparc x86"
IUSE="X svga"

DEPEND="media-libs/libpng
    >=media-libs/tiff-3.6.1
    media-libs/jpeg
    sys-libs/zlib
    X? ( virtual/x11 )
    svga? ( media-libs/svgalib )"


src_compile() {
    local myconf

    # closes bug 71255
    if  get-flag march == k6-2 ; then
        filter-flags -fomit-frame-pointer
    fi

    use X && myconf="${myconf} --with-x" \
        || myconf="${myconf} --without-x"\
        CFLAGS="${CFLAGS} -DX_DISPLAY_MISSING"
    use svga || myconf="${myconf} --without-svga"

    econf COMPILED_BY="${USER} (on `uname -n`)" ${myconf} || die

    # Copy the user configuration into /etc/skel
    cp Makefile Makefile.orig
    sed -e "s:^povconfuser = .*:povconfuser = ${D}etc/skel/.povray/3.6/:" Makefile.orig >Makefile

    einfo Building povray

    ## ADDED THIS LINE, SINCE THIS HAS TO BE THERE
    CFLAGS="${CFLAGS} -Wno-multichar"

    ## ADDED -e TO OVERRIDE ANY MAKEFILES
    CXXFLAGS=${CFLAGS} emake -e || die "build failed"
}

src_install() {
    emake DESTDIR=${D} install || die
}


_________________
http://anderlin.dyndns.org/
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum