Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Gentoo: User

temporarily lower gcc's optimization flags - HowTo

 

 

Gentoo user RSS feed   Index | Next | Previous | View Threaded


jarausch at igpm

Jun 18, 2008, 9:20 AM

Post #1 of 8 (1039 views)
Permalink
temporarily lower gcc's optimization flags - HowTo

Hi,

due to a bug with gcc-4.3.1 when used with -O2 or higher
I need to emerge a package with a lower optimization (-O1)
than my default in /etc/make.conf (which is -O2)

Is there a means to do so without changing /etc/make.conf temporarily?

Many thanks for a hint,

Helmut Jarausch

Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
--
gentoo-user [at] lists mailing list


justin at j-schmitz

Jun 18, 2008, 9:28 AM

Post #2 of 8 (1043 views)
Permalink
Re: temporarily lower gcc's optimization flags - HowTo [In reply to]

Helmut Jarausch schrieb:
> Hi,
>
> due to a bug with gcc-4.3.1 when used with -O2 or higher
> I need to emerge a package with a lower optimization (-O1)
> than my default in /etc/make.conf (which is -O2)
>
> Is there a means to do so without changing /etc/make.conf temporarily?
>
> Many thanks for a hint,
>
> Helmut Jarausch
>
> Lehrstuhl fuer Numerische Mathematik
> RWTH - Aachen University
> D 52056 Aachen, Germany
>
There was a big discussion abou that a few days ago:

tuning ./configure parameters via emerge

was the name of the thread.

In short:

/etc/portage/env/<cat>/<pkg>

can be used to overwrite every variable the portage recognizes on an
package specific base. (F77 needs an export in front for many packages)
Attachments: signature.asc (0.25 KB)


volker.armin.hemmann at tu-clausthal

Jun 18, 2008, 10:46 AM

Post #3 of 8 (1042 views)
Permalink
Re: temporarily lower gcc's optimization flags - HowTo [In reply to]

On Wednesday 18 June 2008, Helmut Jarausch wrote:
> Hi,
>
> due to a bug with gcc-4.3.1 when used with -O2 or higher
> I need to emerge a package with a lower optimization (-O1)
> than my default in /etc/make.conf (which is -O2)
>
> Is there a means to do so without changing /etc/make.conf temporarily?


you could edit the ebuild and add filter-flags to it. Then copy it to your
local overlay, ebuild blabla.ebuild digest and you are ready to emerge.
--
gentoo-user [at] lists mailing list


justin at j-schmitz

Jun 18, 2008, 10:55 AM

Post #4 of 8 (1027 views)
Permalink
Re: temporarily lower gcc's optimization flags - HowTo [In reply to]

Volker Armin Hemmann schrieb:
> On Wednesday 18 June 2008, Helmut Jarausch wrote:
>
>> Hi,
>>
>> due to a bug with gcc-4.3.1 when used with -O2 or higher
>> I need to emerge a package with a lower optimization (-O1)
>> than my default in /etc/make.conf (which is -O2)
>>
>> Is there a means to do so without changing /etc/make.conf temporarily?
>>
>
>
> you could edit the ebuild and add filter-flags to it. Then copy it to your
> local overlay, ebuild blabla.ebuild digest and you are ready to emerge.
>
First he only wants to reduce his CFLAGS and second as discussed it is
more easy to use EXTRA_ECONF variable to expand configure stuff.
--
gentoo-user [at] lists mailing list


alan.mckinnon at gmail

Jun 18, 2008, 12:30 PM

Post #5 of 8 (1032 views)
Permalink
Re: temporarily lower gcc's optimization flags - HowTo [In reply to]

On Wednesday 18 June 2008, Florian Philipp wrote:
> On Wed, 18 Jun 2008 18:20:52 +0200 (CEST)
>
> Helmut Jarausch <jarausch [at] igpm> wrote:
> > Hi,
> >
> > due to a bug with gcc-4.3.1 when used with -O2 or higher
> > I need to emerge a package with a lower optimization (-O1)
> > than my default in /etc/make.conf (which is -O2)
> >
> > Is there a means to do so without changing /etc/make.conf
> > temporarily?

[snip]

> AFAIK, you can override all settings when calling emerge like this:
>
> CFLAGS="..." emerge ...

Which is something you should never do.

Portage does not know that you did this, and with the next emerge it
will revert back to whatever is in the various config files, which you
will have forgotten, and you will pull your hair out for hours trying
to figure out what the problem is. For the second time.

Don't change env vars on the command line to modify portage's behaviour,
instead use the relevant config file, unless such a file really really
doe snot exist.

--
Alan McKinnon
alan dot mckinnon at gmail dot com

--
gentoo-user [at] lists mailing list


lists at f_philipp

Jun 18, 2008, 1:41 PM

Post #6 of 8 (1032 views)
Permalink
Re: temporarily lower gcc's optimization flags - HowTo [In reply to]

On Wed, 18 Jun 2008 18:20:52 +0200 (CEST)
Helmut Jarausch <jarausch [at] igpm> wrote:

> Hi,
>
> due to a bug with gcc-4.3.1 when used with -O2 or higher
> I need to emerge a package with a lower optimization (-O1)
> than my default in /etc/make.conf (which is -O2)
>
> Is there a means to do so without changing /etc/make.conf temporarily?
>
> Many thanks for a hint,
>
> Helmut Jarausch
>
> Lehrstuhl fuer Numerische Mathematik
> RWTH - Aachen University
> D 52056 Aachen, Germany

AFAIK, you can override all settings when calling emerge like this:

CFLAGS="..." emerge ...
Attachments: signature.asc (0.19 KB)


volker.armin.hemmann at tu-clausthal

Jun 18, 2008, 1:49 PM

Post #7 of 8 (1037 views)
Permalink
Re: temporarily lower gcc's optimization flags - HowTo [In reply to]

On Wednesday 18 June 2008, Justin wrote:

> First he only wants to reduce his CFLAGS and second as discussed it is
> more easy to use EXTRA_ECONF variable to expand configure stuff.

and filter-flags does exaclty that - filter and replaces flags.
--
gentoo-user [at] lists mailing list


billk at iinet

Jun 18, 2008, 4:01 PM

Post #8 of 8 (1028 views)
Permalink
Re: temporarily lower gcc's optimization flags - HowTo [In reply to]

CFLAGS='-MY_OTHER_FLAGS -O1' emerge package

???
BillK


On Wed, 2008-06-18 at 19:46 +0200, Volker Armin Hemmann wrote:
> On Wednesday 18 June 2008, Helmut Jarausch wrote:
> > Hi,
> >
> > due to a bug with gcc-4.3.1 when used with -O2 or higher
> > I need to emerge a package with a lower optimization (-O1)
> > than my default in /etc/make.conf (which is -O2)
> >
> > Is there a means to do so without changing /etc/make.conf temporarily?
>
>
> you could edit the ebuild and add filter-flags to it. Then copy it to your
> local overlay, ebuild blabla.ebuild digest and you are ready to emerge.
--
William Kenworthy <billk [at] iinet>
Home in Perth!
--
gentoo-user [at] lists mailing list

Gentoo user RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.