Hi folks, I've tried to link some code built with GNU G++ together with the PGI Fortran compiler as linker. However, G++ pulls in libstdc++, which in turn depends on libgcc_s. Any library starting with 'gcc' is being ignored in CMakeParseImplicitLinkInfo.cmake L.136, so libgcc_s is being stripped from the commandline. PGI Fortran however does not need libgcc_s on its own and therefore won't link it. Alas, by stripping libgcc_s from the implicit library list, the linking process fails due to missing symbols. On a side note, PGI C also doesn't use libgcc_s, only PGI C++ does. In fact, using an all PGI environment yields the same issue.
I'd like to open an MR for this issue, but I'm not quite sure how to perform the cleanup as it exists right now in a fashion that doesn't include too many language-specific items on the link line - the reason this removal process exists - but yet works in a robust fashion. Ideally, we'd compare all enabled languages and strip the libraries that are being linked by all, but given the way that enable_language() can be called anywhere, that doesn't seem to lead to a solution to me. Any suggestions on how to handle/fix the issue? - Chris -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers