[Mesa-dev] [PATCH] r600: add amdgpuinfo to the llvm requiredmodule list

Marc Dietrich marvin24 at gmx.de
Mon Feb 27 14:43:07 UTC 2017


Am Montag, 27. Februar 2017, 15:26:18 CET schrieb Jan Vesely:
> On Mon, 2017-02-27 at 12:54 +0100, Marc Dietrich wrote:
> > This fixes the build when mesa is build against a static libllvm and
> > consolidates the module collection a bit.
> > 
> > Signed-off-by: Marc Dietrich <marvin24 at gmx.de>
> > ---
> > 
> >  configure.ac | 7 +++----
> >  1 file changed, 3 insertions(+), 4 deletions(-)
> > 
> > diff --git a/configure.ac b/configure.ac
> > index 890a37999c..adc81260a9 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -1005,6 +1005,8 @@ radeon_llvm_check() {
> > 
> >      llvm_add_target $amdgpu_llvm_target_name $2
> >      
> >      llvm_add_default_components $2
> > 
> > +    llvm_add_component "amdgpuinfo" "r600"
> > +    llvm_add_component "asmparser" "r600"
> 
> this looks wrong. -lLLVMAMDGPUInfo should be included in target
> specific libs.
> does running `llvm-config --libs amdgpu` not list amdgpuinfo?

yes, it does list it, but as written in [1] it gets somehow* not included.

*) Maybe because radeon_llvm_check is never called if opencl is not enabled 
(but llvm is enabled) for r600. This is why I added a seccond check in my 
patch.

My target it r600, llvm version 3.9 (shared multiple libs are build - yes, I 
know this is broken, bug is filed).

> it also looks incorrect. the second parameter should be $2 instead of
> "r600"

yep, you are right.

> Jan
> 
> >      llvm_add_component "bitreader" $2
> >      llvm_add_component "ipo" $2
> > 
> > @@ -2297,11 +2299,8 @@ if test -n "$with_gallium_drivers"; then
> > 
> >              HAVE_GALLIUM_R600=yes
> >              PKG_CHECK_MODULES([RADEON], [libdrm >=
> >              $LIBDRM_RADEON_REQUIRED libdrm_radeon >=
> >              $LIBDRM_RADEON_REQUIRED]) require_libdrm "r600"
> > 
> > -            if test "x$enable_opencl" = xyes; then
> > +            if test "x$enable_llvm" = xyes -o "x$enable_opencl" = xyes;
> > then> 
> >                  radeon_llvm_check $LLVM_REQUIRED_R600 "r600"
> > 
> > -
> > -                llvm_add_component "asmparser" "r600"
> > -                llvm_add_component "bitreader" "r600"
> > 
> >              fi
> >              ;;
> >          
> >          xradeonsi)

[1] https://lists.freedesktop.org/archives/mesa-dev/2017-February/145256.html


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170227/f60f33a9/attachment.sig>


More information about the mesa-dev mailing list