[Mesa-dev] [PATCH 1/2] configure.ac: print LLVM_LDFLAGS

Marek Olšák maraeo at gmail.com
Tue Apr 14 06:19:08 PDT 2015


On Tue, Apr 14, 2015 at 2:55 PM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> On 14 April 2015 at 13:32, Marek Olšák <maraeo at gmail.com> wrote:
>> On Tue, Apr 14, 2015 at 2:19 PM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
>>> On 13 April 2015 at 21:06, Marek Olšák <maraeo at gmail.com> wrote:
>>>> From: Marek Olšák <marek.olsak at amd.com>
>>>>
>>>> ---
>>>>  configure.ac | 1 +
>>>>  1 file changed, 1 insertion(+)
>>>>
>>>> diff --git a/configure.ac b/configure.ac
>>>> index 9e8c1d8..6ccf3b4 100644
>>>> --- a/configure.ac
>>>> +++ b/configure.ac
>>>> @@ -2543,6 +2543,7 @@ if test "x$MESA_LLVM" = x1; then
>>>>      echo "        LLVM_CFLAGS:     $LLVM_CFLAGS"
>>>>      echo "        LLVM_CXXFLAGS:   $LLVM_CXXFLAGS"
>>>>      echo "        LLVM_CPPFLAGS:   $LLVM_CPPFLAGS"
>>>> +    echo "        LLVM_LDFLAGS:    $LLVM_LDFLAGS"
>>> I'm puzzled - why do we need this ? Does commit message (ahem) does
>>> not mention either.
>>
>> I'd like to know what the LLVM path is for the linker. Things can go
>> crazy when building 32-bit Mesa on 64-bit and this will help to catch
>> incorrect LLVM paths before compilation.
>>
> Fair enough. With the above note in the commit message:
> Reviewed-by: Emil Velikov <emil.l.velilkov at gmail.com>
>
> Out of curiosity - which distro is this happening on, are you building
> your own multilib llvm ? Don't think I've ever had such issue before.

The main problem is that there can be only one llvm-config in
/usr/bin, so you have to be sure you have installed the correct one.
If you configure for 32-bit Mesa, you need the 32-bit version of
llvm-config. Otherwise, you need the 64-bit version. Reading
LLVM_LDFLAGS is one way to know which one of the two LLVMs is being
used.

The workaround is to use non-standard prefixes, so that both 32-bit
and 64-bit llvm-config versions don't conflict, but not everybody uses
that.

Sadly, LLVM doesn't use pkg-config.

Marek


More information about the mesa-dev mailing list