g++33 creates large binaries on 5.1-RELEASE

Chris Knight chris at e-easy.com.au
Sun Nov 30 23:47:27 PST 2003


5.1-RELEASE comes with gcc 3.2 (from memory).
g++33 will have been installed from the ports tree, which by default only
creates static libraries of libstdc++, etc. It's this static linking that is
generating the large binaries.
One way around this is to rebuild gcc33 with shared library support, then
add the directory containing the shared libraries to ldconfig_paths in
The ideal way would be for the gccXX ports to grow a gccXX-shlib slave port
which would be added to the RUN_DEPENDS list of a port when that port asks
for a gcc that isn't part of the base install. The gccXX-shlib slave port
would only build/install the shared libraries for that version of gcc as
well as adding an rc.d script to add the directory to ldconfig. No, I'm not

Chris Knight
Systems Administrator
Tel: +61 3 6334 9995  Fax: +61 3 6331 7032  Mob: +61 419 528 795
Web: http://www.e-easy.com.au

> -----Original Message-----
> From: owner-freebsd-ports at freebsd.org 
> [mailto:owner-freebsd-ports at freebsd.org] On Behalf Of Guy Middleton
> Sent: Monday, 1 December 2003 02:18
> To: ports at freebsd.org
> Subject: g++33 creates large binaries on 5.1-RELEASE
> I compile a simple C++ program:
> #include <fstream>
> int main() {
>     std::ofstream out( "file.out" );
> }
> With g++33 on a 5.1-RELEASE system, it creates a very large 
> binary (500k).  Is there something obvious I am doing wrong 
> here?  Thanks. _______________________________________________
> freebsd-ports at freebsd.org mailing list 
> http://lists.freebsd.org/mailman/listinfo/free> bsd-ports
> To 
> unsubscribe, send any mail to 
> "freebsd-ports-unsubscribe at freebsd.org"

More information about the freebsd-ports mailing list