On 11/16/2012 2:33 PM, Ian Lance Taylor wrote:
On Fri, Nov 16, 2012 at 12:06 PM, Tim Schumacher <schumact@xxxxxxxxx> wrote:
I build boost with the new gcc I just built, and the same --prefix I used
for the gcc. Now all the includes and libraries (only static in my case)
are placed where gcc can find them. Next ... drum roll ... I unpack all the
static boost libraries and also the lidstdc++.a file and re-archive all the
resulting .o files back into libstdc++.a. Now all the boost objects are
magically available whenever I compile any c++ program.
Is that crazy enough to work?
By default GCC will link against the dynamic libstdc++, libstdc++.so.
If you override that one way or another, then, yes, your scheme should
work, until you update to the next version at which point you will
have to do it again.
Ian
Yep it works! I just tried it and with the one small caveat that there
were object filename collisions (which I fix by simply renaming all the
boost objects) it seems to work perfectly. I built the gcc with
--disable-shared option so there are no shared libraries to worry
about. Now I have a nice big 31MB libstdc++.a and I can compile and run
programs using boost without any flags on the command line.
I tried to look at the specs file to figure out how to accomplish the
same thing via specs but that appeared more involved than I wanted to get.
Thanks for your help!
Tim