View previous topic :: View next topic |
Author |
Message |
colonel_dolphin n00b
Joined: 12 Jan 2004 Posts: 39
|
Posted: Mon Jun 07, 2004 10:42 pm Post subject: CFLAGS, C++, -frepo reduces size by 25% |
|
|
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 |
|
|
Halcy0n Developer
Joined: 17 Sep 2003 Posts: 1682 Location: Freehold, NJ
|
Posted: Mon Jun 07, 2004 10:56 pm Post subject: |
|
|
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 |
|
|
asph l33t
Joined: 25 Aug 2003 Posts: 741 Location: Barcelona, Spain
|
Posted: Fri Sep 24, 2004 11:47 am Post subject: |
|
|
-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 |
|
|
Torangan Apprentice
Joined: 21 Mar 2003 Posts: 178
|
Posted: Fri Sep 24, 2004 5:37 pm Post subject: |
|
|
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 |
|
|
Xaignar Apprentice
Joined: 11 Jun 2003 Posts: 153 Location: Denmark
|
Posted: Fri Sep 24, 2004 6:21 pm Post subject: |
|
|
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 |
|
|
Genkaku n00b
Joined: 26 Aug 2004 Posts: 72 Location: Poland
|
Posted: Fri Sep 24, 2004 8:23 pm Post subject: |
|
|
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 |
|
|
Gavinv n00b
Joined: 05 Aug 2004 Posts: 10
|
Posted: Fri Oct 08, 2004 9:34 pm Post subject: Missing feature in Portage? |
|
|
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 |
|
|
Bowyakka Tux's lil' helper
Joined: 04 Oct 2002 Posts: 142 Location: London
|
Posted: Wed Feb 23, 2005 4:48 pm Post subject: |
|
|
This seems ok but breaks fam and doxygen _________________ glows in the dark |
|
Back to top |
|
|
Dr.Dran l33t
Joined: 08 Oct 2004 Posts: 766 Location: Imola - Italy
|
Posted: Sat Dec 31, 2005 12:26 pm Post subject: |
|
|
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
_________________ :: [Dr.Dran] Details ::
- Linux User # 286282
- IT FreeLance Consultant
- President of ImoLUG [Imola & Faenza Linux User Group] |
|
Back to top |
|
|
ZeuZ_NG Guru
Joined: 10 Sep 2008 Posts: 453 Location: Near /dev/urandom | /dev/null
|
Posted: Wed Jan 28, 2009 7:47 am Post subject: |
|
|
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 |
|
|
|