understanding gcc's header choices and how to fix them

Ryan Schmidt ryandesign at macports.org
Tue May 29 18:46:09 UTC 2018


On May 28, 2018, at 11:49, Joshua Root wrote:

> On 2018-5-28 13:58 , Ken Cunningham wrote:
>> I believe understand that there is one copy of libstdc++ installed by the latest functional version of gcc, at present gcc7.
>> 
>> All the versions of gcc from gcc45 to gcc7 use that same library.
> 
> There's libgcc45 and libgcc6 as well as libgcc (plus libgcc-devel but
> that's not important here). Some of the gcc ports depend on two of
> these. Not sure how that works.

libgcc contains the current version of all libraries.

libgcc6 contains the versions of those libraries that were current at the time gcc6 was released, where that differs from what's in libgcc. Right now, this is only libgfortran.3.dylib, because libgcc now provides libgfortran.4.dylib.

libgcc45 contains the versions of those libraries that were current at the time gcc45 was released, where that differs from what's in libgcc. Right now, this is only libobjc-gnu.2.dylib, because libgcc now provides libobjc-gnu.4.dylib.

When we update libgcc to version 8 (and there is a ticket about the problems associated with that update), we will need to introduce a libgcc7 port, because some library versions have changed again.

I believe we also have some libraries that we are not handling correctly, even now, before considering the gcc8 update.


>> --with-gxx-include-dir=${prefix}/include/${name}/c++/ \
> 
> Not 100% certain but I would think this is telling it where to install
> its headers (as opposed to "use the headers in this location"; it
> probably uses its own headers wherever they are installed regardless).




More information about the macports-dev mailing list