[blfs-dev] LLVM-Mesa interaction : urgent change:wq

Pierre Labastie pierre.labastie at neuf.fr
Thu Sep 10 08:13:07 PDT 2015


On 10/09/2015 11:00, Fernando de Oliveira wrote:
> Em 10-09-2015 04:43, Pierre Labastie escreveu:
>> On 10/09/2015 04:31, Bruce Dubbs wrote:
>>> Ken Moffat wrote:
>>>> On Tue, Sep 08, 2015 at 09:58:41PM +0100, Ken Moffat wrote:
>>>>> On Tue, Sep 08, 2015 at 10:24:43PM +0200, Pierre Labastie wrote:
>>>>>> On 08/09/2015 16:30, Fernando de Oliveira wrote:
>>>>>>> Em 08-09-2015 10:43, Pierre Labastie escreveu:
>>>> [...]
>>>>>>> Agreed. I couldn't decide, and forgot to ask Ken if it would be OK to
>>>>>>> remove form Mesa and let the user decide, when he needed, because Ken
>>>>>>> explicitly mentioned r600 in two ocasions or more, in our discussion.
>>>>>>> That made me thinking that I could remove from GLL_DRV, because a
>>>>>>> user
>>>>>>> needing it would fill up the steps. Of course, Ken is much more
>>>>>>> than a
>>>>>>> user, so, your suggestion is probably the best one. But it would
>>>>>>> be good
>>>>>>> to hear Ken's opinion.
>>>>>>>
>>>>>>> Again, I agree with you, but Ken may provide some better alternative.
>>>>>>>
>>>>>> Hope Ken can see this...
>>>>>>
>>>>>> OTOH, here is some added information about LLVM:
>>>>>>
>>>>>> I've looked at llvm configure script:
>>>>>> --enable-targets=r600 is equivalent to --enable-targets=amdgpu
>>>>>> --enable-targets=host is equivalent to --enable-targets=x86 on i686
>>>>>> or x86_64
>>>>>> --enable-targets=cpp has nothing to do with clang++. If you build
>>>>>> and use that
>>>>>> target, you'll generate C++ code obtained from the llvm assembly code
>>>>>> generated by the compiler. I found this explanation on the internet:
>>>>>> "The CPP backend creates LLVM API calls to create an AST that
>>>>>> represent the
>>>>>> equivalent of the LLVM assembly." I haven't understood everything,
>>>>>> but I think
>>>>>> that is not something useful for the book...
>>>>>>
>>>>>> Also, the r600/amdgpu target is needed for radeonsi driver, and
>>>>>> optional for
>>>>>> r600 driver, but mesa-10 cannot be built with it/them on llvm-3.7.0
>>>>>> (it needs
>>>>>> patches at least). OTOH, mesa-11 should be out within a few days
>>>>>> (already at
>>>>>> rc3). I wonder whether updating to mesa-11 could be considered for
>>>>>> BLFS-7.8. I
>>>>>> understand that Mesa impact a lot of other packages, but maybe not
>>>>>> so many
>>>>>> outside "X window system environment" chapter. Note that radeonsi
>>>>>> is needed
>>>>>> for Radeon Southern Islands and later gpu's (I have received all this
>>>>>> information in a private mail from a former editor).
>>>>>>
>>>>>> Pierre
>>>>> Sorry, I only skimmed the earlier post and missed a lot of it : saw
>>>>> that r600 was missing (I have not updated my local copy of the book
>>>>> at the moment) and thought it would be reinstated.
>>>>>
>>>>> I blame myself for my comments on the llvm ticket
> Please, don't. Our last discussions were very good indeed. And your help
> with my personal problems brought me back to the book with my normal
> intensity. Thank you for all those discussions, sddm, lxqt, etc.
>
>>>>> - since (at least)
>>>>> 3.6, llvm builds for all targets by default - I noticed that while I
>>>>> was watching 3.7 build things I really did not need.  On my current
>>>>> build (nominally 2nd September BLFS) I built llvm-3.6.2 with
>>>>>    --enable-targets=r600
>>>>> and that seems to have been enough for what I need (llvm only used
>>>>> for the r600 mesa driver) :
>>>>> ls -l /usr/lib/dri/*.so
>>>>> -rwxr-xr-x 1 root root   25048 Sep  5 19:03
>>>>> /usr/lib/dri/dummy_drv_video.so
>>>>> -rwxr-xr-x 5 root root 6703128 Sep  5 18:57 /usr/lib/dri/i915_dri.so
>>>>> -rwxr-xr-x 5 root root 6703128 Sep  5 18:57 /usr/lib/dri/i965_dri.so
>>>>> -rwxr-xr-x 1 root root 1849144 Sep  5 19:03
>>>>> /usr/lib/dri/i965_drv_video.so
>>>>> -rwxr-xr-x 7 root root 9296216 Sep  5 18:57
>>>>> /usr/lib/dri/kms_swrast_dri.so
>>>>> -rwxr-xr-x 7 root root 9296216 Sep  5 18:57 /usr/lib/dri/nouveau_dri.so
>>>>> -rwxr-xr-x 5 root root 6703128 Sep  5 18:57
>>>>> /usr/lib/dri/nouveau_vieux_dri.so
>>>>> -rwxr-xr-x 5 root root 6703128 Sep  5 18:57 /usr/lib/dri/r200_dri.so
>>>>> -rwxr-xr-x 7 root root 9296216 Sep  5 18:57 /usr/lib/dri/r300_dri.so
>>>>> -rwxr-xr-x 7 root root 9296216 Sep  5 18:57 /usr/lib/dri/r600_dri.so
>>>>> -rwxr-xr-x 5 root root 6703128 Sep  5 18:57 /usr/lib/dri/radeon_dri.so
>>>>> -rwxr-xr-x 7 root root 9296216 Sep  5 18:57
>>>>> /usr/lib/dri/radeonsi_dri.so
>>>>> -rwxr-xr-x 7 root root 9296216 Sep  5 18:57 /usr/lib/dri/swrast_dri.so
>>>>> -rwxr-xr-x 7 root root 9296216 Sep  5 18:57 /usr/lib/dri/vmwgfx_dri.so
>>>>>
>>>>> That restriction to only r600 should probably not be our default
>>>>> (we want to allow people to build clang if they insist), but I would
>>>>> like to include it as optional.
>>>>>
>>>> At the moment, mesa recommends llvm (required for Gallium3D r300 and
>>>> radeonsi drivers and also for llvmpipe which is intended to be the
>>>> fastest of the three sw rasterizers, ... ) and llvm just has
>>>> --enable-targets=host
>>>>
>>>> AFAICS that will NOT let llvm build mesa (we build for all graphics
>>>> variants in mesa).  Looking back at what I had, I see that using
>>>> only the r600 target has not provided me with llvmpipe : the log is
>>>> misleading, because it appears to build in llvmpipe and creates
>>>> llvmpipe.la, but nothing gets installed.
>>>>
>>>> I now propose to change llvm to "--enable-targets=host,r600" AND to
>>>> change the explanation from
>>>>
>>>> --enable-targets=host: This switch enables building for the same
>>>> target as the host. Default is all. You can use a comma separated
>>>> list. Valid targets are: host, x86, x86_64, sparc, powerpc, arm64,
>>>> arm, aarch64, mips, hexagon, xcore, msp430, nvptx, systemz, r600,
>>>> bpf, wasm, and cpp.
>>>>
>>>> to
>>>>
>>>> --enable-targets=host,r600: This switch enables building for the same
>>>> target as the host, and also for the r600 AMD GPU used by the Mesa
>>>> r600 and radeonsi drivers. The default is all. You can use a comma
>>>> separated list. Valid targets are: host, x86, x86_64, sparc, powerpc,
>>>> arm64, arm, aarch64, mips, hexagon, xcore, msp430, nvptx, systemz, r600,
>>>> bpf, wasm, and cpp
>>>>
>>>> unless anybody objects in the next few hours.
>>> No objection, but I just built mesa for 7.8 without llvm.  I do not
>>> have any radeon cards. The display seems very fast to me for normal
>>> use, but I don't do any 3D apps.
>>>
>>>    -- Bruce
>> I agree with Ken, too. Maybe add "amdgpu" to the list of targets. It is
>> not in the doc, but it is understood by configure (and is equivalent to
>> r600. Maybe also add a to Mesa command explanations, that the r600 and
>> radeonsi drivers cannot be built if the r6OO backend has not been built
>> in llvm.
>>
>> Right now, I am doing the statistics for llvm, so I can do that too.
>>
>> Pierre
>>
> I found it "ugly" having --enable-targets=host,r600. Was sure would have
> input from others.
>
> You two will arrive to the better for the page, I am sure. Please,
> remember to fix mesa, if needed, too.
>
> And thanks for the fixes.
>
Done at r16386. Ooops, forgot Mesa. It's coming...

Pierre



More information about the blfs-dev mailing list