Subject: Re: C compiler flags
To: Adam <adam@albedo.art.pl>
From: Blair Sadewitz <blair.sadewitz@gmail.com>
List: pkgsrc-users
Date: 11/14/2006 04:43:21
The framework in devel/cpuflags catches this, which is in part why I
recommended it.  Simply install it and add the following to mk.conf:

.sinclude "/usr/pkg/share/mk/cpuflags.mk"
.sinclude "/usr/pkg/share/mk/optimize_gcc.mk"

COPTS?= ${DEFCOPTS} -pipe
CFLAGS+=-pipe

This will take care of everything--except, of course, those packages
which cpuflags doesn't catch (of which there have to be plenty,
depending upon architecture). ;)

--Blair


On 11/14/06, Adam <adam@albedo.art.pl> wrote:
> > I am using:
> >
> > CFLAGS+=-O2 -march=athlon
> >
> > in my /etc/mk.conf. But the problem is that I realized that I wanted
> > this setting after compiling a large amount of software.
>
> If you also add -fomit-frame-pointer, programs will run even faster.
> But be careful with Mozilla/Firefox/Thunderbird. These crash with -
> fomit-frame-pointer.
>
> Kind regards,
> Adam
>
>


-- 
Support WFMU-FM: free-form radio for the masses!

<http://www.wfmu.org/>
91.1 FM Jersey City, NJ
90.1 FM Mt. Hope, NY

"The Reggae Schoolroom":
<http://www.wfmu.org/playlists/RS/>