From: Tomasz Maluszycki on
I would like to compile packages for my laptop by myself, and I'm
tired of changing options in makefile by hand. Maybe is there way to
add them by these configure scripts? If I remember correctly packages
are built against i386 architecture, and for me it is waste of my CPU
capabilities;

for example: instead of ' -g -O ' I would like to have ' -O3
-std-gnu99 -m128bit-long-double -m64 -mssse3 -mfpmath=sse -march=core2
'

(for me -O3 is stable... I didn't had any problem with it)

is there simple way to do this?

--
darkestkhan
------------------------------------------
jid: darkestkhan(a)gmail.com


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/AANLkTinodz1gRFoiDo8dkmMfLE_-7GhDzzKR1S_3T_kA(a)mail.gmail.com
From: Sven Joachim on
On 2010-06-28 21:07 +0200, Tomasz Maluszycki wrote:

> I would like to compile packages for my laptop by myself, and I'm
> tired of changing options in makefile by hand. Maybe is there way to
> add them by these configure scripts? If I remember correctly packages
> are built against i386 architecture, and for me it is waste of my CPU
> capabilities;
>
> for example: instead of ' -g -O ' I would like to have ' -O3
> -std-gnu99 -m128bit-long-double -m64 -mssse3 -mfpmath=sse -march=core2
> '

You don't want -m64 on i386. Why don't you switch to the amd64
architecture, where you get at least some of these optimizations by default?

> (for me -O3 is stable... I didn't had any problem with it)

Depends on the program, I think. In general, -O3 produces bigger
binaries (than -O2) that may or may not run faster. Mozilla even
builds with -Os by default.

> is there simple way to do this?

With recent dpkg versions (1.15.7 and newer) have a look at
dpkg-buildflags(1).

Sven


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/87vd93hs1k.fsf(a)turtle.gmx.de
From: Tomasz Maluszycki on
2010/6/28 Sven Joachim <svenjoac(a)gmx.de>:
> On 2010-06-28 21:07 +0200, Tomasz Maluszycki wrote:
>
>> I would like to compile packages for my laptop by myself, and I'm
>> tired of changing options in makefile by hand. Maybe is there way to
>> add them by these configure scripts? If I remember correctly packages
>> are built against i386 architecture, and for me it is waste of my CPU
>> capabilities;
>>
>> for example: instead of ' -g -O ' I would like to have ' -O3
>> -std-gnu99 -m128bit-long-double -m64 -mssse3 -mfpmath=sse -march=core2
>> '
>
> You don't want -m64 on i386.  Why don't you switch to the amd64
> architecture, where you get at least some of these optimizations by default?

I'm using AMD64 ;P And i don't want some of these optimizations by default,
I would like to have most of them

>
>> (for me -O3 is stable... I didn't had any problem with it)
>
> Depends on the program, I think.  In general, -O3 produces bigger
> binaries (than -O2) that may or may not run faster.  Mozilla even
> builds with -Os by default.
>

Yeah, but linkers and compilers have big workload, and they can profit from -O3
Mozilla(or Xulrunner?) could too use -O2 at least

>> is there simple way to do this?
>
> With recent dpkg versions (1.15.7 and newer) have a look at
> dpkg-buildflags(1).

After looking it seems that I can't find way to use this, and I can't
find any example file...

> Sven

Thanks for nice info :)

--
darkestkhan
------------------------------------------
jid: darkestkhan(a)gmail.com


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/AANLkTinl1v1wai9NhBc-yWGhHN08_e8Co4vklkwLHYA9(a)mail.gmail.com
From: Andre Majorel on
On 2010-06-28 21:32 +0200, Sven Joachim wrote:
> On 2010-06-28 21:07 +0200, Tomasz Maluszycki wrote:

> > (for me -O3 is stable... I didn't had any problem with it)
>
> Depends on the program, I think. In general, -O3 produces bigger
> binaries (than -O2) that may or may not run faster. Mozilla even
> builds with -Os by default.

You'd be surprised at the optimisations that GCC misses on i386.
I've seen it needlessly reload registers on every iteration on a
tight loop. Neither -O2 nor -O3 changed that. The only way to make
it generate sane code was -Os.

These days, it's not safe to assume that -O3 produces the fastest
binaries. Always benchmark it against -Os.

--
Andr� Majorel <http://www.teaser.fr/~amajorel/>
bugs.debian.org, your one-stop shop for email addresses.


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/20100629071142.GA14200(a)aym.net2.nerim.net
From: Tzafrir Cohen on
On Mon, Jun 28, 2010 at 03:07:53PM -0400, Tomasz Maluszycki wrote:
> I would like to compile packages for my laptop by myself, and I'm
> tired of changing options in makefile by hand. Maybe is there way to
> add them by these configure scripts? If I remember correctly packages
> are built against i386 architecture, and for me it is waste of my CPU
> capabilities;
>
> for example: instead of ' -g -O ' I would like to have ' -O3
> -std-gnu99 -m128bit-long-double -m64 -mssse3 -mfpmath=sse -march=core2
> '

./configure CFLAGS="whatever"

Or:

CFLAGS="whatever" ./configure

See: ./configure --help

--
Tzafrir Cohen | tzafrir(a)jabber.org | VIM is
http://tzafrir.org.il | | a Mutt's
tzafrir(a)cohens.org.il | | best
tzafrir(a)debian.org | | friend


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/20100629085537.GN17569(a)pear.tzafrir.org.il