[C++-sig] Loading Boost.Python made bindings is horribly slow?

Niall Douglas s_sourceforge at nedprod.com
Sat Apr 3 03:44:43 CEST 2004


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

On 2 Apr 2004 at 17:17, Rene Rivera wrote:

> > If I get some time this week, I may give a bash at patching GCC.
> > Then we can simply reuse the macros defining Windows DLL support to
> > do the same on POSIX.
> 
> I explain how I do the equivalent of dllexport on Linux+GCC on this
> message...
> 
> http://sourceforge.net/mailarchive/forum.php?thread_id'93609&forum_i
> d4093
> 
> Doesn't require changing GCC, but is ELF only, and requires recent
> enough binutils. One adds something like such.., to each method to
> export:

Clever hack to solve the problem, but I think it inexcusable that GCC 
doesn't do this properly already especially as ELF has the 
functionality and has had it for ages. OTOH you shouldn't moan if 
you're in a position to fix it yourself, so I won't - I'll just go do 
it.

If the patch were accepted to mainline CVS, you'd simply replace all 
__declspec(dllexport) with __attribute__ ((visibility("default"))) 
and compile with the new -fvisibility=hidden command line arg. Hey 
presto, link times drop substantially, executables become much 
smaller and faster and no more symbol clashes.

ie; life gets much better on POSIX like platforms and we all 
celebrate! :)

Cheers,
Niall





-----BEGIN PGP SIGNATURE-----
Version: idw's PGP-Frontend 4.9.6.1 / 9-2003 + PGP 8.0.2

iQA/AwUBQG4XC8EcvDLFGKbPEQIr6ACgvqhqs8DB5cl5gLp5+omfO4flUiwAn0MA
L3+Ay5n+xxnT6jH+WL+EjT9T
=jQL6
-----END PGP SIGNATURE-----




More information about the Cplusplus-sig mailing list