[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: g++ and -nostdlib

From: Bob Friesenhahn
Subject: Re: g++ and -nostdlib
Date: Fri, 8 Nov 2013 12:49:53 -0600 (CST)
User-agent: Alpine 2.01 (GSO 1266 2009-07-14)

On Fri, 8 Nov 2013, Peter Rosin wrote:


There seem to be a longstanding complaint that libtool is using
-nostdlib when it links libraries using g++. It interferes with
-pthread and I think I have also seen other issues. No one can
give a satisfactory explanation why libtool does this, it seems

Isn't it because libtool wants to control the order of the linking and assure that all dependencies (including static) are tracked/known and applied at the correct times? It wants to assure that static dependencies are linked into the dependent program rather than into some dependent shared library (and thus causing a problem).

It was common (and perhaps still is) for the GNU C++ library to be delivered as a static library for Windows/MinGW because C++ exceptions were not handled properly when thrown by DLLs.

Quite a lot of effort went into making this work the way it currently does.

First libtool tries to take away all of the libraries which would be added automatically and then it applies the libraries that GCC says it would use at the correct time.

Bob Friesenhahn
GraphicsMagick Maintainer,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]