Re: [maemo-developers] gcc options for smallest size, best speed, etc

2006-04-29 Thread David Connolly

Hi Koen,

On 4/27/06, Koen Kooi [EMAIL PROTECTED] wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Øyvind Kolås wrote:
 On 4/27/06, Philippe Laporte [EMAIL PROTECTED] wrote:

Hi,
I would assume that this list be a top source for the following
question: what are the compile options for ARM for gcc for the smallest
possible size, etc.

For both smallest size, and best speed, seperately of course.

Or where should I look?


 One of the changes that have mattered for me is adding -march=armv5te
 to the CFLAGS.

- -mtune=armv5te should yield the same improvement while retaining
compatibilty with armv4. Just in case someone tries to build maemo for a
strongarm platform :)


Actually with arm targets -mtune only accepts values valid for -mcpu
instead of -march.
Unlike x86 where --march implies --mcpu. So armv5te isn't an option
but something like arm920t is.

Does anybody know which of the options supported by -mcpu in gcc 3.3
included with the maemo 1.1 sdk is closest to the ARM926EJ in the
Nokia 770?

I realise gcc 3.4 (used for the kernel build) has support for
-mcpu/-mtune=arm926ej-s, so at least the future is bright :)


regards,

Koen



Regards,

David Connolly
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] gcc options for smallest size, best speed, etc

2006-04-28 Thread Clemens Eisserer
Hi,

 I'd expect -g -Os to do all appropriate code size optimisations
 regardless of the architecture.
Well -g is a bit stupid in this scenario, since this means you tell
gcc to optimize for size but include debugging informations too.

I would recommend -O2 as the best option to use. It does a fine job
deciding wether a optimization is really worth the extra bloat, which
is especially important when it comes down to the small i-cache the
N770's processor has.

lg Clemens
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] gcc options for smallest size, best speed, etc

2006-04-28 Thread Koen Kooi
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Clemens Eisserer wrote:
 Hi,
 
 
I'd expect -g -Os to do all appropriate code size optimisations
regardless of the architecture.
 
 Well -g is a bit stupid in this scenario, since this means you tell
 gcc to optimize for size but include debugging informations too.
 
 I would recommend -O2 as the best option to use. It does a fine job
 deciding wether a optimization is really worth the extra bloat, which
 is especially important when it comes down to the small i-cache the
 N770's processor has.

- -Os uses the same optimizations as -O2 but takes size into account, so
that should be even better for small caches. From my tests -Os is
sligtly faster as -O2 since you need to load less from jffs2 (less zlib
stuff).

regards,

Koen
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFEUfAsMkyGM64RGpERAg4QAJ9foVR72/3hV/YGPOXHO24kEO/sFQCdFIBx
nm4+tMzQSGRs/dNCVShAFF0=
=DQOO
-END PGP SIGNATURE-
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


[maemo-developers] gcc options for smallest size, best speed, etc

2006-04-27 Thread Philippe Laporte

Hi,
   I would assume that this list be a top source for the following 
question: what are the compile options for ARM for gcc for the smallest

possible size, etc.

For both smallest size, and best speed, seperately of course.

Or where should I look?

Thanks,

--
Philippe Laporte
Software

Gatespace Telematics
Första Långgatan 18
41328 Göteborg
Sweden
Phone: +46 702 04 35 11
Fax:   +46 31 24 16 50
Email: [EMAIL PROTECTED]


___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] gcc options for smallest size, best speed, etc

2006-04-27 Thread Koen Kooi
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Philippe Laporte wrote:
 Hi,
I would assume that this list be a top source for the following
 question: what are the compile options for ARM for gcc for the smallest
 possible size, etc.
 
 For both smallest size, and best speed, seperately of course.
 
 Or where should I look?

Have a look at http://free-electrons.com/articles/optimizations/ , that
 explains the most commonly used optimizations.

regards,

Koen
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFEUIyAMkyGM64RGpERAvvoAJ9rVeBogUkxZM+BuB1LmkEcb1nw/QCgtuXs
xhjNNDCWmQWlfRXLI8MRpX4=
=Y58a
-END PGP SIGNATURE-
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] gcc options for smallest size, best speed, etc

2006-04-27 Thread Murray Cumming
On Thu, 2006-04-27 at 11:03 +0200, Philippe Laporte wrote:
 Hi,
 I would assume that this list be a top source for the following 
 question: what are the compile options for ARM for gcc for the smallest
 possible size, etc.
 
 For both smallest size, and best speed, seperately of course.

I'd expect -g -Os to do all appropriate code size optimisations
regardless of the architecture.

I've noticed that, for C++, you can give -g -Os a lot of extra help if
you can use -fno-exceptions too.

-- 
Murray Cumming
[EMAIL PROTECTED]
www.murrayc.com
www.openismus.com

___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] gcc options for smallest size, best speed, etc

2006-04-27 Thread Øyvind Kolås
On 4/27/06, Philippe Laporte [EMAIL PROTECTED] wrote:
 Hi,
 I would assume that this list be a top source for the following
 question: what are the compile options for ARM for gcc for the smallest
 possible size, etc.

 For both smallest size, and best speed, seperately of course.

 Or where should I look?

One of the changes that have mattered for me is adding -march=armv5te
to the CFLAGS.

/Øyvind Kolås

--
«The future is already here. It's just not very evenly distributed»
 -- William Gibson
http://pippin.gimp.org/http://ffii.org/
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers