Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
CFLAGS, C++, -frepo reduces size by 25%
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
colonel_dolphin
n00b
n00b


Joined: 12 Jan 2004
Posts: 39

PostPosted: Mon Jun 07, 2004 10:42 pm    Post subject: CFLAGS, C++, -frepo reduces size by 25% Reply with quote

According to a test by the ACE/TAO group, the gcc option "-frepo" was reported to reduce footprint of statically built ACE/TAO by 25%.

Using "-frepo" in CXXFLAGS reduces the footprint, but increases the compile time.

Does anyone have interesting benchmarks (file size, RSS, CPU) comparing with and without "-frepo" for a real-world application, like htdig?

The latest version of gcc I found seems to imply that -frepo is still usefull. However, I also found mention that newer version of the GNU toolchain (i.e. ld) is capable of automatically removing the duplication resulting if "-frepo" is not used. Hmmmm.
http://gcc.gnu.org/onlinedocs/gcc-3.4.0/gcc/Template-Instantiation.html#Template%20Instantiation


Last edited by colonel_dolphin on Tue Jun 08, 2004 7:10 pm; edited 2 times in total
Back to top
View user's profile Send private message
Halcy0n
Developer
Developer


Joined: 17 Sep 2003
Posts: 1682
Location: Freehold, NJ

PostPosted: Mon Jun 07, 2004 10:56 pm    Post subject: Reply with quote

Put -frepo into your CXXFLAGS, those should be used when just compiling C++.
CXXFLAGS = "{$CFLAGS} -frepo"
_________________
Mark Loeser
http://www.halcy0n.com
Back to top
View user's profile Send private message
asph
l33t
l33t


Joined: 25 Aug 2003
Posts: 741
Location: Barcelona, Spain

PostPosted: Fri Sep 24, 2004 11:47 am    Post subject: Reply with quote

-frepo breaks ncurses-5.4-r5
_________________
gentoo sex is updatedb; locate; talk; date; cd; strip; look; touch; finger; unzip; uptime; gawk; head; emerge --oneshot condom; mount; fsck; gasp; more; yes; yes; yes; more; umount; emerge -C condom; make clean; sleep
Back to top
View user's profile Send private message
Torangan
Apprentice
Apprentice


Joined: 21 Mar 2003
Posts: 178

PostPosted: Fri Sep 24, 2004 5:37 pm    Post subject: Reply with quote

You must have done something strange. ncurses is a C program and not influenced by CXXFLAGS. Therefore it did compile again without problems here after I added -frepo to my CXXFLAGS.
Back to top
View user's profile Send private message
Xaignar
Apprentice
Apprentice


Joined: 11 Jun 2003
Posts: 153
Location: Denmark

PostPosted: Fri Sep 24, 2004 6:21 pm    Post subject: Reply with quote

Well, I can tell you that a CVS build of aMule fails if you use that CXXFLAG, cause i just tried it. Caused a cartload of linking errors related to embedded Crypto++ code.
Back to top
View user's profile Send private message
Genkaku
n00b
n00b


Joined: 26 Aug 2004
Posts: 72
Location: Poland

PostPosted: Fri Sep 24, 2004 8:23 pm    Post subject: Reply with quote

We can read in point 3 of options that are present.:

Do nothing. Pretend G++ does implement automatic instantiation management. Code written for the Borland model will work fine, but each translation unit will contain instances of each of the templates it uses. In a large program, this can lead to an unacceptable amount of code duplication.

That should explain a little :-)
Back to top
View user's profile Send private message
Gavinv
n00b
n00b


Joined: 05 Aug 2004
Posts: 10

PostPosted: Fri Oct 08, 2004 9:34 pm    Post subject: Missing feature in Portage? Reply with quote

Hmmm, so perhaps what we really need is a matrix of valid compile options for specific platforms / ebuilds?

https://bugs.gentoo.org/show_bug.cgi?id=57223
Back to top
View user's profile Send private message
Bowyakka
Tux's lil' helper
Tux's lil' helper


Joined: 04 Oct 2002
Posts: 142
Location: London

PostPosted: Wed Feb 23, 2005 4:48 pm    Post subject: Reply with quote

This seems ok but breaks fam and doxygen
_________________
glows in the dark
Back to top
View user's profile Send private message
Dr.Dran
l33t
l33t


Joined: 08 Oct 2004
Posts: 766
Location: Imola - Italy

PostPosted: Sat Dec 31, 2005 12:26 pm    Post subject: Reply with quote

Excuse me I resume this post because I would like to know if the -frepo option for the current stable gcc-3.4.4-r1 is buggy or safe to turn on in a production system.

Ciauz and have a good hacking

:D :D :D
_________________
:: [Dr.Dran] Details ::
- Linux User # 286282
- IT FreeLance Consultant
- President of ImoLUG [Imola & Faenza Linux User Group]
Back to top
View user's profile Send private message
ZeuZ_NG
Guru
Guru


Joined: 10 Sep 2008
Posts: 453
Location: Near /dev/urandom | /dev/null

PostPosted: Wed Jan 28, 2009 7:47 am    Post subject: Reply with quote

BUMP!
As of 2008, how has this flag evolved?
_________________
| Intel Core i7 920. | Intel DX58SO Extreme. |
| 8gb DDR3 1666mHz | 1TB 7200 RPM WD HDD.|
Unix´s guru view of sex:
unzip ; strip ; touch ; grep ; finger ; \
mount ; fsck ; more ; yes ; umount ; sleep.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum