Re: [Mesa-dev] [PATCH] Android: r600: fix build when LLVM is disabled

2017-05-19 Thread Emil Velikov
Jfyi: feel free to add Fixes tag as you see fit. We parse though and
automatically nominate patches for -stable :-)
On 19 May 2017 at 13:04, Rob Herring  wrote:
> On Fri, May 12, 2017 at 11:55 AM, Rob Herring  wrote:
>> There's still an error after my recent clean-up if LLVM is not patched to
>> enable AMDGPU target:
>>
>> external/mesa3d/src/amd/common/ac_llvm_util.c:38:2: error: implicit 
>> declaration of function 'LLVMInitializeAMDGPUTargetInfo' is invalid in C99 
>> [-Werror,-Wimplicit-function-declaration]
>> LLVMInitializeAMDGPUTargetInfo();
>> ^
>> external/mesa3d/src/amd/common/ac_llvm_util.c:39:2: error: implicit 
>> declaration of function 'LLVMInitializeAMDGPUTarget' is invalid in C99 
>> [-Werror,-Wimplicit-function-declaration]
>> LLVMInitializeAMDGPUTarget();
>> ^
>> external/mesa3d/src/amd/common/ac_llvm_util.c:40:2: error: implicit 
>> declaration of function 'LLVMInitializeAMDGPUTargetMC' is invalid in C99 
>> [-Werror,-Wimplicit-function-declaration]
>> LLVMInitializeAMDGPUTargetMC();
>> ^
>> external/mesa3d/src/amd/common/ac_llvm_util.c:41:2: error: implicit 
>> declaration of function 'LLVMInitializeAMDGPUAsmPrinter' is invalid in C99 
>> [-Werror,-Wimplicit-function-declaration]
>> LLVMInitializeAMDGPUAsmPrinter();
>> ^
>>
>> We need to drop libmesa_amd_common when LLVM is disabled, however there's
>> still a dependency on include paths for ac_binary.h. So explicitly add the
>> include path when LLVM is disabled.
>
> Emil, can you please apply.
>
Done, alongside the virgl patch.
Might be worth getting a fd.o account [1] if you don't have one already.

Jfyi: feel free to add Fixes tag as you see fit. We parse though and
automatically nominate patches for -stable :-)

Thanks
Emil

[1] https://www.freedesktop.org/wiki/AccountRequests/
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] Android: r600: fix build when LLVM is disabled

2017-05-19 Thread Rob Herring
On Fri, May 12, 2017 at 11:55 AM, Rob Herring  wrote:
> There's still an error after my recent clean-up if LLVM is not patched to
> enable AMDGPU target:
>
> external/mesa3d/src/amd/common/ac_llvm_util.c:38:2: error: implicit 
> declaration of function 'LLVMInitializeAMDGPUTargetInfo' is invalid in C99 
> [-Werror,-Wimplicit-function-declaration]
> LLVMInitializeAMDGPUTargetInfo();
> ^
> external/mesa3d/src/amd/common/ac_llvm_util.c:39:2: error: implicit 
> declaration of function 'LLVMInitializeAMDGPUTarget' is invalid in C99 
> [-Werror,-Wimplicit-function-declaration]
> LLVMInitializeAMDGPUTarget();
> ^
> external/mesa3d/src/amd/common/ac_llvm_util.c:40:2: error: implicit 
> declaration of function 'LLVMInitializeAMDGPUTargetMC' is invalid in C99 
> [-Werror,-Wimplicit-function-declaration]
> LLVMInitializeAMDGPUTargetMC();
> ^
> external/mesa3d/src/amd/common/ac_llvm_util.c:41:2: error: implicit 
> declaration of function 'LLVMInitializeAMDGPUAsmPrinter' is invalid in C99 
> [-Werror,-Wimplicit-function-declaration]
> LLVMInitializeAMDGPUAsmPrinter();
> ^
>
> We need to drop libmesa_amd_common when LLVM is disabled, however there's
> still a dependency on include paths for ac_binary.h. So explicitly add the
> include path when LLVM is disabled.

Emil, can you please apply.

Rob
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] Android: r600: fix build when LLVM is disabled

2017-05-15 Thread Nicolai Hähnle

On 12.05.2017 18:55, Rob Herring wrote:

There's still an error after my recent clean-up if LLVM is not patched to
enable AMDGPU target:

external/mesa3d/src/amd/common/ac_llvm_util.c:38:2: error: implicit declaration 
of function 'LLVMInitializeAMDGPUTargetInfo' is invalid in C99 
[-Werror,-Wimplicit-function-declaration]
LLVMInitializeAMDGPUTargetInfo();
^
external/mesa3d/src/amd/common/ac_llvm_util.c:39:2: error: implicit declaration 
of function 'LLVMInitializeAMDGPUTarget' is invalid in C99 
[-Werror,-Wimplicit-function-declaration]
LLVMInitializeAMDGPUTarget();
^
external/mesa3d/src/amd/common/ac_llvm_util.c:40:2: error: implicit declaration 
of function 'LLVMInitializeAMDGPUTargetMC' is invalid in C99 
[-Werror,-Wimplicit-function-declaration]
LLVMInitializeAMDGPUTargetMC();
^
external/mesa3d/src/amd/common/ac_llvm_util.c:41:2: error: implicit declaration 
of function 'LLVMInitializeAMDGPUAsmPrinter' is invalid in C99 
[-Werror,-Wimplicit-function-declaration]
LLVMInitializeAMDGPUAsmPrinter();
^

We need to drop libmesa_amd_common when LLVM is disabled, however there's
still a dependency on include paths for ac_binary.h. So explicitly add the
include path when LLVM is disabled.

Signed-off-by: Rob Herring 


Maybe it would be better to split out the compiler parts systematically. 
In practice it doesn't matter much, though, so...


Acked-by: Nicolai Hähnle 



---
 src/gallium/drivers/r600/Android.mk | 4 
 1 file changed, 4 insertions(+)

diff --git a/src/gallium/drivers/r600/Android.mk 
b/src/gallium/drivers/r600/Android.mk
index 26c00f6ccd9c..87f433dbaeb9 100644
--- a/src/gallium/drivers/r600/Android.mk
+++ b/src/gallium/drivers/r600/Android.mk
@@ -30,7 +30,11 @@ include $(CLEAR_VARS)

 LOCAL_SRC_FILES := $(C_SOURCES) $(CXX_SOURCES)

+ifeq ($(MESA_ENABLE_LLVM),true)
 LOCAL_STATIC_LIBRARIES := libmesa_amd_common
+else
+LOCAL_C_INCLUDES += $(MESA_TOP)/src/amd/common
+endif

 LOCAL_SHARED_LIBRARIES := libdrm_radeon
 LOCAL_MODULE := libmesa_pipe_r600




--
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev