public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: Binaries compiled with GCC 3.2-3 much bigger than with 2.95.3-10?
@ 2003-09-05 11:19 Wayne
  2003-09-05 22:13 ` Frédéric L. W. Meunier
  0 siblings, 1 reply; 4+ messages in thread
From: Wayne @ 2003-09-05 11:19 UTC (permalink / raw)
  To: cygwin

There have been discussions on various forums about increased
executable size and in particular, compile time, pretty much
since gcc-3.1 was in beta.  Exe will be bigger than 2-95, even 
after stripping.

You can get more context on this at the gcc lists:

http://gcc.gnu.org/ml/gcc/

and

http://gcc.gnu.org/ml/gcc-help/

For many folks I work with, the biggest size adder is iostream..
Of course, most of them are worried about "Hello World".

;-)

Wayne


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Binaries compiled with GCC 3.2-3 much bigger than with 2.95.3-10?
  2003-09-05 11:19 Binaries compiled with GCC 3.2-3 much bigger than with 2.95.3-10? Wayne
@ 2003-09-05 22:13 ` Frédéric L. W. Meunier
  0 siblings, 0 replies; 4+ messages in thread
From: Frédéric L. W. Meunier @ 2003-09-05 22:13 UTC (permalink / raw)
  To: cygwin

Answering 2 in 1.

On Fri, 5 Sep 2003, Wayne wrote:

> There have been discussions on various forums about increased
> executable size and in particular, compile time, pretty much
> since gcc-3.1 was in beta.  Exe will be bigger than 2-95, even
> after stripping.

I agree that even on Linux this is usually the case, but not
with lndir. 3.2.3 and 3.3.1 produced smaller binaries, while
3.2-3 doubled the size on Cygwin.

Lapo Luchini wrote:

> Did you "strip" the executable produced? AFAIK gcc3 has much
> more "debug" infos, but once stripped should be of a similiar
> size.

Yes, and I also used strip on Cygwin to see it -Wl,-s was
really working. The Makefile is like:

CC      = gcc
CFLAGS  = -O2 -pipe -Wall
LDFLAGS = -Wl,-s
INCLUDE = -I.

all: lndir

lndir:
        $(CC) $(CFLAGS) $(INCLUDE) -o lndir $(LDFLAGS) lndir.c


I just did

$ make
$ make LDFLAGS=
$ make CFLAGS='-Os -pipe -Wall'
$ make CFLAGS='-Os -pipe -Wall' LDFLAGS=
$ make CC=gcc-2

and so on. Anyway, I'll later compile other things to see it
the size changes that much. I was just impressed by the
difference since 3.2-3 on Cygwin is supposed to work like 3.x
on Linux, or not ?

-- 
How to contact me - http://www.pervalidus.net/contact.html

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Binaries compiled with GCC 3.2-3 much bigger than with 2.95.3-10 ?
  2003-09-05  3:51 Binaries compiled with GCC 3.2-3 much bigger than with 2.95.3-10 ? Frédéric L. W. Meunier
@ 2003-09-05  8:14 ` Lapo Luchini
  0 siblings, 0 replies; 4+ messages in thread
From: Lapo Luchini @ 2003-09-05  8:14 UTC (permalink / raw)
  To: "Frédéric L. W. Meunier"; +Cc: cygwin

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Frédéric L. W. Meunier wrote:

| I just switched to 3.2-3 and was impressed with the following:
|
| Cygwin          -O2     -O2 + -Wl,-s    -Os    -Os + -Wl,-s What's so
| different in 3.2-3 ? On Linux GCC 3.x produced smaller binaries. On
| Cygwin the size doubled.

Did you "strip" the executable produced?
AFAIK gcc3 has much more "debug" infos, but once stripped should be of a
similiar size.

- --
Lapo 'Raist' Luchini
lapo@lapo.it (PGP & X.509 keys available)
http://www.lapo.it (ICQ UIN: 529796)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAj9YRd8ACgkQaJiCLMjyUvt4+gCaAtOxJWOh53VQGlrqHR5C5Q50
GwUAnjf1hIJbE94w7QUyg9JVCNrE29Eg
=jR8F
-----END PGP SIGNATURE-----



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Binaries compiled with GCC 3.2-3 much bigger than with 2.95.3-10 ?
@ 2003-09-05  3:51 Frédéric L. W. Meunier
  2003-09-05  8:14 ` Lapo Luchini
  0 siblings, 1 reply; 4+ messages in thread
From: Frédéric L. W. Meunier @ 2003-09-05  3:51 UTC (permalink / raw)
  To: cygwin

I just switched to 3.2-3 and was impressed with the following:

Cygwin          -O2     -O2 + -Wl,-s	-Os	-Os + -Wl,-s
------
2.95.3-10       15178   6656            15178   6656
3.2-3           26710   14336           26008   13824

Linux
-----
2.95.4.CVS	16475	7128		16283	6936
3.2.3		15885	6712		15427	6292
3.3.1		15802	6668		15320	6216

What's so different in 3.2-3 ? On Linux GCC 3.x produced
smaller binaries. On Cygwin the size doubled.

On Linux all 3 compilers default to -march=i686. I think it's
the same for Cygwin (i686-pc-cygwin), no ?

For the example I used lndir from XFree86 CVS. I packaged the
sources for it at
http://www.pervalidus.net/cygwin/lndir-CVS.tar.bz2 (9323
bytes).

-- 
How to contact me - http://www.pervalidus.net/contact.html

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-09-05 22:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-05 11:19 Binaries compiled with GCC 3.2-3 much bigger than with 2.95.3-10? Wayne
2003-09-05 22:13 ` Frédéric L. W. Meunier
  -- strict thread matches above, loose matches on Subject: below --
2003-09-05  3:51 Binaries compiled with GCC 3.2-3 much bigger than with 2.95.3-10 ? Frédéric L. W. Meunier
2003-09-05  8:14 ` Lapo Luchini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).