[Mesa-dev] [PATCH 16/24] gallium/targets: explicitly include a dummy.cpp and remove all the LINK mayhem
Emil Velikov
emil.l.velikov at gmail.com
Sat Mar 29 05:41:14 PDT 2014
On 28/03/14 21:40, Matt Turner wrote:
> On Thu, Mar 27, 2014 at 2:00 PM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
>> We've been copying and pasting this hunk for a while now, only to prevent
>> build issues on very old and buggy build toolchains. At this point this
>> should no longer be needed, so we can cleanup all the mess and simplify
>> our makefiles.
>
> That's not why. It's because if all of your source files for a target
> are .c, but you link with a .la file containing C++ then you need to
> link using a C++ linker. Automake doesn't know that there's C++ in the
> static library, so it doesn't know to link with g++.
>
> So I can't review this patch, because I don't know whether what you're
> trying to do is based on reality or not.
>
Seems like I was over-exited when I was writing it.
The comment about "buggy build..." refers to the fact that we were explicitly
setting the *LINK variables. This is not required as using a simple
dummy.{c,cpp} will alert the build system to use the correct linker.
Rather than chasing drivers all the time, I've explicitly added a dummy.cpp to
use g++ as a linker. The only downside of this is that some libraries now pull
stdc++ as dependency (even when building wo LLVM). Which IMHO is not even an
issue.
Hopefully this makes sense. I try and come up with a more sensible commit
message for rev2.
-Emil
More information about the mesa-dev
mailing list