Re: How to force libtool to use CXX mode?
Bob Friesenhahn <[email protected]> Mon, 13 May 2024 17:22:01 -0500
| Newsgroups | gmane.comp.sysutils.automake.general,gmane.comp.gnu.libtool.general |
|---|---|
| Message-ID | <[email protected]> |
On 5/13/24 16:37, Karl Berry wrote: > convince Automake to force libtool to link using the C++ compiler > > When there are no C++ sources? Why? Just trying to understand ... There are no C++ sources from my project, but there is a C++ compiler used for the overall build. As clarification, this is for oss-fuzz's clang ubsan build, which is an almost completely static build so there are no shared libraries to provide their dependencies by default. When clang++ is enabled for ubsan, it adds additional dependency libraries (presumably -lubsan). The theory is that if linking is done using the same compiler then the dependency libraries brought in due the compiler mode will be applied automatically. > I'm sorry Bob, but I just don't know. Maybe the just-released > libtool-2.5.0 alpha offers some new help? I don't think so. > If there is some bug in or feature for Automake that would help, I'm > open to suggestions (and patches). It kind of sounds like more on the > libtool side? --sorry, karl. Automake does have a critical bug in that for a target which only optionally has C++ sources, that target is always linked using C++. Without this issue, the trick of including an empty optional C++ source file in the build would work. But I do not want GraphicsMagick to require a C++ compiler. I have been working to supply replacement's to Automake's target definitions, but it is very messy and not future safe. Without support for this in Automake, I feel that there is too much effort, and future risk. Bob -- Bob Friesenhahn [email protected], http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/ Public Key, http://www.simplesystems.org/users/bfriesen/public-key.txt