[tlbuild] TeX Live builds -- second summary

Ken Brown kbrow1i at gmail.com
Wed May 6 16:16:47 CEST 2009


On 5/6/2009 9:47 AM, Peter Breitenlohner wrote:
> Another question: why the explicit '-lstdc++'. In the absence of '-static*'
> that should be automatically added by g++ (or is that different for 
> cygwin). The '-lstdc++' may, however, be required with '-static*' and 
> will certainly
> do no harm.
> 
> I ask, since I want to simply append '-static -static-libgcc -lstdc++' to
> the command line passed from libtool to g++, and for linux that command 
> line
> contains no '-lstdc++'.

Hi Peter,

The real answer is that I don't know much about programming, and I'm 
just trying to learn as I go along.  I looked at the tests in config.log 
and saw -lstdc++ in some of them, so I did the same thing.  I've just 
repeated my tests without that flag, and there's no change.  So I think 
it can safely be omitted.

By the way, I also get static linking (and no segfault) if I just use 
'-static' and not '-static-libgcc' on the g++-4 command line.  So I may 
have misinterpreted the documentation:

> By default, user applications will be linked against these DLLs unless the
> option '-static' is supplied to GCC during the build.  If linking statically
> against libstdc++, you should also use '-static-libgcc' to link likewise
> against libgcc, or you will experience segfaults on program termination.

I wonder if this means that g++-4 needs '-static' and gcc-4 needs 
'-static-libgcc' when C and C++ programs are linked together.  I don't 
know enough programming to test this.  Is it clear to you?  If not, I 
could ask on the cygwin list.

Regards,

Ken



More information about the tlbuild mailing list